Skip to content

fix(triage): resolve stage comment ids by marker at patch time, harden model injection#7703

Merged
wenshao merged 4 commits into
QwenLM:mainfrom
wenshao:triage-rerun-comment-id
Jul 25, 2026
Merged

fix(triage): resolve stage comment ids by marker at patch time, harden model injection#7703
wenshao merged 4 commits into
QwenLM:mainfrom
wenshao:triage-rerun-comment-id

Conversation

@wenshao

@wenshao wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Hardens two fragile spots in the triage pipeline that surfaced while shepherding #7693, and fixes one wording error. First, re-run comment updates in the triage skill now resolve the target comment id by its stage marker at PATCH time — bot-author-filtered, startswith match, re-resolved immediately before each PATCH — instead of trusting ids the agent remembered from earlier in the run. Second, the model-name injection step in qwen-triage.yml now fails the job loudly when the qwen3.7-max signature literal is missing from the skill (previously a silent no-op that would ship the wrong model name in every comment) and escapes sed replacement metacharacters in the model name (previously /, &, or \ in a configured model corrupted the skill text). Third, the terminal status comment said "see the stage comments above", but the status comment is created before the stage comments, so they are below it — now "in this thread".

Why it's needed

Observed on a real /triage re-run of #7693: with four bot comments in the thread (status + stages 1–3), the agent PATCHed the stage=3 comment with stage=1 content mid-run before later self-correcting. Remembered-id bookkeeping is fragile exactly when re-runs matter most — the thread's list order is not the stage order, and one wrong id silently destroys another stage's record. The marker-resolution recipe makes the correct id a lookup, not a memory. The injection hardening closes the two standing failure modes of a raw sed -i "s/…/${OPENAI_MODEL}/g": a renamed literal degrades silently, and an unusual model name writes garbage into the prompt the agent is about to execute.

Reviewer Test Plan

How to verify

  • npx vitest run --config ./scripts/tests/vitest.config.ts qwen-triage-workflow qwen-triage-finalize-workflow — 32 tests pass (1 new). The new test extracts the actual injection step script and runs it against fixture files: a model name carrying / & \ lands verbatim in the skill text, a missing signature literal fails the step with the Signature literal error (file untouched), and an empty model leaves the file untouched with success.
  • Read the Re-runs section of .qwen/skills/triage/references/pr-workflow.md: the stage_comment_id recipe filters on the bot's own login (markers are public text; the PAT may be able to edit others' comments) and uses startswith so a comment merely quoting a marker can't be targeted.

Evidence (Before & After)

Before: on #7693's second /triage re-run, comment 5073149611 (stage=3) was PATCHed to stage=1 content at 21:06:48 UTC before the agent self-corrected at 21:08:37 — visible in that comment's edit history. Injection step: sed -i "s/qwen3\.7-max/${OPENAI_MODEL}/g" with no existence check and no escaping.

After: id resolution is a marker lookup at PATCH time (skill instruction), and the injection behavior is pinned by the new behavioral test. N/A for UI.

Tested on

OS Status
🍏 macOS N/A
🪟 Windows N/A
🐧 Linux

Environment (optional)

vitest via scripts/tests/vitest.config.ts; workflow YAML re-parsed with the repo's yaml package.

Risk & Scope

  • Main risk or tradeoff: the skill change is prompt guidance — the agent must follow it (the deterministic backstop for approvals already lives in the finalize workflow from feat(triage): stop in-agent CI polling, finalize evidence and approval after CI completes #7693). The injection step can now fail the triage job when the literal is renamed without updating the step; that is the intended loud failure, and the test pins the pairing.
  • Not validated / out of scope: no live re-run was driven against a production PR for this change; consolidating stage-comment bookkeeping into a deterministic workflow step (rather than agent-followed instructions) is a possible future step.
  • Breaking changes / migration notes: none.

Linked Issues

Follow-up to #7693 (observations from its shepherding).

中文说明

本 PR 做了什么

加固在护航 #7693 时暴露的两个脆弱点,并修正一处文案。其一,triage skill 的 re-run 评论更新改为在 PATCH 时按 stage 标记现场解析评论 id——过滤 bot 本人作者、startswith 匹配、每次 PATCH 前重新解析——不再信任 agent 在运行早期记住的 id。其二,qwen-triage.yml 的模型名注入步骤在 skill 中找不到 qwen3.7-max 签名字面量时会大声失败(此前是静默 no-op,会让每条评论都带错误模型名),并对模型名中的 sed 替换元字符转义(此前配置的模型名含 /&\ 会写坏 skill 文本)。其三,终态 status 评论写"见上方各阶段评论",但 status 评论创建在最前、各阶段评论在其下方——改为"本线程中"。

为什么需要

#7693 的一次真实 /triage 重跑中观察到:线程里有四条 bot 评论(status + stage 1–3)时,agent 中途把 stage=3 评论 PATCH 成了 stage=1 内容,稍后才自行纠正。记忆式 id 簿记恰恰在最需要 re-run 的场景下最脆弱——线程列表顺序不等于 stage 顺序,一个错误 id 就会静默摧毁另一个 stage 的记录。标记解析法把"正确的 id"变成一次查找而非一段记忆。注入加固则堵住裸 sed -i 的两个既有失败模式:字面量改名后静默退化;特殊模型名向 agent 即将执行的提示词里写入垃圾。

审查者验证方案

  • npx vitest run --config ./scripts/tests/vitest.config.ts qwen-triage-workflow qwen-triage-finalize-workflow —— 32 个测试通过(新增 1 个)。新测试抽取真实注入步骤脚本并对 fixture 文件执行:含 / & \ 的模型名原样落入 skill 文本;签名字面量缺失时步骤以 Signature literal 错误失败(文件不动);模型名为空时文件不动、步骤成功。
  • 阅读 .qwen/skills/triage/references/pr-workflow.mdRe-runs 一节:stage_comment_id 过滤 bot 本人登录名(标记是任何人都能粘贴的公开文本,且 PAT 可能有权编辑他人评论),并用 startswith 防止仅引用标记的评论被误定位。

证据(Before & After)

Before:#7693 第二次 /triage 重跑中,评论 5073149611(stage=3)于 21:06:48 UTC 被 PATCH 成 stage=1 内容,21:08:37 才被 agent 自行纠正——该评论的编辑历史可见。注入步骤为无存在性检查、无转义的裸 sed -i

After:id 解析改为 PATCH 时的标记查找(skill 指令),注入行为由新的行为测试固定。无 UI 变化。

风险与范围

  • 主要风险/权衡:skill 改动属于提示词指导——依赖 agent 遵循(审批的确定性兜底已由 feat(triage): stop in-agent CI polling, finalize evidence and approval after CI completes #7693 的 finalize workflow 承担)。字面量改名而未同步更新注入步骤时 triage job 会失败——这是有意的大声失败,测试固定了这一配对。
  • 未验证/范围外:未针对生产 PR 驱动真实重跑验证本改动;将 stage 评论簿记整体下沉为确定性 workflow 步骤(而非 agent 遵循的指令)是可能的后续方向。
  • 破坏性变更/迁移说明:无。

关联 Issue

#7693 的后续(护航过程中的观察)。

…n model injection

Two hardenings from shepherding QwenLM#7693, plus a wording fix:

- Re-run comment updates now resolve the target comment id by its stage
  marker (bot-author-filtered, startswith match) immediately before each
  PATCH, instead of trusting remembered ids or list positions. Observed on
  a real re-run: the agent PATCHed the stage=3 comment with stage=1 content
  mid-run before self-correcting — with four bot comments in the thread,
  remembered-id bookkeeping is fragile.
- The model-name injection step previously no-opped silently if the
  'qwen3.7-max' literal ever left the skill (shipping the wrong signature
  in every comment), and corrupted the skill text on model names carrying
  sed metacharacters (/ & \). It now fails the job loudly when the target
  literal is missing and escapes the replacement. Covered by a behavioral
  test that runs the extracted step script against fixture files.
- The finalize status text said 'stage comments above', but the status
  comment is created first, so the stage comments are below it — now
  'in this thread'.
@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finishedview run. See the stage comments above for the result.

Qwen Triage 已完成 —— 查看运行。结果见上方各阶段评论。

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓

Problem: observed bug with concrete evidence — the stage=3 comment on #7693 was PATCHed with stage=1 content during a re-run (comment 5073149611, edit history visible). The injection hardening also addresses real sed failure modes (metacharacter corruption, silent no-op on a renamed literal). Not theoretical.

Direction: aligned — internal triage-pipeline robustness, squarely within scope. No public-contract or auth/sandbox concerns.

Size: not applicable (no core module paths touched — CI workflow, skill doc, and test only).

Approach: the three changes (marker-based id resolution, injection escaping + existence check, wording fix) are focused and each earns its place. The two follow-up commits since the initial review are test-only — one pins the stage_comment_id recipe's load-bearing constraints, the other shims BSD sed for the macOS merge-queue job — so the production diff is unchanged and still clean.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓

问题:已观测到的 bug,有具体证据——#7693 的一次重跑中 stage=3 评论被 PATCH 成 stage=1 内容(评论 5073149611,编辑历史可见)。注入加固也针对真实的 sed 失败模式(元字符写坏文本、字面量改名后静默无效)。非理论性问题。

方向:对齐——属于内部 triage 流水线加固,完全在范围内。无公共契约或认证/沙箱方面的顾虑。

规模:不适用(未触及核心模块路径——仅 CI workflow、skill 文档与测试)。

方案:三项改动(基于标记的 id 解析、注入转义 + 存在性检查、文案修正)各自有其必要性。初始审查后的两个后续提交均为测试——一个固定 stage_comment_id 方案的关键约束,另一个为 macOS 合并队列任务兼容 BSD sed——因此生产 diff 未变且依然干净。

进入代码审查 🔍

Qwen Code · qwen3.8-max-preview

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

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Code Review

Independent proposal: given the observed wrong-id PATCH on #7693, I would (1) add a stage_comment_id() lookup to the skill instructions that resolves the comment by its stage marker at PATCH time, filtered to the bot's own login with startswith matching, and (2) harden the injection step with a grep -q existence check before sed and escape the replacement string. For the test's cross-platform compatibility, I'd conditionally shim sed -i for BSD sed on darwin only, since GNU sed would misparse the empty extension argument. The PR matches this approach closely.

Findings — no critical blockers.

The injection escaping (sed -e 's/[&/\]/\\&/g') correctly handles all three sed replacement metacharacters (&, /, \). The early-exit on empty model is cleaner than the old if [ -n ... ] wrapper. The grep -q existence check turns a silent no-op into a loud ::error:: + exit 1, which is the right failure mode.

The stage_comment_id() recipe is well-designed: the BOT_LOGIN filter prevents editing other users' comments that happen to contain the marker text, startswith (not contains) prevents false matches on comments that merely quote the marker, and last picks the most recent match. The instruction to re-resolve immediately before each PATCH (not cache from earlier) directly addresses the observed failure.

The pinning test for the recipe slices the skill's Re-runs section and asserts the load-bearing constraints are present (stage_comment_id(), the bot-author filter, startswith($m), the re-resolve-before-each-patch note) and that contains($m) is absent. Each assertion holds against the recipe text, and the .not.toContain('contains($m)') check is safe because the surrounding prose mentions contains only without the ($m) argument.

The latest commit (3800f257) adds a BSD sed shim for the macOS merge-queue job: sed -i on darwin requires an extension argument, so the test rewrites sed -i sed -i '' only when process.platform === 'darwin'. The conditional is correct — an unconditional rewrite would break GNU sed on Linux (the separated '' would be parsed as the sed script, not the -i suffix). The comment explains the reasoning clearly. This is a necessary fix for the test to pass on both platforms.

Testing

This is a CI/infra change with no user-visible behavior — real-scenario tmux testing is N/A.

CI evidence from the PR's own check runs on 3800f257b856e573e963ae67b42dfc6106a27660:

Check Conclusion
precheck-pr / precheck ✅ success
Classify PR ✅ success
label ✅ success
authorize ✅ success
Remind on force-push ✅ success
review-scan ✅ success
remove-suspicious-attachments ✅ success
route ✅ success
Test (ubuntu-latest, Node 22.x) ⏳ in_progress
Test (macos-latest, Node 22.x) skipped
Test (windows-latest, Node 22.x) skipped
Integration Tests (CLI, No Sandbox) skipped

The ubuntu test suite is still running on the new head. macOS/Windows tests and integration tests are skipped (expected for a workflow/skill/test-only change). Deferring approval until CI lands green.

Not verified: no live re-run was driven against a production PR (author notes this is out of scope; the behavioral test pins the injection logic and the pinning test guards the recipe constraints).

中文说明

代码审查

独立方案: 针对观测到的错误 id PATCH,我会 (1) 在 skill 指令中添加一个 stage_comment_id() 查找函数,在 PATCH 时按标记解析评论 id,过滤 bot 自身登录名并使用 startswith 匹配;(2) 在注入步骤中用 grep -q 存在性检查 + 转义替换字符串来加固。对于测试的跨平台兼容性,我会仅在 darwin 上有条件地为 BSD sed 添加 -i 扩展参数,因为 GNU sed 会误解空的扩展参数。PR 的方案与此高度一致。

发现——无关键阻塞项。

注入转义(sed -e 's/[&/\]/\\&/g')正确处理了所有三个 sed 替换元字符(&/\)。空模型时的提前退出比旧的 if [ -n ... ] 包装更清晰。grep -q 存在性检查将静默无效变为响亮的 ::error:: + exit 1,这是正确的失败模式。

stage_comment_id() 设计良好:BOT_LOGIN 过滤防止编辑恰好包含标记文本的其他用户评论,startswith(非 contains)防止引用标记的评论被误匹配,last 取最新匹配。每次 PATCH 前重新解析(而非缓存)的指令直接解决了观测到的故障。

固定测试切取 skill 的 Re-runs 段落,断言关键约束存在(stage_comment_id()、bot 作者过滤、startswith($m)、每次 PATCH 前重新解析的注释),并断言不存在 contains($m)。逐条对照方案文本核验——均成立。

最新提交(3800f257)为 macOS 合并队列任务添加了 BSD sed 兼容:darwin 上的 sed -i 需要扩展参数,因此测试仅在 process.platform === 'darwin' 时将 sed -i 重写为 sed -i '' 。条件判断是正确的——无条件重写会破坏 Linux 上的 GNU sed(分离的 '' 会被解析为 sed 脚本而非 -i 后缀)。注释清晰地解释了原因。这是测试在两个平台上通过的必要修复。

测试

这是 CI/基础设施变更,无用户可见行为——真实场景 tmux 测试不适用。

CI 证据来自 PR 自身在 3800f257b856e573e963ae67b42dfc6106a27660 上的检查运行(见上方表格)。ubuntu 测试套件在新 head 上仍在运行。macOS/Windows 测试和集成测试已跳过(对于 workflow/skill/测试-only 变更属预期)。将推迟批准直到 CI 全绿。

未验证:未针对生产 PR 驱动真实重跑(作者注明这不在范围内;行为测试固定了注入逻辑,固定测试守护了方案约束)。

Qwen Code · qwen3.8-max-preview

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

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Confidence: 4/5 — clean, well-evidenced fix; the new head adds a correct BSD sed shim on top of the already-reviewed hardening and pinning test.

This PR solves a real problem verifiable from the #7693 edit history — a wrong-id PATCH that silently destroyed another stage's comment. The marker-resolution recipe is the right fix: it turns a fragile memory into a deterministic lookup, and the author filter + startswith matching close the obvious false-positive paths. The injection hardening is textbook-correct (escape the three sed metacharacters, fail loudly on a missing literal) and the behavioral test pins it.

The two test-only commits since the initial review are both sensible: one pins the skill recipe's load-bearing constraints so they can't silently regress, the other makes the injection test pass on macOS by shimming BSD sed's -i extension requirement — conditionally, so GNU sed on Linux (which mirrors production) is unaffected. The approach matches my independent proposal at every point, and every change in the diff is needed for the stated goal.

If I had to maintain this in six months, I'd thank the author: the recipe is self-documenting, the tests extract the real artifacts (not copies), the failure modes are loud rather than silent, and the cross-platform shim is clearly commented.

Approval deferred until CI lands green on 3800f257b856e573e963ae67b42dfc6106a27660 (ubuntu suite still running).

中文说明

置信度:4/5 —— 干净、有充分证据的修复;新 head 在已审查的加固和固定测试之上添加了一个正确的 BSD sed 兼容层。

这个 PR 解决了一个可以从 #7693 编辑历史中验证的真实问题——一次错误 id 的 PATCH 静默摧毁了另一个阶段的评论。标记解析方案是正确的修复:将脆弱的记忆变为确定性查找,作者过滤 + startswith 匹配封堵了明显的误匹配路径。注入加固是教科书式正确的(转义三个 sed 元字符,缺失字面量时大声失败),行为测试固定了这一逻辑。

初始审查后的两个纯测试提交都很合理:一个固定 skill 方案的关键约束使其不会静默退化,另一个通过为 BSD sed 的 -i 扩展参数添加兼容层使注入测试在 macOS 上通过——有条件地,因此 Linux 上的 GNU sed(镜像生产环境)不受影响。方案在每个点上都与我的独立提议一致,diff 中每项改动都是目标所必需的。

如果六个月后我要维护这段代码,我会感谢作者:方案是自文档化的,测试提取的是真实产物(而非副本),失败模式是响亮的而非静默的,跨平台兼容层有清晰的注释。

批准推迟到 CI 在 3800f257b856e573e963ae67b42dfc6106a27660 上全绿后执行(ubuntu 套件仍在运行)。

Qwen Code · qwen3.8-max-preview

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

The previous commit let prettier rewrite untouched lines (runs-on quoting,
comment spacing) while formatting the edited step. Restore those lines to
main's form; the diff now carries only the injection hardening and the
status wording fix.
@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

Fair nit — that was prettier reformatting untouched lines (the runs-on: quoting rewrites and uses: comment spacing) when I formatted the edited step. Dropped in the follow-up commit: the workflow diff is now only the injection hardening and the status wording fix (17+/4-). Re-running @qwen-code /triage for the new head once this lands.

中文合理的 nit——那是 prettier 在格式化被编辑步骤时顺手改写了未触碰的行(`runs-on:` 引号风格与 `uses:` 注释空格)。已在后续提交中还原:workflow 的 diff 现在只含注入加固与状态文案修正(17+/4-)。落地后会为新 head 重新触发 `@qwen-code /triage`。

@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Triage re-run completed without a new review.

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

@wenshao

wenshao commented Jul 25, 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 Jul 25, 2026

@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. Suggestions are inline.

中文说明

已审查。 建议见行内评论。

— qwen3.7-max via Qwen Code /review

Comment thread .qwen/skills/triage/references/pr-workflow.md
Guards the startswith match and the bot-author filter in the skill's re-run
comment-id recipe against silent regression — a contains match or a dropped
author filter re-introduces the wrong-comment-overwrite bug this PR fixes.
@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

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 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.

⚠️ Downgraded from Approve to Comment: CI still running. Reviewed.

中文说明

⚠️ 已从批准降级为评论:CI still running。 已审查。

— qwen3.7-max via Qwen Code /review

@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.

Not reviewed: Agent 0: Issue fidelity & root-cause ownership, Agent 1a: Line-by-line correctness, Agent 2: Security, Agent 3: Code quality, Agent 4: Performance & efficiency, Agent 5: Test coverage, Agent 6a: Undirected audit — attacker mindset, Agent 6b: Undirected audit — 3 AM oncall mindset, Agent 6c: Undirected audit — six-months-later maintainer, Agent 1b: Removed-behavior audit, Agent 1c: Cross-file tracer, Agent 7: Build & test verification — its prompt was built, but no agent on record was launched with it.

— qwen3.7-max via Qwen Code /review

Comment thread scripts/tests/qwen-triage-workflow.test.js
The extracted step script uses GNU 'sed -i' (the step only runs on ubuntu
runners), but this suite also runs in the macOS merge-queue job where BSD
sed needs an extension argument after -i. Rewrite to sed -i '' on darwin
only — on GNU sed a separated '' parses as the sed script, so the
unconditional rewrite would break the Linux runs that mirror production.
@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

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 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.

No issues found. LGTM! ✅

中文说明

未发现问题。LGTM!✅

— qwen3.7-max via Qwen Code /review

@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

Note for the record: this PR served as the first live verification of the #7693 finalize loop, and it caught a real gap. The deferred approval for 3800f257b was silently dropped — the finalize run fired on time but commits/{sha}/pulls returned an empty list for this fork PR's current head, so it logged No open PR; nothing to finalize and exited (the review-pr cycle's own approval covered this PR instead). Fix: #7706 resolves PRs from the open-PR list filtered by head.sha (verified to return exactly this PR for the same SHA at the failure moment), keeping the association endpoint as a secondary source. The rest of the loop verified clean on this PR: markers emitted per stage, table region rewritten in place, approval correctly withheld while CI ran, stale firings no-op'd safely.

中文备忘:本 PR 是 #7693 finalize 闭环的首次实链路验证,并抓到一个真实缺口。`3800f257b` 的延迟审批被静默丢弃——finalize 准时触发,但 `commits/{sha}/pulls` 对本 fork PR 的现任 head 返回空列表,于是记录 `No open PR; nothing to finalize` 后退出(本 PR 的审批由 review-pr 周期补位)。修复:#7706 改为按 `head.sha` 过滤开放 PR 列表解析(故障当时实测对同一 SHA 恰好返回本 PR),关联端点降为次要来源。闭环其余部分在本 PR 上验证干净:各阶段 marker 正确发出、表格区域原地重写、CI 未完时正确不审批、过期触发安全 no-op。

@wenshao

wenshao commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

@doudouOUC The sed portability Critical is fixed in 3800f25 (darwin-only shim — an unconditional sed -i '' would break GNU sed, detail in the thread reply). CI is green and the thread is resolved — PTAL when you have a moment. / sed 可移植性问题已在 3800f25 修复(仅 darwin 生效的 shim),CI 全绿,烦请复审。

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

中文说明

🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。移除 autofix/takeover 标签(或评论 @qwen-code /takeover stop)即可释放。

@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. 1 Suggestion-level finding(s) could not be anchored to a changed line and were dropped; nothing further to act on here. Not reviewed: chunk 1 — no agent reported covering these; nobody read them. Not reviewed: security — Agent 2 failed to launch twice. Not reviewed: six-months-later maintainer — Agent 6c failed to launch twice. Not reviewed: build-and-test — Agent 7 failed to launch twice. Not reviewed: PR #7703 hardens the triage pipeline's comment-id resolut... — pointed at diff lines it never opened: it made tool calls, but none of them read the diff. Not reviewed: every dimension — none of the 12 required agents is on record as launched with a prompt this skill built, so this diff was reviewed, if at all, from prompts the run wrote for itself: no record shows the severity bar, the finding format or this project's own rules reaching an agent.

— qwen3.7-max via Qwen Code /review

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下:

No changes made this round — all actionable feedback is already addressed in the current HEAD.

Finding Source Status
rc:3649374732 — add a structural test pinning stage_comment_id() constraints (startswith over contains, bot-author filter) @qwen-code-ci-bot [Suggestion] Already implemented in cb3904147 (test: "pins the re-run comment-id recipe to startswith and the bot-author filter"). Confirmed by @wenshao in the thread.
rc:3649447423 — sed -i without backup extension breaks BSD sed on macOS merge-queue CI @doudouOUC [Critical] Already implemented in 3800f257b (darwin-only shim; an unconditional sed -i '' would break GNU sed). Confirmed by @wenshao in the thread.

The remaining review entries carry no new inline findings: two COMMENTED reviews with empty bodies, one CHANGES_REQUESTED that is a meta-note about the review-agent launch process (no code feedback), and informational issue-level comments about the #7693 finalize-loop verification and #7706.

中文说明

本轮未做任何改动——所有可操作的反馈均已在当前 HEAD 中处理完毕。

反馈 来源 状态
rc:3649374732 — 添加结构性测试,固定 stage_comment_id() 的关键约束(startswith 而非 contains、bot 作者过滤) @qwen-code-ci-bot [建议] 已在 cb3904147 中实现(测试:"pins the re-run comment-id recipe to startswith and the bot-author filter")。@wenshao 已在帖子中确认。
rc:3649447423 — 不带备份扩展名的 sed -i 会在 macOS merge-queue CI 上弄坏 BSD sed @doudouOUC [严重] 已在 3800f257b 中实现(仅 darwin 生效的 shim;无条件的 sed -i '' 会弄坏 GNU sed)。@wenshao 已在帖子中确认。

其余审查条目不含新的行内发现:两条正文为空的 COMMENTED 审查、一条 CHANGES_REQUESTED(内容是关于审查 agent 启动流程的元说明,无代码反馈),以及关于 #7693 finalize 闭环验证与 #7706 的信息性 issue 级评论。

Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。


🧠 Handled by Qwen Code · model/模型 qwen3.8-max-preview

@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.

Approve

Three solid hardening fixes, each addressing an observed production failure:

  1. Stage comment resolution at PATCH time — the old "remember the id" pattern caused stage=3 to clobber stage=1 on re-runs. The new startswith + bot-author filter + re-resolve-before-each-patch is the right defensive pattern. Good call on startswith over contains.

  2. Model name injection — two failure modes closed: silent no-op when the signature literal drifts (now fails loud), and sed metacharacter corruption (&, /, \ now escaped). The cross-platform sed shim in tests (GNU vs BSD) is a nice touch.

  3. Wording fix — "above" → "in this thread" is more accurate for GitHub's threaded comment UI.

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下:

Autofix review triage — no action taken

I triaged the review feedback on PR #7703 and found nothing actionable to
address
, so no code change was made.

How the feedback was classified

  • The one Suggestion-level finding was dropped, not delivered. The
    automated reviewer reports it "could not be anchored to a changed line and
    were dropped; nothing further to act on here." No finding text, file, or line
    was provided, so there is nothing concrete to implement or decline.
  • The "Not reviewed" lines are review-harness failures, not code findings.
    Each one (chunk 1 uncovered, security/build-and-test/six-months-later agents
    failing to launch, an agent that "pointed at diff lines it never opened")
    describes the /review run itself malfunctioning. None of them alleges a
    defect in this PR's code, so none maps to a change I can make here. A broken
    review run is fixed by re-running the review, not by editing this PR.
  • No inline comments, no issue-level comments, no failed checks, and no
    still-red checks
    were listed for this evaluation round.

Conclusion

With the sole suggestion dropped and the remaining content being
infrastructure noise from a failed review run, there is no defect to fix, no
suggestion to implement or record a deferral for, and no open question to
escalate. The branch is left unchanged.

中文说明

Autofix 评审分诊 —— 未采取任何操作

我对 PR #7703 的评审反馈进行了分诊,没有发现任何需要处理的可操作项,因此未做任何代码改动。

反馈分类结果

  • 唯一的一条 Suggestion 级发现已被丢弃,并未实际给出。 自动评审器报告称它"无法锚定到任何被修改的行,因而被丢弃;此处没有更多需要处理的内容"。由于没有提供发现的具体内容、文件或行号,因此没有任何可实施或可拒绝的具体事项。
  • "Not reviewed"(未评审)各行是评审工具自身的故障,而非代码发现。 其中每一条(chunk 1 未被覆盖、security/build-and-test/six-months-later 等评审代理启动失败、某个代理"指向了它从未打开过的 diff 行")描述的都是 /review 这次运行本身出了问题。它们没有一条指控本 PR 代码存在缺陷,因此没有一条能对应到我在此处可以做出的改动。评审运行损坏应通过重新运行评审来修复,而不是修改本 PR。
  • 本轮评估中没有列出任何行内评论、issue 级评论、失败检查,也没有持续未通过的检查

结论

由于唯一的建议已被丢弃,其余内容均为一次失败评审运行产生的基础设施噪声,因此没有需要修复的缺陷、没有需要实施或记录延期的建议、也没有需要上报的待决问题。本分支保持原样,未做改动。

Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。


🧠 Handled by Qwen Code · model/模型 qwen3.8-max-preview

@wenshao
wenshao added this pull request to the merge queue Jul 25, 2026
Merged via the queue into QwenLM:main with commit 52f6eaf Jul 25, 2026
85 checks passed
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