feat(ci): post autofix failure-path handoff comments bilingually - #9386
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
✅ Qwen Triage finished — CI landed green on ✅ Qwen Triage 已完成 —— |
|
Thanks for the PR! Re-run after the three review-gap fix commits — the gate verdicts from the first pass still hold, size numbers refreshed to the current head. Template looks good ✓
Moving on to code review. 🔍 中文说明感谢贡献!这是三个评审缺口修复提交之后的重跑 —— 首轮门审结论不变,规模数字已更新到当前 head。 模板完整 ✓
进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
Code reviewRe-run — fresh pass over the full diff at the post-fix head, after the three fix commits that worked through four review rounds. The two reservations from my first pass are both closed, and the review rounds' gaps (R1–R4) with them:
What I re-verified independently at this commit:
No blockers, and no new findings on this pass. The review ledger's one deferred probe (HEADLINE_ZH frame-wiring swaps ship green) remains deferred under the convergence posture — recorded, not requested — and the author's disclosure that tests pin presence/pairing rather than prose quality stands as the known tradeoff. Testing evidenceUnattended CI run — no PR code was built or executed here; this section quotes the PR's own CI checks on the reviewed commit, fetched once via the API. The contract suite ( Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Not verified: end-to-end materialization on a real failing autofix round — none has occurred since the PR opened, and no sandboxed lane can force the path: 中文说明代码审查重跑 —— 在三个修复提交(消化了四轮评审)之后,对当前 head 的完整 diff 重新过了一遍。我上一轮的两点保留意见都已闭合,评审各轮的缺口(R1–R4)也一并闭合:
本次提交上独立复核的内容:
无阻断问题,本轮也没有新发现。评审台账中一条延后的探针(HEADLINE_ZH 框架接线互换可假绿通过)按收敛姿态保持延后 —— 已记录、本轮不要求修改;作者披露的"测试固定形态/配对而非译文质量"仍是已知取舍。 测试证据无人值守 CI 运行 —— 此处未构建或执行任何 PR 代码;本节引用该 PR 自身在所审提交上的 CI 检查结果(通过 API 一次性获取)。契约测试套件(含新的双语测试)在 ubuntu 单测套件中运行,评审时仍在进行中 —— 下方表格如实反映,finalize 任务会在 CI 落定后更新。macOS/Windows 测试任务按设计在所有 PR 上跳过(仅在 merge queue 运行),跳过项属预期。 未验证:在真实失败的 autofix 轮次中的端到端兑现 —— PR 开启以来尚未出现失败轮次,且没有任何沙箱车道能强制触发该路径: — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 4/5 — fresh full-diff pass at the post-fix head found nothing new; every previously named gap is closed and mutation-aware pinned. The one point withheld from 5 is disclosed residual risk, not a defect: prose quality of the ~23 static Chinese strings is pinned for presence, not wording, and the review process's one frame-wiring probe stays deferred under convergence. Stepping back: my independent proposal for this problem and the PR's approach remain the same shape — I still don't see a materially simpler way to do it, and having the agent write the translation (never runtime translation in the posting path) is still the right call. What changed since the first review is the test armor: the fix rounds turned the suite from "pins presence" into something that actively hunts its own false-greens — full pipeline strings instead of substring pins, correspondence pairs instead of counts, contiguous-block pins where position-independent substrings shipped green under mutation. The comments in those tests read like someone replaying each mutation before writing the pin, which is exactly the maintenance posture you want on a 7k-line workflow where the blast radius of a silent regression is a broken handoff at the worst possible moment. The degradation semantics continue to be the part I'd thank the author for in six months: a missing translation can never fail a round, the markers always parse from the raw body, and the wrapper's closing tag is emitted unconditionally by the workflow, not the agent. All four review rounds converge on "no blockers"; the author is the maintainer who operates this machinery and felt the convention gap firsthand. Approving — with approval deferred until CI lands green on the reviewed commit, since the 中文说明置信度:4/5 —— 在修复后的 head 上重新完整过了一遍 diff,没有新发现;此前提出的每个缺口都已闭合,并以"感知突变"的方式固定。未给满分的 1 分是已披露的残余风险而非缺陷:约 23 条静态中文文案只固定了"存在",未固定措辞质量;评审流程的一条框架接线探针按收敛姿态保持延后。 退一步看:我对这个问题的独立方案与 PR 的实现形态依然一致 —— 没有看到明显更简的做法,让 agent 撰写翻译(绝不在发布路径里做运行时翻译)仍然是正确的选择。相比首轮评审,变化在于测试装甲:几轮修复把套件从"固定存在性"变成了主动猎杀自身假绿 —— 完整管道字符串取代子串固定、对应关系对取代计数、在位置无关子串会假绿的位置改用连续块固定。这些测试的注释读起来像是逐条回放突变后才写下的固定 —— 对于一个 7000 行的 workflow(静默回归的爆炸半径是在最糟糕的时刻弄坏交接评论),这正是你想要的维护姿态。 降级语义仍是六个月后我会感谢作者的部分:翻译缺失永远不会导致轮次失败,标记永远从原始正文解析,包裹块的闭合标签由 workflow 无条件输出而非依赖 agent。四轮评审均收敛为"无阻断";作者正是操作这套机制、最先感受到惯例缺口的维护者。 予以批准 —— 但由于承载契约测试的 — Qwen Code · qwen3.8-max Reviewed at |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 10.
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未审查:反向审计——在 10 轮的反审轮数上限内未收敛。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.13)
…aw excerpt Address review R1-1/R1-2/R1-3: - Escape + iconv the issue-lane withdraw failure.md excerpt, the one publish site without `<!--` escaping: a failure.md quoting an HTML comment whose closer sits past the 1500-byte cut opened an unterminated comment that swallowed the new 中文说明 block (R1-3). - Widen the escape-site count test to the multi-`-e` sed form (9 -> 12 sites) and pin the full zh sanitization pipeline per-site on both lanes; dropping the `<!--` expression from either zh site or a tag substitution from the withdraw site now fails (R1-1). - Pin EN/ZH correspondence for every non-empty assignment site of HEADLINE/CAUSE/LAST_FIX/GATE_CLAUSE/IDLE_CLAUSE/REMEDY: count-only pins let a swapped adjacent HEADLINE_ZH pair pass all tests (R1-2). All four mutation witnesses from the review now fail the suite (verified locally: probe each mutation, expect red, restore).
|
Qwen Code review did not complete successfully. The review pipeline failed before a review could be posted. A transient error is retried automatically; if you are seeing this, retry with |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed. Suggestions are inline.
Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 10.
Not linted (tool limitation, not a blocker): the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
仅完成部分审查,审查缺口已披露。 建议见行内评论。
未审查:反向审计——在 10 轮的反审轮数上限内未收敛。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.13)
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-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
中文说明
已审查——无阻断问题。 建议见行内评论。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
— qwen3.8-max via Qwen Code /review (v0.21.13)
|
@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. This is a fork PR, so the first round comes from the next scheduled scan (usually within minutes). Remove the 中文说明🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。本 PR 来自 fork,首轮处理将由下一次定时扫描执行(通常几分钟内)。移除 |
Workflow fixes: - Neutralize :: in the issue-lane run-log dump loop (agent-written files on step stdout parse as workflow commands; the PR-lane twin already did this) — R2-1. - Extend the wrapper-defense substitutions (<details, </details, <summary) to the three excerpt sites that only escaped <!-- and now sit above the new 中文说明 wrapper: API_ERROR_DETAIL (flows into HEADLINE_ZH inside the wrapper) — R2-3; the PR-lane DETAIL_FILE excerpt (address-summary/no-action files are mandated to END with their own <details> tail, so a cut-straddling tail leaves a live severed opener) — R2-4; the withdraw failure.md excerpt — R3-1. - The withdraw comment's 中文说明 block now renders unconditionally with a translated REASON (REASON_ZH per branch), mirroring the PR-lane headline floor: crash shapes where run-agent.mjs writes failure.md itself no longer degrade to zero Chinese — R3-2. Accepted and documented (design doc §5): fence-token severance across the byte cut — render-only, markers parse raw, and a balancing heuristic stays wrong when the cut lands mid-closer — R2-2. Test pins (each mutation-verified locally): branch-selected zh labels — R2-5; zh gate-note text + condition + position — R2-6; failure.zh.md membership in all four dump loops plus the issue-lane :: sed — R2-8; the ZH_DETAIL guard — R2-9; full-line rm -f pins on the three pre-agent cleanup sites — R2-10; the BODY append shape — R3-3; wrapper internal ordering — R3-4. Design doc §2 reconciled with §5 on the no-detail fallback sentence — R2-7.
doudouOUC
left a comment
There was a problem hiding this comment.
Reviewed — no blockers. This PR closes the remaining bilingual gap in the autofix failure-path handoff comments.
Summary of changes:
- Added HEADLINE_ZH / CAUSE_ZH / LAST_FIX_ZH / GATE_CLAUSE_ZH / IDLE_CLAUSE_ZH / REMEDY_ZH parallel variables at every headline site (~23 Chinese strings)
- Agent now writes failure.zh.md alongside failure.md (Chinese translation)
- Added
<details><summary>中文说明</summary>block to handoff comments - Comprehensive sanitization:
<!--,<details,</details,<summaryneutralized;::escaped in step stdout - Missing failure.zh.md degrades gracefully to headline-only
- Extensive contract tests with mutation-aware assertions
Verification:
- All 27 previous suggestions addressed across multiple review rounds
- 0 open blockers
- No head drift
- CI pending
Out of scope (per design doc): gate-rejection body translation, fleet-shepherd escalation comments, run-agent.mjs's own handoff preface lines.
doudouOUC
left a comment
There was a problem hiding this comment.
Not reviewed: the executable-script lint — could not read the plan to check the gate.
Not reviewed: coverage — the plan could not be used (ENOENT: no such file or directory, open 'C:\Users\jinye.djy.qoderwork\workspace\mspqz3u5etjh72hs\qwen-code.qwen\tmp\qwen-review-pr-9386-fetch.json'), so this run cannot show that any of the diff was read.
Not reviewed: verification — could not check that Step 4 and Step 5 ran (ENOENT: no such file or directory, open 'C:\Users\jinye.djy.qoderwork\workspace\mspqz3u5etjh72hs\qwen-code.qwen\tmp\qwen-review-pr-9386-fetch.json').
— deepseek-v4-flash via Qwen Code /review (v0.21.13)
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-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted.
Deferred under the convergence posture (round 4, not a blocker) — recorded, not requested in this round:
scripts/tests/qwen-autofix-workflow.test.js:14145 — [probe] HEADLINE_ZH frame wiring unpinned — swapping interpolated _ZH variables (e.g. ${LAST_FIX_ZH}→${CAUSE_ZH}) ships green
中文说明
已审查——无阻断问题。 建议见行内评论。
未检查(工具限制,非阻断):the executable-script lint — .github/workflows/qwen-autofix.yml: actionlint embedded-shell source mapping is not yet supported — not linted。
收敛姿态下延后(第 4 轮,非阻断)——已记录,本轮不要求修改:共 1 条(原文未翻译,列表见上方英文部分)。
— qwen3.8-max via Qwen Code /review (v0.21.13)
|
🤖 Addressed the latest review feedback (round 1/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/100 轮)。改动内容与我反驳保留之处如下: AutoFix review round summaryAll seven round-4 suggestions are resolved in Feedback points and decisions
Files changed
Verification
Note on the one initially red test outside this PR's footprint: 中文说明AutoFix 审查轮次摘要全部七条第 4 轮建议已在 反馈点与处理决定
变更文件
验证
关于本 PR 范围之外最初变红的一个测试的说明: 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 /triage |
|
Sandboxed verification: The verification job did not complete (checkout, runner, or setup error) and produced no report. See the workflow run for details. 中文 — 判定:
|
|
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.
LGTM, looks ready to ship — CI landed green after the review. ✅
yiliang114
left a comment
There was a problem hiding this comment.
Approved. CI-only change posting autofix failure-path handoff comments bilingually. CI green on the head (Test, precheck, secret scan, CVE audit). The 7 open threads are Suggestion-level (case-insensitive tag-neutralization, duplicate test pins) and non-blocking.
|
Released in v0.21.14. |
What this PR does
The autofix loop's failure-path handoff comments are now posted bilingually: the English body stays byte-identical, followed by a collapsed 中文说明 details block carrying the Chinese headline and the agent's Chinese failure analysis. Every failure headline variant (needs-human handoff, model-error/timeout/crash retry and terminal, stale-base update, could-not-start, consecutive-failure breaker, cumulative-timeout breaker) gains a parallel Chinese variable, and the develop-issue lane's withdraw-claim comment gets the same treatment. The Chinese analysis comes from a new agent output,
failure.zh.md— a paragraph-by-paragraph translation offailure.md— which the workflow wraps in its OWN details block:failure.mditself must stay English-only because the byte-truncated excerpt embedded inline would swallow the rest of the comment if a severed<details>tag landed in it. Cleanup and artifact listings learn about the companion file, so a repair re-run cannot pair a stale translation with a fresh English failure.Why it's needed
These handoff comments are the ones that stop the loop and ask a maintainer to decide — split, redesign, accept with residuals, re-arm. Today that decision-critical content is English-only, while every other static comment the workflow posts is already bilingual. A concrete example: the round-6 growth-brake escalation on PR #9262 (comment 5321766307) needed a maintainer decision, and a Chinese-speaking maintainer must translate a wall of English before acting on it.
Reviewer Test Plan
How to verify
npx vitest run --config ./scripts/tests/vitest.config.ts qwen-autofix-workflow.test.js— see the newposts failure-path handoff comments bilinguallytest and the extended SKILL bilingual-rule test.autofix-eval/autofix-growth-now/autofix-redcheckmarkers are unchanged, so the next scan's watermark, census, and gate-rejection-lift logic parse the comment identically.failure.zh.md(e.g. a mechanical failure where the runner writesfailure.mditself), the details block contains only the headline translation and the round still reports normally.Evidence (Before & After)
N/A — CI workflow + agent contract change, no TUI surface. Local verification: YAML parse +
bash -non all 58 run blocks; the sanitization pipeline neutralizes<details/</details/<summary/<!--in a forged translation; mid-character multibyte truncation survivesset -eo pipefailvia the sameiconv -c || trueshape as the existing English excerpt.Tested on
Environment (optional)
Contract tests only (
npx vitest run --config ./scripts/tests/vitest.config.ts); the workflow change itself is exercised by CI on a real failing round.Risk & Scope
Linked Issues
Ref: PR #9262 (the escalation comment that motivated this change).
中文说明
本 PR 做了什么
autofix 循环失败路径的交接评论现在以双语发布:英文正文保持逐字节不变,其后追加一个折叠的「中文说明」details 块,包含中文 headline 与 agent 的中文失败分析。所有失败 headline 变体(needs-human 交接、模型错误/超时/崩溃的重试与终止、stale-base 更新、未能启动、连续失败熔断、累计超时熔断)都增加了并行的中文变量;develop-issue 车道的撤回认领评论也做同样处理。中文分析来自一个新的 agent 输出
failure.zh.md—— 对failure.md的逐段完整翻译 —— 由 workflow 用它自己的 details 块包裹:failure.md本身必须保持纯英文,因为评论中内嵌的是它的字节截断摘录,一旦其中出现被截断的<details>标签就会吞掉评论的剩余部分。清理与产物清单也纳入了这个伴生文件,避免 repair 重跑时把上一轮的过期翻译与本轮新的英文失败说明配对。为什么需要
这些交接评论正是让循环停下来、请维护者拍板的评论 —— 拆分、重做、接受残余风险、重新武装。如今这部分决策关键内容是纯英文的,而 workflow 发布的其他所有静态评论早已双语化。一个具体例子:PR #9262 第 6 轮的 growth-brake 升级评论(comment 5321766307)需要维护者决策,中文维护者必须先翻译整段英文才能处理。
评审者测试计划
如何验证
npx vitest run --config ./scripts/tests/vitest.config.ts qwen-autofix-workflow.test.js—— 关注新增的posts failure-path handoff comments bilingually测试与扩展后的 SKILL 双语规则测试。autofix-eval/autofix-growth-now/autofix-redcheck标记不变,因此下一轮扫描的水位、统计与 gate-rejection 提取逻辑对评论的解析完全一致。failure.zh.md(例如由 runner 自己写failure.md的机械失败),details 块只包含 headline 翻译,轮次照常上报。证据(前后对比)
N/A —— CI workflow + agent 契约变更,无 TUI 界面。本地验证:YAML 解析 + 对全部 58 个 run 块执行
bash -n;转义管道能中和伪造翻译中的<details/</details/<summary/<!--;多字节字符中途截断在set -eo pipefail下通过与现有英文摘录相同的iconv -c || true形态存活。测试环境
环境(可选)
仅契约测试(
npx vitest run --config ./scripts/tests/vitest.config.ts);workflow 变更本身由 CI 在真实失败轮次中验证。风险与范围
关联 Issue
参考:PR #9262(促成此变更的升级评论)。