Skip to content

feat(ci): post autofix failure-path handoff comments bilingually - #9386

Merged
wenshao merged 6 commits into
QwenLM:mainfrom
wenshao:feat/autofix-handoff-bilingual
Aug 19, 2026
Merged

feat(ci): post autofix failure-path handoff comments bilingually#9386
wenshao merged 6 commits into
QwenLM:mainfrom
wenshao:feat/autofix-handoff-bilingual

Conversation

@wenshao

@wenshao wenshao commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

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 of failure.md — which the workflow wraps in its OWN details block: failure.md itself 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

  • Contract tests pin the new shape end-to-end: npx vitest run --config ./scripts/tests/vitest.config.ts qwen-autofix-workflow.test.js — see the new posts failure-path handoff comments bilingually test and the extended SKILL bilingual-rule test.
  • Behavior to confirm on a real failing round: the posted comment starts with the same English headline as today, then carries a collapsed 中文说明 block with the Chinese headline and (when the agent wrote one) the translation of its failure analysis; the trailing autofix-eval / autofix-growth-now / autofix-redcheck markers are unchanged, so the next scan's watermark, census, and gate-rejection-lift logic parse the comment identically.
  • Degradation: when the agent produces no failure.zh.md (e.g. a mechanical failure where the runner writes failure.md itself), 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 -n on all 58 run blocks; the sanitization pipeline neutralizes <details/</details/<summary/<!-- in a forged translation; mid-character multibyte truncation survives set -eo pipefail via the same iconv -c || true shape as the existing English excerpt.

Tested on

OS Status
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

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

  • Main risk or tradeoff: ~23 static Chinese strings added to the workflow; contract tests pin presence and pairing, not prose quality.
  • Not validated / out of scope: gate-rejection bodies stay English (their evidence is log output; the translated gate clause carries the verdict); fleet-shepherd escalation comments; run-agent.mjs's own handoff preface lines.
  • Breaking changes / migration notes: none — the English body, the markers, and all marker parsing are unchanged; a missing translation degrades gracefully.

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 双语规则测试。
  • 在真实失败轮次中确认的行为:发布的评论仍以今天的英文 headline 开头,随后是折叠的「中文说明」块,包含中文 headline 与(若 agent 写了)失败分析的翻译;尾部 autofix-eval / autofix-growth-now / autofix-redcheck 标记不变,因此下一轮扫描的水位、统计与 gate-rejection 提取逻辑对评论的解析完全一致。
  • 降级:当 agent 未产出 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 形态存活。

测试环境

OS 状态
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

环境(可选)

仅契约测试(npx vitest run --config ./scripts/tests/vitest.config.ts);workflow 变更本身由 CI 在真实失败轮次中验证。

风险与范围

  • 主要风险或取舍:workflow 中新增约 23 条静态中文文案;契约测试固定的是存在性与配对,不保证文案质量。
  • 未验证 / 超出范围:gate-rejection 正文保持英文(其证据为日志输出;翻译后的 gate 从句已携带结论);fleet-shepherd 的升级评论;run-agent.mjs 自己的 handoff 前置文案。
  • 破坏性变更 / 迁移说明:无 —— 英文正文、标记及所有标记解析均不变;缺少翻译时优雅降级。

关联 Issue

参考:PR #9262(促成此变更的升级评论)。

wenshao and others added 2 commits August 18, 2026 12:12
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finished — CI landed green on aad7380 and the deferred approval was posted. finalize run

