Repository navigation
docs: 修正 CLI 验收的正确调用方式(--cli 'uv run orzmc' 跑不起来) - #102
Merged
Merged
Conversation
上一笔 #100 把路径改对了(父仓库 `scripts/accept/cli.py`),但示例命令写成了 `--cli 'uv run orzmc'` —— 实测必挂: $ python3 scripts/accept/cli.py --cli 'uv run orzmc' [FAIL] surface/no-args-prints-help stderr='error: No such file or directory (os error 2)' 原因:harness 的**每个用例都从自己的沙箱目录启动**(`cwd=<case dir>`,HOME/XDG_* 也换掉), 命令串里的相对路径(`python`、`.`)按沙箱解析,那里既没有 venv 也没有 pyproject。 改成 CI 同款的稳定写法(先取 venv 里的绝对入口,25 例实测 64s): bin="$(uv run --all-packages python -c 'import shutil; print(shutil.which("orzmc"))')" uv run python ../scripts/accept/cli.py --cli "$bin" `--cli dist/orzmc --frozen` 不用改:脚本会把**已存在的文件路径** resolve 成绝对路径。 父仓库 `build_cli` 的 docstring 已补上这条 cwd 说明(纯注释)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
上一笔 #100 把脚本路径改对了,但示例命令写成了
--cli 'uv run orzmc'—— 实测必挂:原因:harness 的每个用例都从自己的沙箱目录启动(
cwd=<case dir>,HOME/XDG_* 也换掉),命令串里的相对路径按沙箱解析 —— 那里既没有 venv 也没有 pyproject。改成 CI 同款稳定写法(先取 venv 里的绝对入口;实测 25 例 64s 全过):
--cli dist/orzmc --frozen不用改(脚本会把已存在的文件路径 resolve 成绝对路径)。父仓库
scripts/accept/cli.py的build_clidocstring 已补上这条 cwd 说明(纯注释,行为不变)。影响面:
AGENTS.md/CONTRIBUTING.md/README.md三处示例。