fix(cli): close three review-comment gaps from the #9027 CI review - #9102
Conversation
- authorization: a missing args file no longer tells a setting-driven operator to re-run with --comment — with review.comment on, the refusal names the real blocker (no recorded invocation names a PR to bind the write to), and submit's advice ternary routes it to the binding remedy. - publish-assets: a handler-path refusal test pins the operator-scope invariant — with the setting off and no --comment in the recorded args, the handler exits 3 without touching gh; dropping skipWorkspaceSettings reddens it (mutation-verified). - parse-args: the flag branch of both forcing ternaries gets symmetric pins — a flag-forced high names the flag in the forcing warning and in the resolution text, never a setting that is off (mutation-verified). Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Re-run on the four commits pushed since the last pass ( Template: complete — same small note as last time: no Problem: real and unchanged from the last pass — the three named findings from #9027's CI review, each verified against the code. The four new commits address findings raised while reviewing the fix itself: the TS2698 cast that broke the build (R1-1), an explicit- Direction: aligned — unchanged from the last pass; the additional commits harden the same refusal/advice surface rather than widening scope. Size: 30 production lines (authorization.ts 12, submit.ts 18) + 128 test lines. Not core infrastructure. Approach: minimal — every commit maps to a named finding or review thread, no drive-by edits. The preamble change in submit.ts ("Nothing recorded authorises binding…") is the right fix for R3-1: the second advice arm now covers both a binding miss and a missing args record without presupposing recorded arguments exist, and the routing key ( Risk: no high-risk path matches (1e). Moving on to code review. 🔍 中文说明本轮复审针对上次审查后新推的四个提交( **模板:**完整——与上轮相同的小提醒:缺少 **问题:**真实且与上轮一致——#9027 CI review 的三条已点名发现,逐一在代码中核实成立。四个新提交处理的是评审修复本身时发现的问题:破坏构建的 TS2698 转型(R1-1)、为新三元表达式旗标分支补显式 **方向:**对齐——与上轮一致;新增提交加固的是同一拒绝/建议面,未扩大范围。 **规模:**30 行生产代码(authorization.ts 12 行、submit.ts 18 行)+ 128 行测试。非核心基础设施。 **方案:**最小化——每条提交对应一条已点名发现或评审线程,无顺手改动。submit.ts 的前缀改动("Nothing recorded authorises binding…")是 R3-1 的正确修复:第二条建议臂现在同时覆盖目标绑定失败与 args 记录缺失,且不再预设存在已记录的参数;路由键( **风险:**未命中高风险路径(1e)。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewThe build blocker is fixed in the house style the previous pass suggested, and the follow-up commits hold up under review:
No correctness, security, or convention issues found. Test evidence — the PR's own CIThe build failure is gone: The Not verified: no separate sandboxed run — none is needed here. The only behavioural claim is the refusal wording itself, pinned by exact-string assertions that this green suite executed; the test-pinning claims are verified statically above, and CI provided the runtime evidence.
中文说明代码审查构建阻塞已按上一轮建议的既有写法修复,后续提交也经得起核查:
未发现正确性、安全性或规范问题。 测试证据——PR 自己的 CI构建失败已消除:
未验证:未另开沙箱运行——此处无需。唯一的行为主张是拒绝文案本身,已由这套绿色套件实际执行的精确字符串断言钉住;测试钉桩类主张在上文静态核实,CI 提供了运行时证据。 (CI 表格见上方标记区域。) — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 5/5 — the previous blocker is fixed in the exact house style suggested, every follow-up commit maps to a resolved review thread, and the suite that previously never ran is green. Stepping back: the shape of this PR is what makes follow-ups easy to say yes to. The three original changes were already the minimal form of the fix; the four commits since then didn't widen scope — each answers a named review finding, and the answers are the small, structural kind (a cast dropped, an explicit-false leg added, a preamble made neutral, an argument shape shared) rather than feature growth. The R3-1 fix deserves a word: the old preamble would have shipped a refusal that contradicts itself in the setting-driven missing-args case ("no review arguments were recorded…" followed by "The recorded arguments do not bind"), which is exactly the misdirection this PR exists to remove. Catching that in review of the fix, and closing it with a three-word preamble change plus a negative assertion, is the loop working as intended. What remains is mechanical. The web-shell E2E smoke was still running at review time — this PR touches no web-shell paths, so I expect it to land green, but approval waits for CI to settle on the reviewed commit rather than a prediction. The earlier build-failure change requests are answered by this commit series. Approval deferred until CI lands green on 中文说明置信度:5/5——上一个阻塞已按建议的既有写法修复,每条后续提交都对应一条已解决的评审线程,此前从未运行的套件现已全绿。 退一步看:这个 PR 的形态正是让跟进 PR 容易获得肯定的那种。最初的三处改动已是修复的最小形态;此后四个提交没有扩大范围——每条都回应一个已点名的评审发现,且回应都是小而结构性的(去掉转型、补显式 false 分支、前缀改为中性、参数形态共享),而非功能膨胀。R3-1 的修复值得一提:旧前缀会在设置驱动的缺 args 场景下发出自相矛盾的拒绝("no review arguments were recorded…" 之后接 "The recorded arguments do not bind"),恰是本 PR 要消除的误导。在评审修复本身时发现它,并用三个词的前缀改动加一条负断言收掉——这正是评审循环应有的工作方式。 余下是机械性的。审查时 web-shell E2E smoke 仍在运行——本 PR 未触及 web-shell 路径,预期变绿,但批准等待 CI 在被审提交上落定,而非凭预期。此前因构建失败发出的修改请求已由这一系列提交回应。 批准已推迟至 CI 在 — Qwen Code · qwen3.8-max Reviewed at |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
One mechanical fix needed before this can land, @wenshao: the new test in submit.test.ts types const base = { ... } as never and then spreads it (...base), which fails tsc --build with TS2698 — so CI is red and the suite never ran on this commit. The house-style fix (used by authFor in the same file) is to keep the variable plain and cast the literal at the call site: { ...base, defaultComment: true } as never.
Everything else checks out — direction, minimal scope, advice routing, and the mutation pins are all sound. Details in my review comments above. 🙏
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Not explored to full depth (tool budget reached): "This PR is a follow-up to three Suggestion-level findings…": running the 3 touched test files (npm ci in worktree fails repeatedly: ENOTEMPTY/TAR_ENTRY_ERROR during install, consistent with concurrent use of the shared wo…; "This PR is a follow-up to three Suggestion-level findings…": running the three touched test files (parse-args/publish-assets/submit) — npm ci in the worktree failed repeatedly with ENOTEMPTY/TAR_ENTRY_ERROR during extra…; "This PR is a follow-up to three Suggestion-level findings…": npm run typecheck — blocked by the same install failure (low risk: the production change is two string literals inside an existing ternary, and tests use as …; "This PR is a follow-up to three Suggestion-level findings…": none — the planned run of the three affected test files completed successfully.; "This PR is a follow-up to three Suggestion-level findings…": could not execute the three test files — the worktree's node_modules was corrupted on arrival, and three reinstall attempts failed (partial-install state, an ….
中文说明
未探索到全部深度(达到工具调用预算):"This PR is a follow-up to three Suggestion-level findings…":running the 3 touched test files (npm ci in worktree fails repeatedly: ENOTEMPTY/TAR_ENTRY_ERROR during install, consistent with concurrent use of the shared wo…;"This PR is a follow-up to three Suggestion-level findings…":running the three touched test files (parse-args/publish-assets/submit) — npm ci in the worktree failed repeatedly with ENOTEMPTY/TAR_ENTRY_ERROR during extra…;"This PR is a follow-up to three Suggestion-level findings…":npm run typecheck — blocked by the same install failure (low risk: the production change is two string literals inside an existing ternary, and tests use as …;"This PR is a follow-up to three Suggestion-level findings…":none — the planned run of the three affected test files completed successfully.;"This PR is a follow-up to three Suggestion-level findings…":could not execute the three test files — the worktree's node_modules was corrupted on arrival, and three reinstall attempts failed (partial-install state, an …。
— qwen3.8-max via Qwen Code /review (v0.21.11)
Spreading an 'as never' object literal is a tsc --build error (spread of a non-object type), which the CI Test job caught; the cast was unnecessary — the partial object literal typechecks against ReviewWriteRequest directly.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): "This PR is a follow-up to three Suggestion-level findings…": none — all checks completed within budget.; "This PR is a follow-up to three Suggestion-level findings…": I did not execute the test suites ( vitest ) myself; verification was by source-tracing the asserted strings and harness behavior, which for wording-pinning tes…; "You are review agent reverse-audit — Reverse audit agent…": none — all planned checks completed within budget..
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"This PR is a follow-up to three Suggestion-level findings…":none — all checks completed within budget.;"This PR is a follow-up to three Suggestion-level findings…":I did not execute the test suites ( vitest ) myself; verification was by source-tracing the asserted strings and harness behavior, which for wording-pinning tes…;"You are review agent reverse-audit — Reverse audit agent…":none — all planned checks completed within budget.。
— qwen3.8-max via Qwen Code /review (v0.21.11)
…he mock comments - The flag-wording branch of the missing-args-file refusal is now exercised with the explicit defaultComment:false both production callers pass — a presence-check mutation of the ternary no longer survives. - The publish-assets mock-setup comments claimed this file's refusals never touch the loadSettings mock; the handler-path refusal test added in this PR does, so the comments and the guard enumeration now say so.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): "PR #9102 is a follow-up to three Suggestion-level findings…": none — all planned checks completed within budget.; "PR #9102 is a follow-up to three Suggestion-level findings…": did not execute the three changed test files (review worktree has no node_modules; every asserted string was instead verified character-for-character against th….
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"PR #9102 is a follow-up to three Suggestion-level findings…":none — all planned checks completed within budget.;"PR #9102 is a follow-up to three Suggestion-level findings…":did not execute the three changed test files (review worktree has no node_modules; every asserted string was instead verified character-for-character against th…。
— qwen3.8-max via Qwen Code /review (v0.21.11)
A setting-driven missing-args refusal lands in the advice switch's else arm,
whose preamble 'The recorded arguments do not bind this target' presupposed
recorded arguments exist — contradicting the refusal's own 'no review
arguments were recorded'. The preamble is now neutral ('Nothing recorded
authorises binding this target'), covering both a binding miss and a missing
record; the remediation half was already correct.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): "You are review agent reverse-audit — Reverse audit agent…": none — all checks above completed within budget.; "PR #9102 is a follow-up to three Suggestion-level findings…": none — all checks above completed within budget..
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"You are review agent reverse-audit — Reverse audit agent…":none — all checks above completed within budget.;"PR #9102 is a follow-up to three Suggestion-level findings…":none — all checks above completed within budget.。
— qwen3.8-max via Qwen Code /review (v0.21.11)
… legs The refusal leg hand-copied the wiring leg's 9-line handler argument literal; a one-leg-only key rename (silenced by the as-never cast) would leave the suite green while the handler refused for the missing-args class instead of the documented one. Both legs now call a shared runHandler() helper, so that drift is structurally impossible.
|
@qwen-code /triage |
|
Sandboxed verification: ✅ passed — merge-ready (agent verdict) - workflow run Ran the PR in an isolated, token-free container: A/B against the base build, mock-free harness assertions, targeted gates. Advisory evidence for human reviewers — not a review, an approval, or a CI check. Scripted assertions: 50 passed · 0 failed · 50 total 中文 — 判定:✅ 通过 · 可合入(agent 判定)沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查。 脚本断言:50 通过 · 0 失败 · 50 总计 Verification reportPR 9102 — fix(cli): close three review-comment gaps from the #9027 CI reviewVerdict: 中文摘要
Scope
Central claim — A/B (runSubmit level, real stderr, no mocks)Harness
All cells exit 3 on both builds. The S1 base cell is the control proving the bug the PR fixes: a setting-driven operator was advised to re-run with a flag that would not have helped; reproduced end-to-end through the real yargs handler with a real user settings file ( Reviewer Test Plan walk-through
Mutation matrix (vacuity + the PR's mutation-verified claims)Witness:
Every kill landed on the intended assertion (red test names printed in the capture; expected-vs-actual verified in the live runs behind it), not on an import/compile failure; no survivors. M1 additionally proves the new central test non-vacuous; M4 proves the new publish-assets test load-bearing for the operator-scope invariant. Targeted gates
Gate liveness is proven by the matrix: six single-point mutations each reddened the targeted suite. FindingsNo blocking findings. Non-blocking observations:
Not covered
MethodologyEnvironment: Evidence imagesHarness scripts and raw logs are in the workflow run artifacts (7-day retention). — Qwen Code · sandboxed verification |
|
Triage re-run completed without a new review.
The stage comments above were updated with the latest result. View workflow run. 上方各阶段评论已更新为最新结果。查看工作流运行。 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
Not explored to full depth (tool budget reached): "PR #9102 is a follow-up to three Suggestion-level findings…": could not execute the three changed test files — no node_modules in the worktree or parent checkout and a fresh monorepo install was not run; string/predicate…; "PR #9102 is a follow-up to three Suggestion-level findings…": run the four affected vitest suites — no node_modules in the review worktree and no vitest in the parent checkout, so all string/behavior verification above w…; "PR #9102 is a follow-up to three Suggestion-level findings…": none — all checks I opened were completed within budget.; "PR #9102 is a follow-up to three Suggestion-level findings…": none — all checks completed within budget..
中文说明
未发现问题。LGTM!✅
未探索到全部深度(达到工具调用预算):"PR #9102 is a follow-up to three Suggestion-level findings…":could not execute the three changed test files — no node_modules in the worktree or parent checkout and a fresh monorepo install was not run; string/predicate…;"PR #9102 is a follow-up to three Suggestion-level findings…":run the four affected vitest suites — no node_modules in the review worktree and no vitest in the parent checkout, so all string/behavior verification above w…;"PR #9102 is a follow-up to three Suggestion-level findings…":none — all checks I opened were completed within budget.;"PR #9102 is a follow-up to three Suggestion-level findings…":none — all checks completed within budget.。
— qwen3.8-max via Qwen Code /review (v0.21.11)
wenshao
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: build-and-test — build-cli was skipped in CI and its suite did not run locally because packages/core dist cleanup failed with ENOTEMPTY.
中文说明
仅完成部分审查,审查缺口已披露。
未审查:build-and-test — build-cli was skipped in CI and its suite did not run locally because packages/core dist cleanup failed with ENOTEMPTY。
— gpt-5.6-sol via Qwen Code /review (v0.21.11)
yiliang114
left a comment
There was a problem hiding this comment.
Approved as requested.
|
Released in v0.21.12. |


What this PR does
Follow-ups to three Suggestion-level findings from #9027's CI review, all landed on files that belonged to the now-merged #8994:
review.commentauthorises the run and the args record is missing, the refusal no longer says "cannot show that--commentwas requested" — the real blocker is that no recorded invocation names a pull request to bind the write to, and a plain re-run of the review fixes it, while typing--commentdoes not. Flag-driven operators keep the flag wording, and the refusal-advice selection routes the new message to the binding remedy.skipWorkspaceSettingsflag only through a success case whose mock returned the same value as the polluted view. The new test runs the handler with the setting off and no--commentin the recorded arguments, expecting exit code 3 and no gh call; dropping the scope flag turns the refusal into a publish (mutation-verified).Why it's needed
Each gap lets a specific misdirection or regression ship silently: an operator told to type a flag they never needed; a repository-controlled workspace settings file deciding to publish evidence for every reviewer; a warning that sends the operator hunting a setting that is off.
Reviewer Test Plan
How to verify
cd packages/cli && npx vitest run src/commands/review/submit.test.ts src/commands/review/publish-assets.test.ts src/commands/review/parse-args.test.ts) — the new cases pin both regimes.review.comment: truein user settings and no recorded args,qwen review submitrefuses naming the missing invocation rather than a missing flag.Tested on
Risk & Scope
Linked Issues
Follow-up to review findings on #9027 (files from #8994).
中文说明
本 PR 处理 #9027 CI review 的三条 Suggestion 级发现,涉及文件均来自已合并的 #8994:
review.comment设置授权运行而 args 记录缺失时,拒绝理由不再说"无法证明请求了--comment"——真正的阻塞是没有任何记录了 PR 的调用可供绑定写入目标,重新运行评审即可解决,键入--comment并不能。旗标驱动的用户保留旗标措辞,拒绝建议的选择逻辑会把新文案路由到绑定类补救措施。skipWorkspaceSettings旗标。新测试在设置关闭、args 无--comment时运行 handler,断言退出码 3 且未调用 gh;去掉该旗标会让拒绝变成发布(已变异验证)。动机:每个缺口都让一种具体的误导或回归悄悄上线——告诉运营者键入一个他们从未需要的旗标;仓库可控的 workspace 设置文件为每个评审者决定发布证据;警告让运营者去排查一个并未开启的设置。
验证:
cd packages/cli && npx vitest run src/commands/review/submit.test.ts src/commands/review/publish-assets.test.ts src/commands/review/parse-args.test.ts全绿;三条修复均做了变异验证(去掉被钉的机制后新测试变红)。