Qwen Triage 已完成 —— aad7380 的 CI 全绿,延迟审批已提交。查看 finalize 运行

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

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 ✓

  • Problem: observed, not theoretical — the failure-path handoff comments are the last static comments the autofix workflow still posts English-only, and the PR cites a concrete decision-blocking example (the round-6 growth-brake escalation on PR feat(autofix): audit the approach instead of stopping on growth-budget breach #9262). The other static comments (e.g. the takeover acks and milestone) already carry the collapsed 中文说明 block, so this closes a real convention gap rather than inventing one.
  • Direction: aligned. Bilingual maintainer-facing comments are an established repo convention, and this is internal CI tooling with no product surface.
  • Size: no core packages/ paths touched — ~167 production-logic lines (155 in the workflow YAML, 12 in the SKILL contract), ~370 test lines, ~245 lines of design/plan docs. Core-module gate not applicable; nothing near the size advisories.
  • Approach: the scope still feels right, and the two load-bearing choices are the correct ones. failure.md stays English-only because a byte-truncated excerpt of it is embedded inline — a severed <details> there would swallow the rest of the comment — so the Chinese lives in a separate failure.zh.md that the workflow wraps in its OWN details block. And a missing companion degrades to the headline translation alone instead of failing the round, so a skipped translation can never break the loop. Every edit serves the stated goal; no drive-by changes.
  • Risk: no elevated risk signals — no high-risk paths matched.

Moving on to code review. 🔍

中文说明

感谢贡献!这是三个评审缺口修复提交之后的重跑 —— 首轮门审结论不变,规模数字已更新到当前 head。

模板完整 ✓

  • 问题:已观测到的真实缺口,不是理论假设 —— 失败路径交接评论是 autofix workflow 发布的静态评论中最后一批仍为纯英文的,PR 还引用了一个具体的阻塞决策的例子(PR feat(autofix): audit the approach instead of stopping on growth-budget breach #9262 第 6 轮的 growth-brake 升级评论)。其他静态评论(如接管确认、里程碑)都已带折叠的「中文说明」块,本 PR 补齐的是真实的惯例缺口,而非凭空制造需求。
  • 方向:对齐。双语维护者评论是仓库既有惯例,且这是内部 CI 工具改动,不涉及产品面。
  • 规模:未触及核心 packages/ 路径 —— 约 167 行生产逻辑(workflow YAML 155 行、SKILL 契约 12 行)、约 370 行测试、约 245 行设计/计划文档。核心模块门不适用;远未及规模提示线。
  • 方案:范围依然合理,两个关键选择都是对的。failure.md 保持纯英文,因为评论中内嵌的是它的字节截断摘录 —— 一旦其中出现被截断的 <details> 标签就会吞掉评论剩余部分 —— 所以中文放在独立的 failure.zh.md 中,由 workflow 用它自己的 details 块包裹。缺少伴生文件时降级为仅显示 headline 翻译,而不是让轮次失败,因此翻译缺失永远不会破坏循环。所有改动都服务于既定目标,没有夹带无关改动。
  • 风险:无升级风险信号 —— 未命中高风险路径。

进入代码审查 🔍

Qwen Code · qwen3.8-max

Reviewed at aad7380f6a25c8fb3bf3cffd27aa993142a70a6f · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Code review

Re-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:

  • The zh sanitization pipelines are now pinned end-to-end. The new posts failure-path handoff comments bilingually test pins the FULL four-expression pipeline (iconv + <!-- + case-insensitive <details/</details/<summary neutralization) at each site — both failure.zh.md excerpts and the withdraw lane's failure.md excerpt — plus the same tag defense on the DETAIL_FILE and API_ERROR_DETAIL sites, which render inside or ahead of the new wrapper. The mutation-verified false-green shapes the comments describe (dropping -e 's/<!--/…' from both zh sites, dropping s/<details/… from the withdraw site) are exactly what these full-string pins close.
  • Pairing is pinned by correspondence, not count. 24 distinctive EN/ZH anchor pairs assert each Chinese value sits on the line directly under the English assignment it translates — the swapped-values mutation that kept the old count-only pins green now fails.
  • Case-insensitive tag defense landed at every sanitization site (R4): [dD][eE][tT][aA][iI][lL][sS] character classes throughout, matching GitHub's case-insensitive HTML pipeline.

What I re-verified independently at this commit:

  • The 9 → 12 escape-site count is accurate. Base carries exactly nine single-expression sed 's/<!--/…' sites; the PR converts two of them (API_ERROR_DETAIL, the DETAIL_FILE excerpt) to multi--e form and adds three (withdraw failure.md excerpt, two zh excerpts). The relaxed regex sed(?: -e)? 's/<!--/…' matches the first expression of each multi--e sed — 7 + 5 = 12, no misses, no spurious hits.
  • All nine HEADLINE= assignments have adjacent HEADLINE_ZH= siblings, and there is no fallback/default HEADLINE anywhere in the workflow, so the report step can never render an unset Chinese headline; clause variables (CAUSE, LAST_FIX, GATE_CLAUSE, IDLE_CLAUSE, REMEDY) pair 1:1 in every branch including the three pre-existing-failure compare states.
  • Rendering shape is consistent with the existing convention. The existing bilingual comments build their bodies with printf '\n…' so <details> lands at column 0; the new multi-line string continuations sit at the same YAML column as their commands, so block-scalar dedent puts the wrapper at column 0 too — same rendering, different idiom.
  • Quoting is safe. The backticked autofix/approved inside REASON_ZH is single-quoted (literal, same as the pre-existing English REASON); the double-quoted HEADLINE_ZH strings escape their backticks and interpolate variables exactly like the English frames.
  • The issue-lane artifact dump's new sed 's/::/;;/g' matches the PR-lane dump loop it now mirrors — agent-written content on step stdout can't forge workflow commands through the added failure.zh.md listing.
  • The gate-rejection excerpt's <!---only escape is correct, not a miss: reject_fix() wraps the log tail in a quadruple-backtick fence and budgets the document to fit under the 3900-byte cap, so tags inside render inert and the fence never severs in practice; the residual severed-fence class is the render-only risk the design doc explicitly accepts for every byte-truncated site.

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 evidence

Unattended 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 (scripts/tests/qwen-autofix-workflow.test.js, including the new bilingual test) runs inside the ubuntu unit suite, which is still in progress at review time — the table below reflects that, and the finalize job will update it when CI settles. macOS/Windows test jobs are skipped by design on all PRs (they run only in the merge queue), so the skipped entries are expected.

Final CI results for aad7380 (auto-updated by the triage finalize job after CI completed):

Check Conclusion
Classify PR ✅ success
Dependency CVE audit ✅ success
Desktop Shell (ubuntu-22.04) ✅ success
Desktop Shell (windows-2022) ✅ success
Secret scan (TruffleHog) ✅ success
Test (ubuntu-latest, Node 22.x) ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success

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: @qwen-code /verify A/B-builds product code (none changed here) and @qwen-code /tmux drives a TUI surface (none exists). The contract tests pin the exact comment shape statically; the first real failing round is the exercise. The author's local verification claims (YAML parse, bash -n on all 58 run blocks, sanitization smoke tests) are noted from the PR description but not independently re-run here.

中文说明

代码审查

重跑 —— 在三个修复提交(消化了四轮评审)之后,对当前 head 的完整 diff 重新过了一遍。我上一轮的两点保留意见都已闭合,评审各轮的缺口(R1–R4)也一并闭合:

  • zh 转义管道现已端到端固定:新增的 posts failure-path handoff comments bilingually 测试对每个位点固定了完整的四表达式管道(iconv + <!-- + 大小写不敏感的 <details/</details/<summary 中和)——两个 failure.zh.md 摘录、issue 车道撤回评论的 failure.md 摘录,以及在新的包裹块内部或前方渲染的 DETAIL_FILEAPI_ERROR_DETAIL 位点。注释中描述的突变验证假绿形态(两个 zh 位点丢掉 -e 's/<!--/…'、撤回位点丢掉 s/<details/…)正是这些全字符串固定所封堵的。
  • 配对按对应关系固定,而非计数:24 组特征性 EN/ZH 锚点对断言每个中文值紧跟在其所翻译的英文赋值下一行——旧计数固定下能假绿通过的"互换取值"突变现在会失败。
  • 大小写不敏感的标签防御已落在所有转义位点(R4):全部改用 [dD][eE][tT][aA][iI][lL][sS] 字符类,与 GitHub 大小写不敏感的 HTML 管道一致。

本次提交上独立复核的内容:

  • 9 → 12 的转义位点计数准确:base 恰有九处单表达式 sed 's/<!--/…';PR 把其中两处(API_ERROR_DETAILDETAIL_FILE 摘录)改为多 -e 形态,并新增三处(撤回 failure.md 摘录、两个 zh 摘录)。放宽后的正则匹配每个多 -e sed 的首个表达式 —— 7 + 5 = 12,无遗漏、无误匹配。
  • 全部九处 HEADLINE= 赋值都有相邻的 HEADLINE_ZH=,workflow 中不存在任何兜底/默认 HEADLINE,report 步骤不可能渲染未设置的中文 headline;从句变量(CAUSELAST_FIXGATE_CLAUSEIDLE_CLAUSEREMEDY)在每个分支(含三种 pre-existing 比较状态)都 1:1 配对。
  • 渲染形态与既有惯例一致:现有双语评论用 printf '\n…' 构造正文,<details> 落在第 0 列;新的多行字符串续行与其命令处于相同 YAML 列,块标量去缩进后包裹块同样落在第 0 列 —— 渲染一致,仅写法不同。
  • 引号安全REASON_ZH 中带反引号的 autofix/approved 是单引号字符串(字面量,与既有英文 REASON 相同);双引号的 HEADLINE_ZH 字符串转义反引号、按与英文完全相同的方式插值变量。
  • issue 车道产物转储新增的 sed 's/::/;;/g' 与其现在对齐的 PR 车道转储循环一致 —— 步骤 stdout 上的 agent 产物无法借新增的 failure.zh.md 列表项伪造 workflow 命令。
  • gate-rejection 摘录仅转义 <!-- 是正确的而非遗漏reject_fix() 用四反引号围栏包裹日志尾部,并把文档体量控制在 3900 字节上限之内,因此其中标签渲染为惰性文本、围栏实际永不被截断;残余的围栏截断情形属于设计文档对所有字节截断位点明确接受的仅渲染风险。

无阻断问题,本轮也没有新发现。评审台账中一条延后的探针(HEADLINE_ZH 框架接线互换可假绿通过)按收敛姿态保持延后 —— 已记录、本轮不要求修改;作者披露的"测试固定形态/配对而非译文质量"仍是已知取舍。

测试证据

无人值守 CI 运行 —— 此处未构建或执行任何 PR 代码;本节引用该 PR 自身在所审提交上的 CI 检查结果(通过 API 一次性获取)。契约测试套件(含新的双语测试)在 ubuntu 单测套件中运行,评审时仍在进行中 —— 下方表格如实反映,finalize 任务会在 CI 落定后更新。macOS/Windows 测试任务按设计在所有 PR 上跳过(仅在 merge queue 运行),跳过项属预期。

未验证:在真实失败的 autofix 轮次中的端到端兑现 —— PR 开启以来尚未出现失败轮次,且没有任何沙箱车道能强制触发该路径:@qwen-code /verify 做的是产品代码 A/B 构建(本 PR 无产品代码改动),@qwen-code /tmux 驱动的是 TUI 界面(本 PR 无 TUI 面)。契约测试静态固定了评论的确切形态;第一个真实失败轮次即为演练。作者在 PR 描述中的本地验证声明(YAML 解析、全部 58 个 run 块的 bash -n、转义冒烟测试)仅作转述,未在此独立复跑。

Qwen Code · qwen3.8-max

Reviewed at aad7380f6a25c8fb3bf3cffd27aa993142a70a6f · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

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 Qwen Code CI suite (which carries the contract tests) is still running. The finalize job will post the commit-pinned approval once it settles, or flag this comment if anything lands red.

中文说明

置信度:4/5 —— 在修复后的 head 上重新完整过了一遍 diff,没有新发现;此前提出的每个缺口都已闭合,并以"感知突变"的方式固定。未给满分的 1 分是已披露的残余风险而非缺陷:约 23 条静态中文文案只固定了"存在",未固定措辞质量;评审流程的一条框架接线探针按收敛姿态保持延后。

退一步看:我对这个问题的独立方案与 PR 的实现形态依然一致 —— 没有看到明显更简的做法,让 agent 撰写翻译(绝不在发布路径里做运行时翻译)仍然是正确的选择。相比首轮评审,变化在于测试装甲:几轮修复把套件从"固定存在性"变成了主动猎杀自身假绿 —— 完整管道字符串取代子串固定、对应关系对取代计数、在位置无关子串会假绿的位置改用连续块固定。这些测试的注释读起来像是逐条回放突变后才写下的固定 —— 对于一个 7000 行的 workflow(静默回归的爆炸半径是在最糟糕的时刻弄坏交接评论),这正是你想要的维护姿态。

降级语义仍是六个月后我会感谢作者的部分:翻译缺失永远不会导致轮次失败,标记永远从原始正文解析,包裹块的闭合标签由 workflow 无条件输出而非依赖 agent。四轮评审均收敛为"无阻断";作者正是操作这套机制、最先感受到惯例缺口的维护者。

予以批准 —— 但由于承载契约测试的 Qwen Code CI 套件仍在运行,批准推迟到 CI 在所审提交上落绿。finalize 任务会在 CI 落定后发布绑定该提交的批准;若有检查变红,会在本评论中标记。

Qwen Code · qwen3.8-max

Reviewed at aad7380f6a25c8fb3bf3cffd27aa993142a70a6f · re-run with @qwen-code /triage

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship — CI landed green after the review. ✅

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread scripts/tests/qwen-autofix-workflow.test.js Outdated
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread .github/workflows/qwen-autofix.yml Outdated
…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-ci-bot

Copy link
Copy Markdown
Collaborator

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 /review. See workflow logs.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml
Comment thread docs/design/2026-08-18-autofix-handoff-bilingual.md Outdated
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread scripts/tests/qwen-autofix-workflow.test.js

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml
Comment thread .github/workflows/qwen-autofix.yml
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread .github/workflows/qwen-autofix.yml
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread scripts/tests/qwen-autofix-workflow.test.js
@wenshao

wenshao commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /takeover

@qwen-code-dev-bot qwen-code-dev-bot added the autofix/takeover Summon the autofix loop to manage this PR (remove to release; needs triage+) label Aug 18, 2026
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤝 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/takeover label (or comment @qwen-code /takeover stop) to release.

中文说明

🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。本 PR 来自 fork,首轮处理将由下一次定时扫描执行(通常几分钟内)。移除 autofix/takeover 标签(或评论 @qwen-code /takeover stop)即可释放。

@qwen-code-dev-bot

qwen-code-dev-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

AutoFix round 1 finishedview run. See this round's report below.

中文说明

AutoFix 第 1 轮已完成 —— 查看运行。本轮报告见下方。

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
doudouOUC previously approved these changes Aug 18, 2026

@doudouOUC doudouOUC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, <summary neutralized; :: 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 doudouOUC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This run could not certify that any of this diff was reviewed.

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 qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread .github/workflows/qwen-autofix.yml Outdated
Comment thread scripts/tests/qwen-autofix-workflow.test.js Outdated
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread scripts/tests/qwen-autofix-workflow.test.js
Comment thread scripts/tests/qwen-autofix-workflow.test.js
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 Addressed the latest review feedback (round 1/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 1/100 轮)。改动内容与我反驳保留之处如下:

AutoFix review round summary

All seven round-4 suggestions are resolved in aad7380f6a (no conflict; base not merged).

Feedback points and decisions

  • R4-1 / R4-2 / R4-3 (case-insensitive tag neutralization) — Fixed. Reproduced first: printf '<DETAILS> x </Details> y <Summary> z <!\-\- c -->' through the exact current pipeline passes all three mixed-case tags byte-identical (only <!\-\- fires). All five pipeline sites (withdraw failure.md excerpt, withdraw failure.zh.md excerpt, API_ERROR_DETAIL, PR-lane DETAIL_FILE excerpt, PR-lane failure.zh.md excerpt) now use the portable character-class spellings s/<[dD][eE][tT][aA][iI][lL][sS]/…, s/<\/[dD][eE][tT][aA][iI][lL][sS]/…, s/<[sS][uU][mM][mM][aA][rR][yY]/… (GNU- and BSD-sed portable). The pinned pipeline constants in the contract test (zhPipeline, wrapperDefensePipeline, the API_ERROR_DETAIL full-line pin) and the three substring pins are updated to the same spellings. Probe on the fixed arm: all three mixed-case tags neutralized to the inert full-width forms.
  • R4-4 (duplicate assertion pair) — Fixed. Deleted the second withdrawClaimStep pair (added by the latest fix commit, byte-identical to the pair pinned since the earlier fix commit); the surviving pair keeps the same coverage. Subtractive fix — net test diff shrinks by those four lines.
  • R4-5 (third REASON_ZH pairing unpinned) — Fixed. Branches 2 and 3 carry identical REASON text, so the existing pairing regexes were both satisfied by branch 2's first occurrence. Added a pairing pin keyed on branch 3's unique neighbour: REASON_ZH='该 issue 需要重新添加…' immediately followed by DETAIL='The run failed before producing a verified fix.'. Mutation re-run: swapping branch 3's REASON_ZH for branch 1's value → 1 failed (was 180/180 green).
  • R4-6 (HEADLINE_ZH not bracketed in the ordering pins) — Fixed. Added summary < echo "${HEADLINE_ZH}" and echo "${HEADLINE_ZH}" < </details> pins in the existing toBeLessThan style. Mutation re-run: moving echo "${HEADLINE_ZH}" below the closer → 1 failed at the new pin (was green).
  • R4-7 (no details-before-summary ordering pin) — Fixed. Added echo '<details>' < echo '<summary>中文说明</summary>' alongside the existing pins. Mutation re-run: swapping the two echo lines → 1 failed (was green).
  • Round-4 review body deferral ("HEADLINE_ZH frame wiring unpinned") — untouched: the review deferred it under the convergence posture as "recorded, not requested in this round", so it was not in this round's scope.
  • Issue-level comment (review pipeline failed before posting) — transient infrastructure notice with no feedback content; nothing to address.

Files changed

  • .github/workflows/qwen-autofix.yml — five sed pipelines made case-insensitive (R4-1/2/3).
  • scripts/tests/qwen-autofix-workflow.test.js — pinned constants updated to the new spellings; duplicate pair removed; branch-3 pairing pin and two wrapper-ordering pins added (R4-1/4/5/6/7).

Verification

  • npm run build — passed (also produced the missing packages/audio-capture/dist prerequisite; see note below).
  • npm run typecheck — passed.
  • npm run lint — passed.
  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-autofix-workflow.test.js — 180 passed (180).
  • npm run test:scripts (full scripts suite) — 56/56 files, 1370 passed | 16 skipped.
  • npx prettier --check on both touched files — clean.
  • js-yaml parse of qwen-autofix.yml — parses; all 8 jobs present.
  • Mutation probes (mutate → focused test → restore): lowercase-revert of one zh site → 1 failed; branch-3 REASON_ZH swap → 1 failed; HEADLINE_ZH moved below the closer → 1 failed at the new pin; details/summary echo swap → 1 failed; clean tree restored after each probe (final state 180/180).
  • Pre-fix reproduction probe for R4-1: mixed-case tags passed the old pipeline byte-identical; the character-class arm neutralizes them.

Note on the one initially red test outside this PR's footprint: install-script.test.js > does not package audio-capture test artifacts failed before npm run build had produced packages/audio-capture/dist (ENOENT on that directory). It passed once the build ran, on the unmodified test — an environment prerequisite state, unrelated to this change. The vitest run also emits a [vitest-worker]: Timeout calling "onTaskUpdate" unhandled-error notice on this heavy suite regardless of the tree state; every test itself passes.

中文说明

AutoFix 审查轮次摘要

全部七条第 4 轮建议已在 aad7380f6a 中解决(无冲突;未合并 base)。

反馈点与处理决定

  • R4-1 / R4-2 / R4-3(标签中和大小写不敏感)——已修复。先复现:将 printf '<DETAILS> x </Details> y <Summary> z <!\-\- c -->' 通过当前管道原样运行,三个混合大小写标签逐字节原样通过(只有 <!\-\- 生效)。全部五处管道位点(withdraw 的 failure.md 摘录、withdraw 的 failure.zh.md 摘录、API_ERROR_DETAIL、PR 车道 DETAIL_FILE 摘录、PR 车道 failure.zh.md 摘录)现改用可移植的字符类写法 s/<[dD][eE][tT][aA][iI][lL][sS]/…s/<\/[dD][eE][tT][aA][iI][lL][sS]/…s/<[sS][uU][mM][mM][aA][rR][yY]/…(GNU 与 BSD sed 均可移植)。契约测试中固定的管道常量(zhPipelinewrapperDefensePipelineAPI_ERROR_DETAIL 整行固定)与三条子串固定同步更新为相同写法。对修复分支做探针:三个混合大小写标签均被中和为无害的全角形态。
  • R4-4(重复断言对)——已修复。删除第二对 withdrawClaimStep 断言(由最新修复提交加入,与更早修复提交保留的那对逐字节相同);保留的一对覆盖不变。这是缩减式修复——测试净 diff 因此减少四行。
  • R4-5(第三组 REASON_ZH 配对未固定)——已修复。分支 2 与分支 3 的 REASON 英文文本完全相同,既有的两条配对正则都被分支 2 的首次出现满足。新增以分支 3 独有相邻文本为键的配对固定:REASON_ZH='该 issue 需要重新添加…' 后紧跟 DETAIL='The run failed before producing a verified fix.'。变异复跑:把分支 3 的 REASON_ZH 换成分支 1 的值 → 1 失败(原本 180/180 全绿)。
  • R4-6(HEADLINE_ZH 未被排序固定点括住)——已修复。按既有 toBeLessThan 风格新增 summary < echo "${HEADLINE_ZH}"echo "${HEADLINE_ZH}" < </details> 两个固定点。变异复跑:把 echo "${HEADLINE_ZH}" 移到闭合符之下 → 在新固定点处 1 失败(原本全绿)。
  • R4-7(缺少 details 先于 summary 的排序固定)——已修复。在既有固定点旁新增 echo '<details>' < echo '<summary>中文说明</summary>'。变异复跑:交换两行 echo → 1 失败(原本全绿)。
  • 第 4 轮审查正文中的延后项(「HEADLINE_ZH 框架接线未固定」)——未处理:审查方已按收敛姿态将其延后,注明「已记录、本轮不要求修改」,故不在本轮范围内。
  • Issue 级评论(审查管道在发布前失败)——临时性基础设施提示,无反馈内容;无需处理。

变更文件

  • .github/workflows/qwen-autofix.yml——五处 sed 管道改为大小写不敏感(R4-1/2/3)。
  • scripts/tests/qwen-autofix-workflow.test.js——固定常量更新为新写法;删除重复断言对;新增分支 3 配对固定与两个包裹块排序固定(R4-1/4/5/6/7)。

验证

  • npm run build——通过(同时产出了缺失的 packages/audio-capture/dist 前置产物;见下方说明)。
  • npm run typecheck——通过。
  • npm run lint——通过。
  • npx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/qwen-autofix-workflow.test.js——180 通过(180)。
  • npm run test:scripts(scripts 全套)——56/56 文件,1370 通过 | 16 跳过。
  • 对两个变更文件运行 npx prettier --check——通过。
  • js-yaml 解析 qwen-autofix.yml——解析成功;8 个 job 齐全。
  • 变异探针(变异 → 聚焦测试 → 还原):将一处 zh 位点还原为小写 → 1 失败;交换分支 3 的 REASON_ZH → 1 失败;把 HEADLINE_ZH 移到闭合符之下 → 在新固定点处 1 失败;交换 details/summary 两行 echo → 1 失败;每次探针后均还原至干净代码树(最终状态 180/180)。
  • R4-1 的修复前复现探针:混合大小写标签在原管道下逐字节原样通过;字符类分支将其全部中和。

关于本 PR 范围之外最初变红的一个测试的说明:install-script.test.js > does not package audio-capture test artifactsnpm run build 产出 packages/audio-capture/dist 之前失败(对该目录 ENOENT)。构建运行后即通过,且该测试本身未被修改——属于环境前置产物状态问题,与本改动无关。vitest 在这个较重的套件上无论代码树状态如何都会输出一条 [vitest-worker]: Timeout calling "onTaskUpdate" 未处理错误提示;所有测试本身均通过。

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/模型 qwen3.8-max

@wenshao

wenshao commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@wenshao
wenshao enabled auto-merge August 18, 2026 23:52
@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Sandboxed verification: ⚠️ incomplete — infrastructure failure - workflow run

The verification job did not complete (checkout, runner, or setup error) and produced no report. See the workflow run for details.

中文 — 判定:⚠️ 未完成 · 基础设施故障

验证作业未完成(检出、runner 或初始化错误),未生成报告。详见工作流运行日志。

Qwen Code · sandboxed verification

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Triage re-run completed without a new review.

⚠️ The bot has neither a verdict nor a deferral on aad7380f6a25c8fb3bf3cffd27aa993142a70a6f — no APPROVED, CHANGES_REQUESTED, or COMMENTED review of its own. A DISMISSED one does not count: dismiss_stale_reviews voids the bot's approval on every push, which is exactly when a fresh one is needed. If this re-run was meant to review or approve, it did not, and an approval left by another account is a separate vote that does not count as the bot's own.

⚠️ 机器人在 aad7380f6a25c8fb3bf3cffd27aa993142a70a6f既没有裁决也没有 defer —— 没有属于它自己的 APPROVEDCHANGES_REQUESTEDCOMMENTED 评审。DISMISSED 不算:dismiss_stale_reviews 会在每次推送时作废机器人的批准,而那恰恰是需要一次新批准的时刻。如果这次重跑本应评审或批准,那么它没有做到;而其他账号留下的批准是另一张票,不能算作机器人自己的。

The stage comments above were updated with the latest result. View workflow run.

上方各阶段评论已更新为最新结果。查看工作流运行

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship — CI landed green after the review. ✅

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wenshao
wenshao added this pull request to the merge queue Aug 19, 2026
Merged via the queue into QwenLM:main with commit 846fc05 Aug 19, 2026
40 of 41 checks passed
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Released in v0.21.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix/takeover Summon the autofix loop to manage this PR (remove to release; needs triage+)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants