perf(ci): tighten the automatic review kill switch for micro diffs - #8774
Conversation
Below the review skill's sweep floor (25 changed lines) an automatic review keeps --effort high and its inline comments — a medium downgrade would drop exactly the inline findings a source fix deserves, and with the file-scoped suites and the one-round reverse audit the pipeline itself is what shrinks on a micro diff. What a micro run must not keep is a multi-hour kill switch: the small-PR budget halves with the same 90-minute floor the docs-only downgrade uses, so a hung run dies at the scale of its work. Reuses the PR_SIZE_LINES the size-aware budget already fetched — no new API call; an unknown size never tightens, an explicit --timeout wins (the size block is skipped), and a docs-only run is already halved, never twice. Gate tests drive the extracted step source with seeded sizes: the 24/25 boundary, the floor, the docs-only interaction, and the unknown-size fallback.
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline. Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查。 建议见行内评论。 未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.8)
…states Review rework. The docs-only branch and the micro tightening now call one halve_budget_floor() — a / 2 → / 3 mutant survived every test because both micro inputs land on the floor under any divisor ≥ 2, and two verbatim copies let a one-sided edit diverge the branches while the comments claimed they matched; the floor cases now execute the shared function and a structural pin asserts one definition, two calls, one occurrence of the arithmetic. The threshold comment states the unit honestly (total churn rides the skill's source-weighted sweep floor in the direction that cannot over-tighten). Two surviving guard mutants get pins: a manually requested review with a populated size is never tightened (the caller owns its timeout), and a failed docs classification still tightens a micro automatic run (the guard keys on != "true", not = "false").
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed — no blockers. Suggestions are inline. Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查——无阻断问题。 建议见行内评论。 未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.8)
… invariant The comment claimed "total churn < 25 implies the skill's source-weighted measure < 25", which is backwards: srcDiffLines counts raw unified-diff lines (file/hunk headers, context), so it is LARGER than churn — a scattered micro diff (churn 10 across 5 files) computes srcDiffLines ~65 and keeps sweep on, un-shrunk, while the gate still halves its budget. The threshold is now stated as what it is: an independent "small PR" churn bound, deliberately not SWEEP_FLOOR (the two measures differ, so a micro diff may still run the sweep and the full reverse audit). The tightening is justified by "churn < 25 bounds the reviewed territory and 90 minutes is ample for it even on the full pipeline" — measured, a 23-line PR runs high end to end in ~30 min — not by the pipeline shrinking. With the SWEEP_FLOOR coupling claim removed, there is no cross-file coupling left to drift, so no equality pin is owed.
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 #8774 halves the automatic PR review's timeout for mic...: (none — all planned checks completed).; PR #8774 halves the automatic PR review's timeout for mic...: could not run scripts/tests/qwen-pr-review-workflow.test.js under vitest — the worktree has no node_modules and installing was out of budget; I replicated t…. Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查。 建议见行内评论。 未探索到全部深度(达到工具调用预算):PR #8774 halves the automatic PR review's timeout for mic...:(none — all planned checks completed).;PR #8774 halves the automatic PR review's timeout for mic...:could not run scripts/tests/qwen-pr-review-workflow.test.js under vitest — the worktree has no node_modules and installing was out of budget; I replicated t…。 未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.8)
|
@qwen-code /takeover |
|
🤝 Takeover engaged: the autofix loop now manages this PR — it will address new review feedback and resolve base conflicts until the label is removed or the round cap is reached. Remove the 中文说明🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。移除 |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
🤖 Addressed the latest review feedback (round 1/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/100 轮)。改动内容与我反驳保留之处如下: Autofix review round — PR #8774One new actionable finding this round (R3-1); it is resolved. All round 1–2 findings were already fixed in earlier commits ( Feedback dispositions
Changes
Verification
中文说明Autofix 评审轮次 — PR #8774本轮只有一条新的可处理发现(R3-1),已解决。第 1–2 轮的全部发现已在先前提交( 反馈处理
变更
验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 Re-review when you have a moment. After round 100 this bot stops and leaves the PR for a human. · 有空请复审;第 100 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
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 #8774 halves the automatic PR review's timeout for mic...: I did not execute the test suite ( scripts/tests/qwen-pr-review-workflow.test.js ) — node_modules absent in the worktree and I did not install. I verified the h…; PR #8774 halves the automatic PR review's timeout for mic...: did not execute scripts/tests/qwen-pr-review-workflow.test.js (no node_modules in the worktree; standalone verification was done with a temp yaml@2 install …. Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查。 建议见行内评论。 未探索到全部深度(达到工具调用预算):PR #8774 halves the automatic PR review's timeout for mic...:I did not execute the test suite ( scripts/tests/qwen-pr-review-workflow.test.js ) — node_modules absent in the worktree and I did not install. I verified the h…;PR #8774 halves the automatic PR review's timeout for mic...:did not execute scripts/tests/qwen-pr-review-workflow.test.js (no node_modules in the worktree; standalone verification was done with a temp yaml@2 install …。 未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.8)
…tually halves Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
🤖 Addressed the latest review feedback (round 2/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 2/100 轮)。改动内容与我反驳保留之处如下: Address-review summary — PR #8774Feedback points[rc:3745109131] Micro-gate justification comment names an unreachable budget — RESOLVEDClassification: Optional — a Verified against the exact code. The micro gate only fires when Change: applied the suggested rewording — what a micro run must not keep is the full 180-minute small-PR budget when its measured worst case is ~30 minutes. The mechanism clause (same halve-with-floor the docs downgrade uses) and its effect (a hung run dies at the scale of its work) are unchanged. Comment-only change; no behavioral change. Files changed
Conflict notesNone — Verification
中文说明处理评审总结 — PR #8774反馈点[rc:3745109131] 微型门控的理由注释描述了一个不可达的预算 — 已解决分类: 可选 — 来自自动评审器的 已对照确切代码核实。 微型门控仅在以下条件同时成立时触发: 改动: 采纳建议的改写 —— 微型运行不应保留的是完整的 180 分钟小 PR 预算(其测得的最坏情况约为 30 分钟)。机制部分(与文档降级相同的带地板减半)及其效果(挂死的运行在其工作量对应的尺度上终止)保持不变。纯注释改动,无行为变化。 变更文件
冲突说明无 — 验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 Re-review when you have a moment. After round 100 this bot stops and leaves the PR for a human. · 有空请复审;第 100 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
doudouOUC
left a comment
There was a problem hiding this comment.
Reviewed. 1 Suggestion-level finding(s) could not be anchored to a changed line and were dropped; nothing further to act on here. Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查。 1 条建议级发现无法锚定到改动行,已丢弃;此处无需进一步处理。 未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— deepseek-v4-flash via Qwen Code /review (v0.21.8)
doudouOUC
left a comment
There was a problem hiding this comment.
Two-stage review (round 1 only) for #8774
Round 1 model: deepseek-v4-flash
Verdict: ISSUES_FOUND — one Suggestion-level finding that could not be anchored to a changed line, so it is posted here rather than inline.
Findings
- Severity: Suggestion
File:scripts/tests/qwen-pr-review-workflow.test.js
Note: This test file is outside the npm workspace and is not collected by the defaultnpm testcommand. The newly added tests in this PR therefore need to be invoked explicitly (as the author already documents withnpx vitest run scripts/tests/qwen-pr-review-workflow.test.js). Consider moving the test into the collected workspace or wiring it into the default test script if it should run in CI by default.
Round 2 (qwen3.8-max) was skipped because round 1 returned a finding.
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: Autofix review-response round: no code changesThe only new feedback item is a Suggestion-level finding from the automated Finding triage[Suggestion] Decision: Decline. The new tests already run in CI by default:
Moving the file into a workspace or rewiring Verification
中文说明Autofix 审查响应轮次:无代码变更本轮唯一的新反馈是自动审查器(第 1 轮)给出的一条 Suggestion(建议)级发现。 发现分诊[Suggestion] 决定:拒绝采纳。 新增测试在 CI 中默认就会被运行:
因此,把文件移入 workspace 或改造 验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
未发现问题。LGTM!✅
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-code-pr-review.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.8)
doudouOUC
left a comment
There was a problem hiding this comment.
Reviewed at bd1a4cb. No code blockers found. The micro timeout gate is correctly limited to automatic, non-docs runs with a successful size lookup; explicit and unknown-size paths remain unchanged, docs-only runs halve once, and high effort with inline posting is preserved. The parsed runtime YAML, event and permission paths, timeout consumers, fallback behavior, and boundary tests are consistent. CI, actionlint, shellcheck, formatting, and tests pass.
Approved with one non-blocking documentation suggestion: please align the PR description with the final semantics. It still calls the <25 churn threshold the review skill SWEEP_FLOOR, says the micro pipeline necessarily shrinks, and describes a multi-hour large-PR budget. The final code deliberately uses an independent additions-plus-deletions bound; scattered low-churn diffs may still run the full sweep/reverse audit, and this gate can only change the already-selected small-PR budget from 180 → 90.
|
Released in v0.21.9. |
What this PR does
Halves the automatic review's timeout for micro diffs — churn below the review skill's sweep floor (25 changed lines, additions + deletions) — with the same 90-minute floor the docs-only downgrade uses. Effort and posting are untouched: the run stays
--effort highwith inline comments.Reuses the
PR_SIZE_LINESthe size-aware budget step already fetched (no new API call). An unknown size never tightens, an explicit--timeoutwins (the size block is skipped entirely), and a docs-only run is halved once by its own gate, never twice.Why it's needed
This is the third of three micro-diff latency changes measured from one v0.21.8 run (a 23-line one-file PR that took a 30-minute pipeline): #8772 file-scopes the micro diff's test suite, #8773 caps its reverse audit at one round. With those two, the pipeline is what shrinks on a micro diff — so the original idea of downgrading micro source PRs to
--effort mediumwas dropped deliberately: medium never posts inline comments, and a 20-line source fix is exactly the PR whose findings deserve line anchors. What a micro run must not keep is a multi-hour kill switch sized for a 2,000-line diff: a hung run should die at the scale of its work.Reviewer Test Plan
How to verify
npx vitest run scripts/tests/qwen-pr-review-workflow.test.js— 108 passed. The gate tests drive the extracted step source with seeded sizes and pin: the 24/25 boundary, the 90-minute floor, docs-only halving exactly once, unknown-size / explicit-timeout never tightening, and effort + posting untouched (docs_only_medium=false, "keeps --effort high").Tested on
Risk & Scope
@qwen-code /review,--timeout) are untouched.Linked Issues
Follow-up to #8772 and #8773; the micro-diff latency line measured on the #8762 pipeline dissection.
中文说明
这个 PR 做了什么
对微型 diff(churn 低于 review skill 的 sweep 地板:新增+删除 <25 行)的自动评审超时减半,地板与 docs-only 降档相同(90 分钟)。effort 与发布行为不动:仍是
--effort high+ 行内评论。复用尺寸感知预算步骤已获取的
PR_SIZE_LINES(无新增 API 调用)。尺寸未知永不收紧;显式--timeout优先(尺寸块整体跳过);docs-only 运行由其自身门减半一次,绝不叠加。为什么需要
这是同一次 v0.21.8 实测(23 行单文件 PR 跑了 30 分钟管线)引出的三项微型 diff 延迟改动的第三项:#8772 文件级收窄测试套件,#8773 反审封顶一轮。有了前两项,微型 diff 上收缩的是管线本身——因此刻意放弃了最初"micro 源码 PR 降到 medium"的方案:medium 从不发行内评论,而 20 行的源码修复恰恰最需要行级锚点。微型运行不该保留的是为 2000 行 diff 设计的数小时止损开关:挂死的运行应该在与其工作量相称的时间死掉。
风险与范围
@qwen-code /review、--timeout)不受影响。