Repository navigation
test(web-shell): include transcript coverage in recovery fixture - #15883
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
|
|
Thanks for the PR! Template looks good ✓ — all required sections present, and the Chinese translation is complete rather than abbreviated. Problem: observed, not theoretical. I verified the "before" independently through the API rather than taking the description's word for it: job Direction: aligned. Restoring a broken CI signal is squarely in scope, and it unblocks the recovery coverage that #15865 depends on. CHANGELOG: no direct reference needed for a test-only change. Size: not applicable — no core paths. The single changed file is Approach: the scope feels exactly right. Nothing to cut, no drive-by refactors, no formatting churn — one field added to one mock, plus a type assertion that stops the same drift recurring. Linked-issue check: the base is Risk: no elevated risk signals — the Stage 1e high-risk path scan matched nothing (the only changed file is filtered out as a spec file). Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ —— 必填小节齐全,中文翻译也是完整的,没有省略。 问题:是已观测到的故障,不是理论性加固。我没有只采信 PR 描述,而是通过 API 独立核实了"修改前"的证据:任务 方向:对齐。修复已损坏的 CI 信号完全在范围内,并且解除了 #15865 所依赖的恢复流程覆盖的阻塞。CHANGELOG:仅测试改动,无需直接引用。 规模:不适用 —— 未触及核心路径。唯一改动的文件是 方案:范围拿捏得当。没有可砍的部分,没有顺手重构,没有格式化噪音 —— 只在一个 mock 里补了一个字段,外加一个类型断言,防止同类漂移再次发生。关联 issue 检查:base 是 风险:无升级风险信号 —— Stage 1e 高风险路径扫描没有命中(唯一改动的文件作为 spec 文件已被过滤)。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewBefore reading the diff I wrote down what I would do from the title and the "Why it's needed" section alone: find the The substance checks out against the code on
No correctness, security, or regression concerns, and no AGENTS.md violations — no new abstraction, no duplication, no stray comment where the type assertion already carries the intent. One non-blocking nit, take it or leave it: the sibling spec derives I skipped the sequence diagram and the changed-files table: a one-file test-fixture change with no new runtime flow does not earn either. Test evidenceThis is an unattended CI run, so per the gate's rules I did not build, run, or execute anything from this PR — no Nothing is red on this commit. The decisive check — Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Of 33 check-runs on this commit, none has a failure conclusion; the rows not listed above are skipped bot-orchestration jobs (triage, review, verify and tmux plumbing, plus Sandboxed verification would settle the one thing the pending run cannot: Real-scenario testing: N/A. Two independent reasons — this is an unattended CI run, where the gate never drives tmux, and a test-fixture change has no user-visible surface to capture in the first place. Not verified: the post-fix smoke result, because that job has not completed yet. That gap is why the approval below is deferred to green rather than issued now. 中文说明代码审查在读 diff 之前,我先只根据标题和"为什么需要"写下了自己的方案:找到 对照
没有正确性、安全性或回归问题,也没有违反 AGENTS.md —— 没有新增抽象、没有重复代码,类型断言已经表达了意图,因此也没有多余注释。 一个不阻塞的小建议,采纳与否都可以:同级 spec 用的是 序列图和改动文件清单我都省略了:单文件的测试夹具改动、没有引入新的运行时流程,这两者都不值得加。 测试证据这是无人值守的 CI 运行,因此按门禁规则我没有构建、运行或执行本 PR 的任何代码 —— 没有对 PR 代码跑 这个 commit 上没有红灯。决定性的检查 —— (上方表格为机器可读区域,由 finalize 任务维护。) 本 commit 上共 33 个 check-run,没有任何一个结论为 failure;未列出的行都是被跳过的机器人编排任务(triage、review、verify、tmux 相关管道,以及已成功的 沙箱验证可以解决这次待完成运行无法回答的唯一问题: 真实场景测试:N/A。有两个独立原因 —— 这是无人值守的 CI 运行,门禁在此路径下从不驱动 tmux;而且测试夹具改动本身没有可供截取的用户可见界面。 未验证:修复后的 smoke 结果,因为该任务尚未完成。这也是下面的批准被推迟到 CI 变绿、而非现在给出的原因。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 4/5 — clean across every stage; the single reservation is a nit about a hardcoded value, and the only thing missing is a CI result that has not landed yet. Stepping back: this is nine lines that put back a field the API type already declared mandatory, in the shape the neighbouring spec already uses. The reason I am comfortable is not that the diff is small — small diffs can be wrong — but that every link in the chain is independently checkable and I checked each one. The type says The part I would push on if I were being difficult: the author's own "Tested on" table admits static review only, no local test run. For most PRs that would worry me. For this one it is the correct posture, because the oracle is CI — there is no meaningful local way to be more sure than the smoke job that is running right now, and pretending otherwise would just be theatre. That candour in the table is worth something; a vaguer claim of local verification would have been harder to trust. Would I curse or thank whoever wrote this in six months? Thank them. The On scope: nothing to trim, and nothing that belongs in a different PR. On the "is this clearly needed" question the gate is supposed to ask — yes. A red My one reservation is the hardcoded Approval is deferred until CI lands green on 中文说明Confidence: 4/5 —— 各阶段都干净;唯一的保留意见是关于一个硬编码取值的小建议,此外只差一个尚未完成的 CI 结果。 退一步看整体:这九行代码把一个 API 类型早已声明为必填的字段补了回去,而且用的是相邻 spec 已经在用的写法。我之所以放心,不是因为 diff 小 —— 小 diff 一样可以是错的 —— 而是因为这条因果链上每一环都可以独立核实,而我逐环核实过了。类型声明 如果要刻意挑刺,我会挑这一点:作者自己的"已测试的平台"表格承认只做了静态审查,没有在本地跑测试。对多数 PR 这会让我担心,但对这一个恰恰是正确的姿态,因为裁判就是 CI —— 除了此刻正在运行的 smoke 任务,本地没有更有说服力的验证方式,硬要声称做过反而是表演。表格里这份坦诚是有价值的;一句含糊的"已在本地验证"反而更难让人信任。 六个月后维护它,我会骂作者还是感谢作者?感谢。真正值回票价的是 范围方面:没有可裁剪的内容,也没有该拆到别的 PR 的改动。至于门禁该问的"这是否明确需要"——是的。 我唯一的保留意见是 批准推迟到 CI 在 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): "agent reverse-audit (round 1)": did not execute the Playwright suite, so whether the four sibling specs fail or merely degrade in the web-shell-browser-regression job is unconfirmed.; "agent 6b": did not execute the Playwright suite (managed-mcp / managed-usability / managed-draft-retry / managed-context-compression) to observe whether the surviving fixt….
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 1)":did not execute the Playwright suite, so whether the four sibling specs fail or merely degrade in the web-shell-browser-regression job is unconfirmed.;"agent 6b":did not execute the Playwright suite (managed-mcp / managed-usability / managed-draft-retry / managed-context-compression) to observe whether the surviving fixt…。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
Bring the fixture correction from #15883 into this branch to address the observed smoke failure. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
APPROVE @ d1ea5737a3(首票)。
结论:无害的夹具对齐 —— 补的字段就是被测代码现在要读的那个。
JavaAgentTranscript是Schemas['WebShellTranscript']的别名(java-managed-agent-client.ts:90),coveredSequence属该 schema 的字段;夹具原先把transcript/query的响应写成{items, events, lastSequence, hasMore},缺coveredSequence,补上后与真实响应同形。- 改的是 Playwright 夹具的 mock 响应,没有触碰断言,也没有放宽任何期望值。
一条非阻断的自评(就是这 PR 上我那条未决 Suggestion):satisfies JavaAgentTranscript 在 client/e2e/** 里不会被任何 TypeScript 项目求值,所以它挡不住字段漂移,只是文档性标注。真要挡住,得让某个 tsconfig include 这个目录,或改成运行时断言。这不影响本 PR 的作用(补字段),因此不挡合并。
未核:本机没跑该 e2e;head CI 17 success / 50 skipped / 1 in progress、0 红。
Remove the unevaluated transcript type guard and supply required event terminal flags without changing assertions. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline.
Not explored to full depth (tool budget reached): "agent 1a": executing packages/web-shell/client/e2e/managed-recovery.spec.ts under Playwright (needs a bundle build and served shell) — so the three specs were reasoned a….
Deferred under the convergence posture (round 2, not a blocker) — recorded, not requested in this round:
packages/web-shell/client/e2e/managed-recovery.spec.ts:153 — [review] the handoff test never asserts the incomplete-history marker is absent — only one of incompleteHistory's three inputs is exercised
中文说明
已审查。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"agent 1a":executing packages/web-shell/client/e2e/managed-recovery.spec.ts under Playwright (needs a bundle build and served shell) — so the three specs were reasoned a…。
收敛姿态下延后(第 2 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
* fix(ci): use runner temp for Web Shell browser smoke Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): resolve runner temp in the browser step context Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not explored to full depth (tool budget reached): "agent 6b": did not run any lane or Playwright launch to observe the /tmp -pressure failure firsthand, and did not read the PR description/issue for the original error tex….
Not reviewed: reverse audit — stopped before round 1 by the review time budget.
Not linted (tool limitation, not a blocker): .github/workflows/ci.yml — actionlint embedded-shell source mapping is not yet supported.
Deferred under the convergence posture (round 3, not a blocker) — recorded, not requested in this round:
packages/web-shell/client/e2e/managed-recovery.spec.ts:153 — [review] The recovery fixture declares coverage through sequence 6 while returning zero projected Items — a payload the messages view cannot produce, so the handoff assertions nev…
Convergence: round 3 posted 2 inline comment(s), 1 of them reported for the first time; the previous round posted 1 (1 new). The rate of new findings is not falling. Batching the remaining fixes and verifying them before the next push, or dropping this PR's reviews to --severity-floor critical, keeps the loop from re-deriving the same set. (Observation only — nothing was withheld from this review because of this observation.)
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未探索到全部深度(达到工具调用预算):"agent 6b":did not run any lane or Playwright launch to observe the /tmp -pressure failure firsthand, and did not read the PR description/issue for the original error tex…。
未审查:反向审计——评审时间预算不足,未能开始第 1 轮。
未检查(工具限制,非阻断):.github/workflows/ci.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。
收敛姿态下延后(第 3 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
收敛情况:第 3 轮发布了 2 条行内评论,其中 1 条是首次提出;上一轮发布了 1 条(其中 1 条首次提出)。新发现的产出速度没有下降。把剩余修复攒成一批、验证后再推送,或将本 PR 的评审降到 --severity-floor critical,可以避免循环反复推导同一组发现。(仅为观察——本轮评审未因此扣留任何内容。)
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / after✅ No screenshot changes against the PR base. Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
Local merge-reference verification: PASS
Claim 1 — the E2E fixture repair is real and load-bearing
Claim 2 — the
|
Include all terminal turn events and apply disk-backed browser temporary directories to both Chromium gates. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
APPROVE @ c2cbd09675a41712a13cd30d925dce63bede2aa5(重投:push 把我上一轮在 d1ea5737 上的票作废了,那条 satisfies 的 Suggestion 线程也已 resolved)。
增量复核(相对我上次读的 d1ea5737)
satisfies直接删掉了:JavaAgentTranscript的 import 与} satisfies JavaAgentTranscript都不在了,coveredSequence: 6保留。⇒ 我上一轮指出的「client/e2e/**不被任何 tsconfig 求值、这个satisfies挡不住漂移」以「删掉误导性守卫」的方式解决;代价是这条夹具现在完全没有编译期约束,但字段本身与真实响应对齐,这个取舍可以接受。- 事件夹具补全:
terminal由type === 'turn.completed' || 'turn.failed'改成['turn.completed','turn.failed','turn.cancelled'].includes(type)。 TMPDIR扩到两个浏览器 step:不只是Run web-shell browser smoke,Run transcript document browser gate也加上了TMPDIR: ${{ runner.temp }},测试里两条各自toBe('${{ runner.temp }}')钉住。- 注意这条 PR 现在带着 #15884 的提交(
cc83017e的 message 里写着(#15884)),而 #15884 已经 merged(headb94e6d37,状态 closed/merged)。所以等本分支再 merge 一次 main,这两处 TMPDIR 的 hunk 会从 diff 里消失(已在 main 上);现在看到它们是因为 base 还停在619a601b。内容与已合版本一致,合并不冲突,只是别把它们当成「这条 PR 新增的额外收益」。
结论:夹具对齐 + 浏览器临时目录隔离,都是测试侧、无行为放宽;coveredSequence 与 terminal 都只是让 mock 响应同形。
未核:本机没跑该 e2e;head CI 17 success / 76 skipped / 1 cancelled / 1 in progress、0 failure(那 1 条 cancelled 我按取消处理,不读成红)。
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not explored to full depth (tool budget reached): "agent 3b": none — the walk covered all three hunks of the 69-line diff plus the job block, both Chromium gates, the generated transcript schema, and the contract test in c….
Not reviewed: reverse audit — stopped before round 1 by the review time budget.
Not linted (tool limitation, not a blocker): .github/workflows/ci.yml — actionlint embedded-shell source mapping is not yet supported.
Deferred under the convergence posture (round 4, not a blocker) — recorded, not requested in this round:
packages/web-shell/client/e2e/managed-recovery.spec.ts:152 — [review] the recovery fixture returns zero items alongside item-delta events, a shape the daemon stopped producing in #15870, so the handoff assertions never exercise the item pro…
中文说明
仅完成部分审查,审查缺口已披露。
未探索到全部深度(达到工具调用预算):"agent 3b":none — the walk covered all three hunks of the 69-line diff plus the job block, both Chromium gates, the generated transcript schema, and the contract test in c…。
未审查:反向审计——评审时间预算不足,未能开始第 1 轮。
未检查(工具限制,非阻断):.github/workflows/ci.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。
收敛姿态下延后(第 4 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
…15888) * fix(ci): use runner temp for Web Shell browser smoke Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): resolve runner temp in the browser step context Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): partition the complete macOS test suite into bounded jobs Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): account for the macOS aggregate job budget Record the additional five-minute aggregate without changing any test execution timeout. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(install): isolate Windows fixtures from persistent PATH (#15889) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): write the macOS shard matrix in block style and pin its gates The seven-row matrix used YAML flow mappings, which `.yamllint.yml` forbids (`braces: forbid: 'non-empty'`), so the `Run yamllint` step cannot go green on this branch. Rewrite the rows in the block style every other workflow matrix in this repo already uses. Add the test pins the shard plumbing was missing: - the `cli`/`core` dispatch argv, including the bare `--` that keeps `--shard` forwarded to vitest instead of consumed by npm, and the per-group `NODE_OPTIONS` choice - `id: 'install'` on `test_macos_shards`, which the suite's `steps.install.outcome` gate silently reads as '' if it is renamed - the aggregate `test_macos` gate against the shards' gate, so the preserved check name cannot report `skipped` while the legs fail Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-closeout/jmvu6810z1y * fix(ci): preserve shell fixture gates on macOS system Bash Handle empty issue families under nounset without mapfile and explicitly reject either missing OSS credential. Keep failure assertions and include shell diagnostics. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qqqys
left a comment
There was a problem hiding this comment.
APPROVE — Critical-only scan at 767b08c3fd71eb4602a6a753776e346238c28e68 found no blocking defect. All 16 files read; the CI-workflow and partition-runner changes verified line by line.
No historical blocker stands
Four bot rounds filed findings and every one is graded sev:"S" — Suggestions, which do not gate — and round 4 at c2cbd09675 recorded findings:[]. No review on this PR has ever been CHANGES_REQUESTED. The three substantive Suggestions are nonetheless addressed at this head, and I confirmed each in the diff rather than from the replies:
- R1-1 (inert
satisfies JavaAgentTranscript): removed, along with the now-unused import. E2E specs are excluded from the typecheck project, so the annotation was never evaluated — removing it drops no enforcement that existed. - R2-1 (
terminalpredicate omittedturn.cancelled): now['turn.completed','turn.failed','turn.cancelled'].includes(event.type), which aligns the fixture with production instead of hand-rolling a narrower set. - R3-1 (
TMPDIRscoped to one step while the neighbouring step also drives Chromium):env: TMPDIR: '${{ runner.temp }}'is now on both the transcript-document gate and the web-shell browser smoke step.
The partition cannot silently drop coverage
This is the one genuinely risky idea in the PR — replacing npm run test:ci with seven matrix legs — so I checked it as a set-equality question rather than sampling. Root test:ci = test:ci:workspaces && test:scripts, where test:ci:workspaces runs test:ci in every workspace that declares it (--if-present) and test:scripts = test:standalone:runtimes:ci && test:scripts:unit. The partition covers exactly that union and no less:
cli×3 andcore×2 →npm run test:ci --workspace=packages/<g> -- --shard=N/M. Both packages declaretest:cias a barevitest run, so--shardreaches Vitest directly rather than being swallowed by a compound script, and 3/3 + 2/2 shard sets are complete by construction.rest→ enumeratesnpm pkg get scripts.test:ci --workspaces --json, keeps entries whose script is a string, and excludes@qwen-code/qwen-codeand@qwen-code/qwen-code-core. That is precisely the complement of the two heavy groups, so every remaining workspace that the old command ran still runs. New workspace suites are picked up automatically because the list is discovered, not hardcoded.scripts→test:standalone:runtimes:cithentest:scripts:unit, i.e. exactly roottest:scripts.
The name-based exclusion is correct despite the trap in it: packages/cli and the repository root share the package name @qwen-code/qwen-code, which is why the heavy groups select by path (--workspace=packages/cli) while rest excludes by name. npm pkg get --workspaces does not include the root package, so the exclusion can only hit packages/cli, and no third workspace is dropped by it.
NODE_OPTIONS handling is faithful too: the runner sets --max-old-space-size=3072 for every group except scripts, matching the original, where the memory override lived on test:ci:workspaces and never applied to test:scripts.
Every discovery branch fails closed, which is what makes an empty group impossible to mistake for a pass: a non-zero npm pkg get returns its status, an empty remaining-workspace list throws No remaining workspace test suites were discovered, an unrecognised group name throws, and .status ?? 1 turns a signal-killed child into a failure. The scripts group runs both suites and returns standalone || scripts, so neither failure is masked by the other.
The aggregate gate fails closed
test_macos keeps the original Test (macos-latest, Node 22.x) check name, runs under always(), and asserts test "$MACOS_RESULT" = success against needs.test_macos_shards.result. With fail-fast: false every leg runs, and a matrix's aggregated result is success only when all legs succeed — so a failed, skipped or cancelled group, including one that dies before its siblings finish, cannot yield a green aggregate. Preserving the check name is what keeps any existing required-check configuration meaningful. The if on both jobs is the same event-name predicate as before, so pull_request runs skip both, as they did previously.
The test-step guard tightened from skip_ci != 'true' to !cancelled() && steps.install.outcome == 'success' && skip_ci != 'true'. That is strictly fail-closed: a failed install now skips the tests while the job still fails on the install step, rather than running tests against a broken tree. Gating Hosted portable process smoke to matrix.group == 'scripts' runs it once instead of seven times without removing it.
Supporting changes
The .ci-budget entry moves 8 300 4 ci.yml → 9 305 4 ci.yml, which is exactly one added job definition and its 5 declared minutes for the new aggregate, with the shard job inheriting the original 60; the file counts job definitions, not matrix expansion. Lint & Static passes at this head, so the budget gate itself confirms the arithmetic.
The Bash 3.2 repairs are the correct idioms, not workarounds: mapfile (absent on macOS system Bash) becomes an explicit while IFS= read -r accumulation into a pre-initialised job_ids=(), and the four "${arr[@]}" loops become ${arr[@]+"${arr[@]}"}, the standard nounset-safe empty-array form that still preserves per-element quoting. In release-managed-runtime.yml the credential guard keeps identical failure semantics — under set -euo pipefail the old [[ -n … && -n … ]] already aborted — and only adds an explicit ::error:: message and exit 1; it prints a fixed string, so no secret reaches the log.
Residual risk, disclosed rather than blocking
The macOS matrix only triggers on merge_group, schedule and workflow_dispatch, so it has not executed on this PR and nothing here proves all seven legs finish inside their 60-minute limits — that is the property the whole change exists to restore, after run 40885875352 blew the limit twice. The design doc states this plainly, and the contract tests pin the partition shape rather than its runtime. Worth watching the first scheduled run for per-leg duration; a leg that approaches 60 minutes would need re-sharding. This is an absence of evidence about timing, not evidence of a defect, so it does not gate.
CI at this head: 14 checks succeeded, 0 failed, 13 skipped, 3 pending (review-pr, web-shell E2E Smoke, TUI parity snapshots). I did not poll them. Test (ubuntu-latest, Node 22.x), Lint & Static, Integration Tests (no-AK, No Sandbox) and Capture web-shell visuals are green, which is executed evidence for the meta-tests that pin the partition, the budget and the issue-routing shell changes. The pending web-shell E2E Smoke is the lane that would confirm the recovery-fixture repair end to end; the fixture change is small and its reasoning is sound, but that runtime confirmation is still outstanding and the PR body says so.
中文说明
在 767b08c3fd 上执行 Critical-only 扫描,未发现阻塞性缺陷,结论为 APPROVE。16 个文件均已读过,CI 工作流与分组执行脚本逐行核对。
历史意见方面,四轮机器人评审提出的全部为建议级,本身不构成门禁,第四轮结论为零发现,本 PR 也从未出现过要求修改的评审状态。三条有实质内容的建议在此提交上都已处理,且我按差异核对而非采信回复:未被执行的 satisfies 类型约束连同其未使用导入一并移除,由于类型检查本就排除 E2E spec,移除它并没有丢掉任何既有约束;terminal 判定补上了 turn.cancelled,使夹具与生产一致而非自行收窄;TMPDIR 现已同时作用于两个驱动 Chromium 的步骤,而不只是其中一个。
本 PR 唯一真正有风险的想法是用七个矩阵分支替换 npm run test:ci,因此我按集合相等来核对而非抽样。根 test:ci 等于「全部声明了 test:ci 的工作区」加「test:scripts」,而新分组恰好覆盖同一并集且不少:cli 三分片与 core 两分片的 test:ci 都是裸 vitest run,因此 --shard 能直达 Vitest 而不会被复合脚本吞掉,3/3 与 2/2 在构造上即为完整;rest 组通过 npm 工作区元数据枚举并只排除 cli 与 core 两个包名,正好是前两组的补集,新增工作区会被自动纳入;scripts 组等价于根 test:scripts。按包名排除虽有一个陷阱但处理正确——packages/cli 与仓库根包同名 @qwen-code/qwen-code,这正是重型组改用路径选择的原因,而 npm pkg get --workspaces 不含根包,因此该排除只会命中 cli,不会误删第三个工作区。NODE_OPTIONS 的内存上限也与原行为一致:除 scripts 组外都设置,正如原先该覆盖只作用于工作区测试。发现逻辑的每个分支都向失败方向收敛:枚举失败返回其状态码,剩余工作区为空则抛错,未知分组名抛错,子进程被信号杀死时 .status ?? 1 判为失败;scripts 组两套都跑并返回 standalone || scripts,任一失败都不会被掩盖。
聚合门禁同样向失败方向收敛:test_macos 保留原检查名,在 always() 下断言矩阵整体结果为 success,配合关闭 fail-fast,任何失败、跳过或取消的分组都无法让聚合变绿,包括某个分组在其他分组结束前就死掉的情况;两个任务的事件名条件与改动前相同,因此 pull_request 触发时照旧双双跳过。测试步骤的条件由「未跳过 CI」收紧为「未取消且安装步骤成功且未跳过 CI」,这是严格收敛的:安装失败时不再在残缺环境上跑测试,而任务仍因安装步骤失败。把便携进程冒烟限定到 scripts 组,是从跑七次变为跑一次,并未删除。
配套改动方面,.ci-budget 由 8 300 4 改为 9 305 4,正好对应新增一个任务定义及其 5 分钟声明超时,分片任务继承原有 60 分钟,该文件统计的是任务定义而非矩阵展开;本提交的 Lint 任务通过,等于预算门禁自身确认了这笔算术。Bash 3.2 兼容修复用的是正确写法而非绕过:mapfile 换成对预初始化数组的显式 while read 累加,四处数组遍历换成 nounset 下安全的空数组展开写法且仍保留逐元素引号;发布工作流的凭证校验失败语义不变(set -euo pipefail 下原写法本就会中止),只增加了显式错误信息与 exit 1,且输出为固定字符串,不会把密钥写进日志。
需要说明但不构成阻塞的残留风险:macOS 矩阵只在 merge_group、schedule 与 workflow_dispatch 触发,因此本 PR 上并未真正执行,也就无法证明七个分支都能在 60 分钟内跑完——而这恰恰是本次改动想要恢复的性质(此前有运行两次超时)。设计文档已如实说明,契约测试锁定的是分组结构而非运行时长。建议关注首次定时运行的各分支耗时,接近 60 分钟的分支需要重新分片。这是缺少时长证据,不是缺陷证据,因此不作为门禁。
本提交 CI:14 项通过、0 项失败、13 项跳过、3 项进行中,我未轮询。Node 测试、Lint、集成测试与视觉捕获均已通过,等于为锁定分组结构、预算与问题路由 shell 改动的元测试提供了执行证据;仍在进行中的 Web Shell 冒烟任务才是端到端确认恢复夹具修复的那条通道,夹具改动本身很小且推理成立,但该运行时确认尚未完成,PR 描述也已如实说明。
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
不投批准(这是 COMMENT):这个 head 已经不是「夹具对齐」那 15 行,而是几条已合并 PR 的并集,且其中至少一个文件与当前 main 不一致。
观测到的事实
- 体积与提交:head
767b08c3fd,+435/−89、5 个提交。第 5 个提交的 message 是fix(ci): partition the complete macOS test suite into bounded jobs (#15888);第 3 个是fix(ci): use runner temp for Web Shell browser smoke (#15884)。 - 两个来源 PR 都已合并:#15884
merged_at=2026-10-29T19:42:34Z(headb94e6d37)、#15888merged_at=2026-10-30T05:50:51Z(head43980421)。它们的改动因此已经进了 main,却又作为本分支的提交重新出现在这条 PR 的 diff 里(cherry-pick 形态,不是 merge)。 - diff 里还有我没有归属的两处:
.github/workflows/main-ci-failure-issue.yml(+10/−7)与.github/workflows/release-managed-runtime.yml(+4/−1)。这两个文件不在 #15884/#15888 的改动面里。 main-ci-failure-issue.yml与当前 main 实质不同(我取了 head 与main两份原文对比):head 是 bash 3.2 兼容写法 ——job_ids=()+while IFS= read -r job_id; do job_ids+=("${job_id}"); done < <(...),并用${job_ids[@]+"${job_ids[@]}"}/${family[@]+"${family[@]}"}的空数组保护;main 上是mapfile -t job_ids < <(...)与"${job_ids[@]}"。也就是说这个文件在两个分支上是两套写法,合并时要么冲突、要么把其中一侧覆盖掉 —— 这不是我能靠读 diff 替作者裁定的。
为什么不投:我上一轮那张票(5707635250 @ c2cbd096)对应的是 +15/−3 的纯夹具版本:coveredSequence、terminal 加 turn.cancelled、两处 TMPDIR。现在 diff 里属于本 PR 自己的原创内容只是其中很小一块,其余是别人的、已经落地的东西 + 两处来源不明的 workflow 改动。在这种形态上投批准,等于给「我没逐条核过的 435 行」背书。
建议(做完我立刻重投):把分支 rebase/merge 到当前 main 上,让 #15884/#15888/#15889 的内容从 diff 里消失,只留本 PR 自己要的夹具改动;顺带确认 main-ci-failure-issue.yml 与 release-managed-runtime.yml 是保留 main 侧、还是确实要改(若是后者,请说明来源 PR 与理由)。
qqqys 已经在这个 head 上投了 APPROVE,所以 rd 的缺口不是我这张;我的意见是「这个 head 的内容构成需要先澄清」。线程 3 条、0 未决。
|
Checked the provenance this review asks about, and the premise does not hold at this head.
The two workflow files come from I also merged current |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: build-and-test — "Test (macos-latest, Node 22.x)" and the macOS shard legs were skipped in CI on this pull request, and no macOS lane (nor bash 3.2) ran locally.
Not explored to full depth (tool budget reached): "agent reverse-audit (round 3)": could not execute scripts/tests/macos-ci-groups.test.js , ci-platform-lanes.test.js or hosted-process-ci.test.js — the review worktree has no node_modules…; "agent reverse-audit (round 2)": could not execute the changed suites — the review worktree has no node_modules ( scripts/tests/vitest.config.ts also needs corepack-warmup ), so macos-ci-g….
Not linted (tool limitation, not a blocker): .github/workflows/ci.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/main-ci-failure-issue.yml — actionlint embedded-shell source mapping is not yet supported; .github/workflows/release-managed-runtime.yml — actionlint embedded-shell source mapping is not yet supported.
中文说明
仅完成部分审查,审查缺口已披露。
未审查(原文为英文):build-and-test — "Test (macos-latest, Node 22.x)" and the macOS shard legs were skipped in CI on this pull request, and no macOS lane (nor bash 3.2) ran locally.
未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 3)":could not execute scripts/tests/macos-ci-groups.test.js , ci-platform-lanes.test.js or hosted-process-ci.test.js — the review worktree has no node_modules…;"agent reverse-audit (round 2)":could not execute the changed suites — the review worktree has no node_modules ( scripts/tests/vitest.config.ts also needs corepack-warmup ), so macos-ci-g…。
未检查(工具限制,非阻断):.github/workflows/ci.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/main-ci-failure-issue.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持;.github/workflows/release-managed-runtime.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| const metadata = spawn( | ||
| 'npm', | ||
| ['pkg', 'get', 'scripts.test:ci', '--workspaces', '--json'], | ||
| { encoding: 'utf8' }, | ||
| ); |
There was a problem hiding this comment.
[Suggestion] R5-1: The rest group's workspace-discovery call captures npm's stderr and never reads it. It passes only { encoding: 'utf8' }, so stdio defaults to pipe; when npm pkg get scripts.test:ci --workspaces --json exits non-zero — a malformed workspace manifest, or an npm-side error on the macOS host — the function returns the status and the step log carries no reason at all. The same silence hides a spawn that never started (status: null) and one killed by a signal. Every other npm call in this file goes through run(), which uses stdio: 'inherit', so this is the file's only silent path — and it is the one the design doc leans on when it says workspace discovery fails closed.
Witness:
stub npm printing "npm ERR! code EWORKSPACES boom" to stderr, exit 2
as committed exit=2 stderr=[]
stdio: ignore/pipe/inherit exit=2 stderr=[npm ERR! code EWORKSPACES boom]
| const metadata = spawn( | |
| 'npm', | |
| ['pkg', 'get', 'scripts.test:ci', '--workspaces', '--json'], | |
| { encoding: 'utf8' }, | |
| ); | |
| const metadata = spawn( | |
| 'npm', | |
| ['pkg', 'get', 'scripts.test:ci', '--workspaces', '--json'], | |
| { encoding: 'utf8', stdio: ['ignore', 'pipe', 'inherit'] }, | |
| ); |
scripts/tests/macos-ci-groups.test.js already asserts that this failure path returns npm's own status, so keep returning metadata.status rather than a bare 1. To pin the diagnostics, extend the fails closed when workspace discovery fails or yields no suites case with a mock returning { status: 1, stderr: 'npm ERR! …' } and assert that text reaches stderr — it stays green today with the output still swallowed.
中文说明
rest 分组的 workspace 发现调用会捕获 npm 的 stderr 却从不读取。它只传了 { encoding: 'utf8' },stdio 因此默认为 pipe;当 npm pkg get scripts.test:ci --workspaces --json 以非零退出时(某个 workspace 的 manifest 损坏,或 macOS 主机上的 npm 出错),函数只返回状态码,步骤日志里没有任何原因。同一种静默也掩盖了进程根本没起来的 status: null 和被信号杀死的 signal 情况。本文件其他 npm 调用都走 run() 的 stdio: 'inherit',所以这是唯一一条静默路径——而它恰好是设计文档里“workspace 发现失败即 fail closed”所依赖的那条。
修改建议:给发现调用加 stdio: ['ignore', 'pipe', 'inherit'](stdout 仍需管道以读取 JSON),失败时把 metadata.stderr / metadata.error 写出去。测试方面请保留返回 npm 原始状态码的约定,并在失败用例中断言错误文本确实到达 stderr。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| - name: 'Require every macOS test group to pass' | ||
| env: | ||
| MACOS_RESULT: '${{ needs.test_macos_shards.result }}' | ||
| run: 'test "$MACOS_RESULT" = success' |
There was a problem hiding this comment.
[Suggestion] R5-2: The only step of the preserved Test (macos-latest, Node 22.x) check produces no output on any path, because test writes nothing. When a shard leg fails or hits its cap, the reader gets a red check that never says which of failure, cancelled or skipped fired, and nothing points at the leg to open — while the check name still says macos-latest although the job now runs on ubuntu-latest. This is the check name people already have in their muscle memory from when it was the macOS test job, so the wrong first inference is the available one.
Witness:
MACOS_RESULT=[failure] exit=1 output=[]
MACOS_RESULT=[cancelled] exit=1 output=[]
MACOS_RESULT=[skipped] exit=1 output=[]
MACOS_RESULT=(empty) exit=1 output=[]
| run: 'test "$MACOS_RESULT" = success' | |
| run: |- | |
| echo "test_macos_shards result: ${MACOS_RESULT}" | |
| test "$MACOS_RESULT" = success |
The companion test must keep failing for all four values, so the test line stays last; only its step.run equality needs relaxing to cover both lines — that negative loop is what stops the assertion from being dropped later.
中文说明
保留下来的 Test (macos-latest, Node 22.x) 检查只有一个步骤,而 test 在任何路径上都不产生输出。当某个分片失败或超时,读者只看到一个红色检查,看不出结果是 failure、cancelled 还是 skipped,也没有任何指向具体分片的线索——而检查名仍写着 macos-latest,实际上该任务已跑在 ubuntu-latest 上。这个检查名正是大家记忆里“macOS 测试任务”的名字,因此最容易得出的错误推断反而最顺手。
修改建议:在断言之前先 echo 出 MACOS_RESULT。四种非 success 值必须仍然失败,因此 test 保持为最后一行,只把测试里对 step.run 的相等断言放宽为覆盖两行——那个四值反向循环正是防止断言被删掉的护栏。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
|
|
||
| - name: 'Run tests and generate reports' | ||
| if: "${{ needs.classify_pr.outputs.skip_ci != 'true' }}" | ||
| if: "${{ !cancelled() && steps.install.outcome == 'success' && needs.classify_pr.outputs.skip_ci != 'true' }}" |
There was a problem hiding this comment.
[Suggestion] R5-3: This condition is new on the macOS suite step, and nothing pins it. The identical string is asserted in scripts/tests/hosted-process-ci.test.js, but only for the test_windows suite; for test_macos_shards the tests check that the install step is still called install, never that this reference names it. Rename the reference — steps.install.outcome to steps.setup.outcome, or "fix" it after someone renames the step — and the expression resolves to the empty string, '' == 'success' is false, and Run tests and generate reports is skipped on all seven legs. Every leg concludes success, the aggregate's test "$MACOS_RESULT" = success passes, and the macOS lane is permanently green having executed zero tests. The neighbouring test names this exact failure mode in its own comment ("An unknown step id reads as '' and silently disables the condition above").
Witness:
$ grep -rn 'steps.install.outcome' scripts/tests .github/scripts
scripts/tests/hosted-process-ci.test.js:293
# that entry's `step` is 'Hosted process suite' — i.e. test_windows
# no assertion reads the `if` of test_macos_shards' 'Run tests and generate reports'
// scripts/tests/hosted-process-ci.test.js, next to the existing install-id case
expect(
ci.jobs.test_macos_shards.steps.find(
(s) => s.name === 'Run tests and generate reports',
).if,
).toBe(
"${{ !cancelled() && steps.install.outcome == 'success' && needs.classify_pr.outputs.skip_ci != 'true' }}",
);Add that assertion and remove steps.install from the workflow line to see it go red — that mutation is exactly the silent-green regression this pins.
中文说明
这个条件是本次新增的,但没有任何断言约束它。同样的字符串在 scripts/tests/hosted-process-ci.test.js 里有断言,不过只针对 test_windows 套件;对 test_macos_shards,测试只检查安装步骤仍叫 install,从不检查这个引用指向它。一旦引用被改名(steps.install.outcome 变成 steps.setup.outcome,或有人重命名步骤后顺手“修正”成旧 id),表达式会解析为空字符串,'' == 'success' 为假,Run tests and generate reports 在全部七个分片上被跳过。七个任务都记为成功,汇总检查通过,macOS 车道在零测试执行的情况下永久为绿。相邻测试的注释已经点明了这个失效模式。
修改建议:把该步骤的 if 加进 hosted-process-ci.test.js 的断言(与已有的 install id 用例并列),并用 toBe 断言完整表达式。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| if ( | ||
| process.argv[1] && | ||
| resolve(process.argv[1]) === fileURLToPath(import.meta.url) | ||
| ) { | ||
| process.exitCode = runMacOsGroup(process.argv[2], process.argv[3]); |
There was a problem hiding this comment.
[Suggestion] R5-4: The workflow runs this file as a program, but no test ever executes it. All five cases import the module and call runMacOsGroup() with a mock spawn; the only production caller is node scripts/run-macos-ci-group.js "$MACOS_TEST_GROUP" "$MACOS_TEST_SHARD", and the other references in the tree are string pins. So the main-module guard, the argv[2]/argv[3] mapping and the process.exitCode propagation have no coverage at all. An edit that breaks the wiring rather than the logic — a basename-style check, the two lines moved into an uncalled main(), an argv off-by-one — makes that command exit 0 having run nothing: the step is green, the leg is green, the aggregate is green, and all seven macOS legs report success while executing zero tests.
Witness:
$ node scripts/run-macos-ci-group.js bogus ''
exit=1
Error: Unknown macOS test group: bogus
at file:///.../scripts/run-macos-ci-group.js:63:22
# the guard works today; nothing would notice its removal
// scripts/tests/macos-ci-groups.test.js
it('dispatches through the CLI entry', () => {
expect(() =>
execFileSync(process.execPath, ['scripts/run-macos-ci-group.js', 'bogus', ''], {
stdio: 'pipe',
}),
).toThrow(/Unknown macOS test group/);
});Add that subprocess case and delete the guard block to see it go red.
中文说明
工作流是以“直接运行脚本”的方式调用这个文件的,但没有任何测试真正执行它。五个用例都只是 import 模块并用 mock spawn 调用 runMacOsGroup();生产路径只有 node scripts/run-macos-ci-group.js "$MACOS_TEST_GROUP" "$MACOS_TEST_SHARD",别处的引用都只是字符串断言。因此 main 模块判断、argv[2]/argv[3] 映射以及 process.exitCode 传递完全没有覆盖。一旦有人破坏的是接线而非逻辑(换成 basename 判断、把两行搬进没人调用的 main()、argv 偏一位),该命令会以 0 退出且什么都没跑:步骤是绿的、分片是绿的、汇总是绿的,七个 macOS 分片全部报成功,实际执行了零个测试。
修改建议:在 scripts/tests/macos-ci-groups.test.js 增加一个子进程用例,用 execFileSync(process.execPath, ['scripts/run-macos-ci-group.js', 'bogus', '']) 断言以非零退出并在 stderr 出现 Unknown macOS test group。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| function prepareWindowsCommand(command, env = {}, baseEnv = process.env) { | ||
| const commandEnv = { ...baseEnv, ...env }; | ||
| // USERPROFILE does not isolate the account's persistent registry PATH. | ||
| const commandEnv = { ...baseEnv, QWEN_NO_MODIFY_PATH: '1', ...env }; |
There was a problem hiding this comment.
[Suggestion] R5-5: Defaulting QWEN_NO_MODIFY_PATH=1 here removes the last execution of the Windows installer's persistent-PATH write. prepareWindowsCommand is the single funnel for every Windows end-to-end install, so after this change no test lets install-qwen-standalone.bat reach its persistent-PATH branch. The assertion added alongside the opt-out checks only the absence direction, and a never-written PATH satisfies an absence check for free. Delete call :MaybeUpdatePath "!EXTRA_BIN!" (or make :MaybeUpdatePath a no-op) and every Windows test stays green while the installer's one user-visible Windows integration — qwen on PATH after install — regresses silently.
Witness:
$ grep -rn 'QWEN_NO_MODIFY_PATH' scripts/tests
install-script.test.js:500 (expected env)
install-script.test.js:1418 (ps1 source text)
install-script.test.js:6075 (the injection)
call sites passing '0' to opt back in: 0
both `call :MaybeUpdatePath` sites (bat:1087, bat:1332) are gated on NO_MODIFY_PATH != 1
To pin it, add one case that snapshots the User PATH, installs with QWEN_NO_MODIFY_PATH: '0', asserts installRoot is appended, and restores the original value; removing call :MaybeUpdatePath must make that case red.
The positive test has to snapshot and restore the registry value: the installer's PATH_SCOPE accepts only user or machine, so there is no process-scope run that avoids the registry.
中文说明
在这里默认注入 QWEN_NO_MODIFY_PATH=1,等于移除了 Windows 安装器“写入持久 PATH”分支的最后一次执行。prepareWindowsCommand 是所有 Windows 端到端安装的唯一入口,所以改动之后没有任何测试会让 install-qwen-standalone.bat 走到持久 PATH 分支。与开关一起新增的断言只检查“不包含”这一侧,而一个从未被写入的 PATH 天然满足“不包含”。删掉 call :MaybeUpdatePath "!EXTRA_BIN!"(或把 :MaybeUpdatePath 改成空操作),所有 Windows 测试仍然全绿,而安装器唯一对用户可见的 Windows 集成——安装后 qwen 进入 PATH——会静默回归。
修改建议:为大批用例保留该开关,另加一个显式开启的用例:先快照用户 PATH,以 QWEN_NO_MODIFY_PATH: '0' 安装,断言 installRoot 被追加,最后在 finally 中恢复。由于 PATH_SCOPE 只接受 user/machine,该用例必须快照并恢复注册表值,无法用进程级 PATH 绕开。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| job_ids=() | ||
| while IFS= read -r job_id; do | ||
| job_ids+=("${job_id}") | ||
| done < <( |
There was a problem hiding this comment.
[Suggestion] R5-6: The constraint these rewrites obey is stated at no code site and enforced by no check, so the next cleanup pass will simplify them back. Every job in this file is runs-on: ubuntu-latest with shell: bash (5.2), so nothing in production evaluates this shell under bash 3.2. The only consumer that does is scripts/tests/main-ci-failure-issue-workflow.test.js, which spawns bash from PATH — /bin/bash 3.2 on macos-latest, newly reached because this PR moves the scripts suite into the macOS shards job. The real rule is therefore "this ubuntu-only workflow may use no bash-4 construct", and neither the workflow nor any test says so. Someone writing mapfile -t job_ids < <(...) next year — the idiom this diff deletes, and the natural one for the only runtime that executes it in production — passes lint, typecheck and every Linux lane, because the Linux pin here is text-only; only the macOS nightly reddens, in a file with no macOS connection.
Witness:
not run — no macOS host and no bash 3.2 binary on this runner
defaults.run.shell: 'bash'; every job: runs-on: 'ubuntu-latest'
grep -rn '3\.2' .github/workflows/ -> 0 hits
scripts/tests/main-ci-failure-issue-workflow.test.js:446,2013,2071,2728
spawnSync('bash', ['-eo','pipefail','-c', step.run])
Either add one guard in scripts/tests/ that scans the executed run: bodies for bash-4-only constructs (mapfile, readarray, declare -A, ${v,,}), or at minimum a comment at the first workaround saying that the macOS scripts lane replays this step's text under the system bash 3.2 — otherwise the idiom has no other reason to exist and reads as noise.
中文说明
这次改写所遵循的约束,在代码里没有任何地方写明,也没有任何检查在强制执行,所以下一轮清理很可能把它“简化”回去。本文件所有任务都是 runs-on: ubuntu-latest + shell: bash(5.2),生产路径根本不会用 bash 3.2 执行这段 shell。唯一会在 3.2 下执行它的是 scripts/tests/main-ci-failure-issue-workflow.test.js——它从 PATH 取 bash,在 macos-latest 上就是 /bin/bash 3.2,而本 PR 把脚本套件挪进 macOS 分片任务后,这条路径才第一次被真正走到。因此真正的规则是“这个只在 ubuntu 上跑的工作流不得使用 bash 4 语法”,但工作流和测试都没有写、也没有检查。下次有人写出 mapfile -t job_ids < <(...)(正是本次删掉的写法,也是唯一真正执行它的运行时最自然的写法),lint、类型检查和所有 Linux 车道都会通过——因为这里的 Linux 断言只是文本断言——只有与该文件毫无关系的 macOS 夜间车道会变红。
修改建议:在 scripts/tests/ 加一处守卫,扫描被执行的 run: 正文中是否出现 bash 4 专有构造;或至少在首个 workaround 处加注释,说明 macOS 脚本车道会用系统 bash 3.2 回放该步骤。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
| needs: 'test_macos_shards' | ||
| if: |- | ||
| ${{ | ||
| always() && ( |
There was a problem hiding this comment.
[Suggestion] R5-7: The pre-split naming survives in several places this diff makes false, and the most consequential one teaches reviewers how to write a lane finding. packages/cli/src/commands/review/lib/path-rules.ts:133 still reads "test_macos is merge_group-only and runs npm run test:ci → test:scripts"; after this change the job named test_macos runs neither — it is a five-minute aggregate on ubuntu-latest whose only step is a string comparison, and the suite job is test_macos_shards running node scripts/run-macos-ci-group.js. A reviewer or review agent handed that path rule (it attaches to exactly the files this PR touches) opens test_macos, finds an env comparison, and either drops a real macOS-lane finding below the rule's "name the lane" bar or attaches the consequence to a gate that cannot exhibit it. The same drift is in ci.yml:35 ("a nightly run is exactly two jobs" — it is now three), ci.yml:811 (the sampler block it describes now lives on test_macos_shards), ci.yml:1986, and the title at scripts/tests/ci-platform-lanes.test.js:504, which still says "exactly the two lanes" over a body that now asserts three.
Witness:
path-rules.ts:133 "test_macos is merge_group-only and runs npm run test:ci -> test:scripts"
ci.yml:1868 run: 'test "$MACOS_RESULT" = success'
ci.yml:1978 node scripts/run-macos-ci-group.js "$MACOS_TEST_GROUP" "$MACOS_TEST_SHARD"
ci.yml:35 "so a nightly run is exactly two jobs" (three jobs are schedule-gated)
Fix the spellings in path-rules.ts:133, path-rules.test.ts:357, ci.yml:35/:811/:1986, the two qwen-*-workflow.test.js comments, and the ci-platform-lanes.test.js:504 title.
中文说明
拆分之前的命名在多处保留了下来,而本次改动恰好让它们变成错的;其中影响最大的一处,正是教评审者如何描述车道问题的范例。packages/cli/src/commands/review/lib/path-rules.ts:133 仍写着“test_macos 只在 merge_group 上跑并执行 npm run test:ci → test:scripts”;改动之后,名为 test_macos 的任务两者都不做——它变成 ubuntu-latest 上只做字符串比较的五分钟汇总任务,真正跑套件的是执行 node scripts/run-macos-ci-group.js 的 test_macos_shards。评审者或评审 agent 拿到这条路径规则(它正好挂在本 PR 触及的文件上)打开 test_macos,看到的是环境变量比较,于是要么把真实的 macOS 车道问题按“说不出车道”降级丢掉,要么把后果挂到一个根本不会出现该问题的门禁上。同样的漂移还出现在 ci.yml:35(“夜间运行恰好两个任务”,现在是三个)、ci.yml:811(它描述的采样块现在在 test_macos_shards)、ci.yml:1986,以及 scripts/tests/ci-platform-lanes.test.js:504 的标题——标题仍写“恰好两个车道”,而测试体已经断言三个。
修改建议:把上述位置的 test_macos 全部改为 test_macos_shards,并把测试标题改为三个车道。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
|
Independently verified R5-8 against both sides, because it is the only finding here marked Critical and its mechanism is checkable end to end. It holds, and it is introduced by this PR rather than pre-existing. The classifier's exemption set is exactly one shape. select(([(.steps // [])[] | select(.conclusion == "failure") | .name] | index("Report the tier result")) | not)then requires The new aggregate is that same derivative shape and is not in the set. It is a regression, not a pre-existing shape. On Minimal fix, in this PR. Extend that one filter to also exclude the aggregate's step name — the same reasoning the comment above it already gives for select(([(.steps // [])[] | select(.conclusion == "failure") | .name]
| index("Report the tier result") or index("Require every macOS test group to pass")) | not)The alternative — giving the aggregate its own annotation — would be worse, because it would then have to re-derive the shard's liveness to decide whether to annotate, which is the classifier's job, not a reporter's. One note on the review as a whole: the body says "nothing here is a blocker" while R5-8 is marked Critical and describes a lost auto-recovery path, so the verdict is right to block and the summary sentence is what reads wrong. I did not touch the branch — the three-hour-old head is the owner's to land. |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Fixed R5-8 in Local verification: 217/217 tests passed across the two affected workflow-meta suites; changed-file Prettier/ESLint and whitespace checks passed. Ten matched executions of the original classifier shell confirm the old aggregate case returned R5-1–R5-7 remain deferred Suggestions after the fifth review round: npm discovery diagnostics, aggregate log output, additional condition/CLI coverage, persistent Windows PATH coverage, bash compatibility documentation and stale lane names. This batch changes only the classifier and its focused regression coverage; it does not claim those suggestions are fixed. The previously documented #15884/#15888 stack remains in this branch and is not treated as duplicated main content. Scope: the earliest available reviewed baseline changed one fixture (+8/−1); the current stack changes 16 files, and this repair adds +29/−5 across two existing files. The wider stack's provenance is disclosed above and in the PR description; whole-PR scope confidence remains uncertain. No new review request, approval dismissal or merge was performed. 中文说明已修复 R5-8:只按失败步骤排除 macOS 汇总任务这类派生失败;真实测试失败仍上报,汇总任务自身 runner 死亡仍参与基础设施分类。两项相关测试共 217 项通过,10 次原始 shell 前后对照也符合预期;这不是实际 macOS 夜间任务或 GitHub 自动重跑验收。探针在全部用例完成后仅记录元数据时超出缓冲区,结果已恢复,未重跑成功用例。其余七条建议依照五轮后的 Critical-only 范围保留后续,不宣称已修复。没有合并或重新催审。 The obsolete blocking verdict on |
R5-8 fixed by 16ad516. Exact classifier before/after shell cases and217workflow tests pass; evidence/disposition: issuecomment-6518446816. Remaining R5-1–R5-7 are Suggestions explicitly deferred under Critical-only scope. No approval is granted; current-head checks and two approvals remain required.
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Not linted (tool limitation, not a blocker): .github/workflows/main-ci-failure-issue.yml — actionlint embedded-shell source mapping is not yet supported.
Round shape: this re-review ran as a fix-audit round under the critical posting posture (engaged by the round schedule) — the territory fan-out covered the commits since the previous round (no still-clean importer re-entered the scope), and the reverse-audit waves re-launched delta territories under the ordinary retirement rules (a twice-dry one only on its cold-check rounds) and non-delta chunks the previous waves could not certify dry (a yield, an uncertified receipt, or no audit history keeps a chunk in the wave; a dry receipt returns it to the ordinary retirement rules when it shares its launch with a yield or uncertified receipt — rounds 1 and 2, the convergence pair, are one launch — was built on the same findings-list bytes as one, was built before one came back, or ran in a different session from some earlier return that was not dry, or beside one no session stamped). Findings below Critical were recorded and deferred, never posted — except pre-confirmed [build]/[test]/[probe] findings, which stay inline at any floor.
Deferred under the convergence posture (round 6, not a blocker) — recorded, not requested in this round:
.github/workflows/main-ci-failure-issue.yml:382 — [review] The macOS step-name exemption is a hand-copied literal from ci.yml with nothing binding the two spellings — a step rename silently reinstates the R5-8 regression with every test gre….github/workflows/main-ci-failure-issue.yml:834 — [test] The five load-bearing family / family_ordered empty-array guards carry no test pin while the two inert job_ids guards are pinned by exact shapescripts/tests/main-ci-failure-issue-workflow.test.js:2310 — [review] classify() spawns bash -c without the runner's -eo pipefail, so an aborting infra step would stay green in every case that runs through it
中文说明
未检查(工具限制,非阻断):.github/workflows/main-ci-failure-issue.yml——actionlint 对 workflow 内嵌 shell 的源映射尚未支持。
轮次形态:本次 re-review 以 critical 发布姿态下的 fix-audit 轮运行(由轮次日程触发)——领地扇出只覆盖上一轮以来的 commits(没有仍然干净的 importer 重新进入范围),反向审计各波按普通退役规则重发 delta 领地(两次干燥的只在其冷检轮重发),并重发此前各波未能证实干燥的非 delta chunk(出过发现、收据未认证或无审计历史,都会让 chunk 留在波内;干燥收据若与出过发现或未认证的收据属于同一次启动——第 1、2 轮的收敛对算作一次启动——或与之使用字节完全相同的发现清单,或构建于这类收据返回之前,又或与此前某个非干燥返回不在同一个会话里(或该返回没有会话戳),则该 chunk 回到普通退役规则)。低于 Critical 的发现只记录延后,不发布——除了预确认的 [build]/[test]/[probe] 发现,它们在任何下限下都留在行内。
收敛姿态下延后(第 6 轮,非阻断)——已记录,本轮不要求修改:共 3 条(原文未翻译,列表见上方英文部分)。
— deepseek-v4.1-flash-1017@e6bf8ffe via Qwen Code /review (v0.26.4)
qqqys
left a comment
There was a problem hiding this comment.
APPROVE — Critical-only scan at 16ad5167348cdbf3c8e5bfc898f67704977a3834. The single Critical ever filed on this PR is fixed at this head, and I verified the fix in the code and its regression test rather than from the author's report.
My earlier APPROVE at 767b08c3fd now shows as DISMISSED. That is a stale-head dismissal caused by this push, not a finding against that revision — recording it so the next reader does not read it as one.
R5-8 (Critical): fixed
The finding was that the new test_macos aggregate is a derivative failure mirror — it runs under always(), needs test_macos_shards, fails whenever a shard fails, and its single step emits no infrastructure annotation — while main-ci-failure-issue.yml exempted exactly one such shape (Report the tier result). So a macOS nightly where one leg died with an annotated infra signature would tally total=2, infra=1, fail the infra == total test, skip rerun_infra, and file a tracking issue instead of auto-rerunning: a genuine loss of flake auto-recovery, introduced by this PR rather than pre-existing.
The classifier filter is now:
select(([(.steps // [])[] | select(.conclusion == "failure") | .name]
| map(select(. == "Report the tier result" or . == "Require every macOS test group to pass"))
| length) == 0)Four properties make this correct rather than merely plausible:
- The step name matches
ci.ymlverbatim. The aggregate's only step is namedRequire every macOS test group to pass. A one-character drift would have left the exemption inert and the regression silently in place, so I compared the two strings directly. - It avoids the trap the finding named. The recommendation was explicit that appending to the old form yields
(length == 0) | not, which filters out every failed job and silences the whole reporter. The landed form ismap(select(...)) | length == 0— no trailingnot. - Existing behaviour is preserved exactly. Failing steps
["Report the tier result"]→length 1→ excluded, asindex(...) | notdid before. Failing steps["Run tests"]→length 0→ counted, asnull | notdid before. The change is purely additive. - The exemption stays keyed on the failing step, not the job. That is the property the adjacent comment states and the retained
keeps counting the reporter when its own runner died before any stepcase pins: when a mirror's own runner dies, no step has failed, the list is empty,length == 0holds, and the job still counts with its GitHub-generated annotation. Keying on job name would have broken that.
The regression coverage is mutation-sensitive in both directions, which is what stops it being a decorative test. The new parametrized case drives the classifier with a failed shard (Run tests and generate reports) plus the failed aggregate, and asserts:
No space left on deviceon the shard →infra_only=true— the exact regression scenario, which the old code answeredfalse. Dropping the new step name from the jq turns this red.AssertionError: expected the daemon to answeron the shard →infra_only=false— proving the exemption is not a blanket pass and a real unannotated test failure still files an issue.
The verbatim infraStep string pin also moved with the jq text, as the finding required; had it not, the meta-test would either fail or pin a string the workflow no longer contains.
The rest of the head is unchanged from what I already verified
The delta from 767b08c3fd is two files, +29/−5, entirely inside the classifier and its meta-test. It touches none of the anchors I checked line by line at the previous head, so those conclusions carry forward unchanged:
- The macOS partition cannot silently drop coverage.
cli×3 shards andcore×2 shards both run a barevitest run, so--shardreaches Vitest rather than being swallowed by a compound script;restenumeratesnpm pkg get scripts.test:ci --workspaces --jsonand excludes only@qwen-code/qwen-codeand@qwen-code/qwen-code-core, which is exactly the complement — and correct despitepackages/clisharing the root's package name, since--workspacesnever includes the root.scriptsequals roottest:scripts. Every discovery branch fails closed: non-zeronpm pkg getreturns its status, an empty workspace list throws, an unknown group throws, and.status ?? 1turns a signal-killed child into a failure. - The aggregate gate itself fails closed, asserting
test "$MACOS_RESULT" = successagainst the matrix result underalways()withfail-fast: false, so a failed, skipped or cancelled leg cannot produce a green aggregate. Note the distinction that matters here: R5-8 was never about the gate passing wrongly — it correctly fails — but about the issue classifier misreading that legitimate failure as an independent one. - The
.ci-budgetmove to9 305 4matches one added job definition and its five declared minutes; the Bash 3.2 repairs use the correctwhile IFS= read -raccumulation and${arr[@]+"${arr[@]}"}nounset-safe idiom; therelease-managed-runtime.ymlcredential guard keeps identical failure semantics underset -euo pipefailand prints only a fixed string, so no secret reaches the log.
Round 6 at this head records findings:[]. R5-1 through R5-7 are Suggestion-graded and explicitly deferred by the author, which is the right call under the repository's own guidance to land only Critical fixes once a PR has passed roughly five review rounds; they do not gate this approval and I have not spent budget re-litigating them.
CI
No check fails at this head: 21 succeeded, 45 skipped, 16 cancelled, 1 pending. The cancellations are a superseded run generation — the whole 4102626xxxx set including Test (ubuntu-latest, Node 22.x), Lint & Static and web-shell E2E Smoke was replaced when 4102627xxxx started — so they are not evidence of a PR-introduced defect and I did not poll the replacement.
One honest gap, non-blocking: because Test (ubuntu-latest, Node 22.x) is among the cancelled set, the new classifier case has no executed CI evidence at this head. The only execution witness is the author's reported 217/217 across the two workflow-meta suites plus a ten-run before/after probe of the classifier shell, which is disclosed as fixture-and-stub based rather than a real macOS nightly or a real GitHub rerun. I verified the jq semantics and the fixture shape by reading them, and that is sufficient for me to approve, but the first green Test (ubuntu-latest, Node 22.x) on this head is what will confirm the meta-test actually runs and passes. Separately, the macOS matrix still only triggers on merge_group, schedule and workflow_dispatch, so nothing yet proves all seven legs finish inside their 60-minute limits — worth watching on the first scheduled run.
qwen-code-dev-bot
left a comment
There was a problem hiding this comment.
Approving at 16ad5167.
CI: the required Lint & Static (ubuntu-latest, Node 22.x) is green on this head, with Test (ubuntu-latest, Node 22.x), Integration Tests (no-AK, No Sandbox), web-shell E2E Smoke, Managed Agent gate, TUI parity, OpenTUI no-flicker and Capture web-shell visuals all success. The cancelled entries on this SHA belong to a duplicate pull_request run created four seconds before the surviving one; every cancelled name has a later success from the run that completed. Test (windows), Test (macos) and the new macOS unit tests matrix are skipped by event routing, not failing.
History: no review is in CHANGES_REQUESTED. The seven open threads are all [Suggestion] (R5-1…R5-7) and none meets the blocking bar — they are diagnosability, aggregate naming, coverage pins and doc staleness, not defects at this commit.
Independent check: no new Critical. runMacOsGroup fails loud rather than silently green: it returns standalone || scripts so both sub-commands always run, throws on an unknown group, and throws when rest discovers no workspaces; run() maps a null spawn status to 1. The aggregate keeps the historical Test (macos-latest, Node 22.x) check name and rejects failure, cancelled and skipped alike, so a leg that never ran cannot pass the lane. The suite step now also requires steps.install.outcome == 'success', closing the run-without-dependencies path. The bash rewrites keep job_ids=() initialized and use the empty-array-safe expansion, and the infra classifier was extended to the new mirror step in the same revision, with the pinned literal and both classification directions covered by test.
Two things to carry forward rather than block on: the macOS lane only executes on merge_group/schedule/workflow_dispatch, so this PR's own CI never runs the sharding it introduces — its correctness rests on macos-ci-groups.test.js and ci-platform-lanes.test.js, which did pass in Test (ubuntu); and R5-3/R5-4/R5-5 (unpinned steps.install.outcome, the script's untested program entry point, and the QWEN_NO_MODIFY_PATH default removing the last run of the Windows persistent-PATH write are all silent-green hazards worth a follow-up issue so they are not dropped.
EOF
)
…15854) * perf(release): reuse verified native audio prebuilds across releases Every release rebuilds the five native audio prebuilds even when nothing that affects those binaries changed. The build is short; the wait is not. For v0.26.3 the Linux x64 prebuild queued 74 minutes to execute for 50 seconds, and the collection step queued again after it — and `publish` depends on that collection, so the whole release sits behind it. Fingerprint the audio build inputs and reuse an artifact from an earlier successful official main release when the fingerprint matches. The key covers the audio package, the dependency lock, the package manager pin and the contents of the producing workflow and this helper, so the Node pin and the prebuildify target arguments are part of it. The package version is excluded deliberately: no part of the native build reads it, and including it would make reuse impossible between releases. Reuse means executing bytes an earlier run produced, so provenance is checked rather than assumed: exact fingerprint name, unexpired, same repository for both run and head run, and a completed successful release.yml run on main from workflow_dispatch or schedule. The pinned download-artifact already verifies the artifact digest. Retention is checked differently at selection and consumption. Selection requires 48 hours of headroom so the artifact outlives the release; consumers require only that it has not expired. Re-applying the margin against a later clock would reject an artifact the release had already committed to, after the native matrix was skipped and with no fallback. Lookup, trial download and payload validation are all non-fatal, and the reuse ID is published only once a trial download has validated; an empty ID runs the full matrix, which is today's behaviour. The publisher does not trust that decision: it recomputes the fingerprint from its own checkout, re-verifies the source run, and validates the payload again, fatally — by then the matrix was skipped, so a bad artifact must stop the release. This does not depend on ECS_RELEASE_HOST_RUNNER_ENABLED and takes effect with the switch unset. The collector needed three fixes to be a trustworthy producer. Its `rm -rf -- "$GITHUB_WORKSPACE/packages/audio-capture/prebuilds"` resolved through whatever `packages` was on a persistent host: with a leftover symlink it deleted an external tree and exited 0, and the following download wrote through the same symlink. It now wipes through a shared preflight that canonicalises the workspace and refuses paths resolving outside it. It also ran `node` with no Node contract, inheriting Node from the hosted image by accident. And its release-only label pinned `x64` while the runners holding that label are ARM64, which never matches and queues until timeout. Contract tests pin the wiring, each confirmed to fail against an injected regression. Design doc in both languages. * fix(release): reconcile audio reuse workflow contracts Share the pre-checkout wipe, preserve the workflow size cap, and let fingerprint failures rebuild native audio. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): use block-style release permissions Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(release): drop x64 from publish's release-host expression The review's unresolved item: collect got the ARM64 label fix but publish kept ["self-hosted", "linux", "x64", "ecs-qwen-release-host"], which can never match the ARM64 machines holding that label, so the OIDC-carrying job would queue forever once ECS_RELEASE_HOST_RUNNER_ENABLED is true. Same expression as the collect fix, same one-word drop. * docs(release): clarify audio reuse rollout and validation Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(release): cover artifact overwrite and contained symlink guards * test(web-shell): include transcript coverage in recovery fixture Bring the fixture correction from #15883 into this branch to address the observed smoke failure. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(release): make audio cache seeding best effort Keep the validated same-run artifact usable when retaining a keyed copy fails. Pin the reuse wiring and correct the retention and producer fixtures without changing release trust boundaries. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * chore(test): apply prettier to the audio prebuild fixtures * docs(release): clarify audio reuse run provenance Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: zzj <zzj@Mac-mini.local>
|
Released in v0.26.5. |
What this PR does
Complete the recovery event terminal flags and route both Chromium test steps to runner temporary storage. Main now includes transcript coverage; this branch synchronizes that change and preserves all handoff assertions. Remove the unevaluated transcript type guard: E2E specs are excluded from the existing typecheck, so it cannot provide the claimed CI contract check.
Why it's needed
After #15865, the client rejects transcript responses without a valid coverage sequence. The recovery mock omitted it, so the new-session draft contained an incomplete-history marker instead of the confirmed answer and latest user request. The fixture now reports coverage through sequence 6, matching its supplied history.
Reviewer Test Plan
How to verify
Run the Web Shell smoke suite. The recovery handoff should include the confirmed answer and latest request, remain editable, retain the selected workspace, and never send automatically. Existing assertions and timeouts are unchanged.
Evidence (Before & After)
Before: the failing smoke job consistently misses
Confirmed inspection completein the recovery draft. Static tracing identifies the missing coverage field and transcript validation added in #15865. The previous revision passed Web Shell smoke and Linux Node CI in run 40926513154. The follow-up adds required event terminal flags and removes the unevaluated type guard; CI for that follow-up is pending.Tested on
Risk & Scope
Also in this branch
Two stacked PRs were merged into this branch instead of into
main, so their commits are part of this diff by design: #15884 (cc83017e6a) and #15888 (767b08c3fd). Both listcodex/recovery-transcript-fixtureas their base, and neither commit is an ancestor ofmain, so mergingmaindoes not remove them. The two workflow files a review flagged,.github/workflows/main-ci-failure-issue.ymland.github/workflows/release-managed-runtime.yml, belong to #15888 with their expectations inscripts/tests/main-ci-failure-issue-workflow.test.jsandscripts/tests/managed-runtime-release.test.js.Linked Issues
Follow-up to #15865, found while investigating #15882 and Managed runtime 0.26.3 recovery.
中文说明
本 PR 的修改
补齐恢复事件的 terminal 标记,并让两个 Chromium 测试步骤都使用 runner 临时存储。main 已包含 transcript 覆盖字段,本分支同步该修改并保留全部交接断言。移除未被执行的 transcript 类型约束:现有类型检查排除了 E2E spec,因此它不能提供此前声称的 CI 契约检查。
为什么需要
#15865 之后,客户端拒绝缺少有效覆盖序号的 transcript 响应。恢复测试的模拟响应遗漏该字段,新会话草稿因此只包含历史不完整提示,缺少已确认回答和最近用户请求。现在夹具声明覆盖到序号 6,与提供的历史一致。
评审测试计划
如何验证
执行 Web Shell smoke 套件。恢复交接应包含已确认回答和最近请求,仍可编辑、保留所选工作区,且不会自动发送。原有断言和超时保持不变。
前后证据
修改前:失败的 smoke 任务中,恢复草稿始终缺少
Confirmed inspection complete。静态追踪确认了覆盖字段缺失及 #15865 新增的 transcript 校验。前一版本已在 40926513154 中通过 Web Shell smoke 和 Linux Node CI。后续提交补齐事件 terminal 标记并移除未执行的类型约束,该提交的 CI 待完成。已测试的平台
风险与范围
关联 Issue
跟进 #15865,在排查 #15882 和 Managed runtime 0.26.3 补发时发现。