feat(autofix): surface the running model in every autofix report - #7226
Conversation
Every visible autofix comment now carries a footer naming Qwen Code and the model it ran — for diagnosis (which model produced this) and as a small attribution for our own model. Four surfaces: the review-address fixed report, the no-action report, the handoff report, and the issue-phase PR's E2E comment. The model comes from the QWEN_PR_REVIEW_MODEL repo variable — already the agent's OPENAI_MODEL, a variable not a secret, so it is safe to echo into a public comment. Each reporting step plumbs it in and computes MODEL_DISPLAY with a 'default' fallback so an unset variable never renders a bare backtick pair. The footer sits with the report body (before the eval marker), and on the E2E path it is appended after the model's file, never injected mid-generation. Contract test pins the env plumbing and the footer on all four surfaces (twice in push-and-report, which carries both bodies), plus the append-after ordering on the E2E path. 61/61 + 12/12.
|
Thanks for the PR! Template looks good ✓ — the "Why it's needed" content is folded into "What this PR does" and the evidence section is adapted for a non-UI change, both fine for a CI workflow PR. Problem: this is a feature addition, not a bug fix — no reproduction needed. The motivation is clear: when an autofix run behaves oddly, there's currently no way to tell which model produced the result. The footer also adds a small attribution for Qwen Code. Both reasons are stated as maintainer-requested. Direction: aligned. This is internal CI tooling that improves observability of the autofix pipeline. No auth, sandbox, model selection, telemetry, release, or public contract concerns. The model name comes from Size: not applicable — no core paths touched ( Approach: the scope feels right. Four reporting surfaces each get the same one-line footer via a shared Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ —— "Why it's needed" 内容合并在 "What this PR does" 中,证据部分针对非 UI 变更做了调整,对 CI workflow PR 来说完全合理。 问题:这是功能新增,不是 bug 修复——无需复现。动机清晰:autofix 运行异常时,目前无法判断结果是哪个模型产出的。footer 同时为 Qwen Code 做了一点署名。两个目的均标注为维护者要求。 方向:对齐。这是内部 CI 工具的可观测性改进。不涉及 auth、sandbox、模型选择、遥测、发布或公开契约。模型名取自 规模:不适用——未触及核心路径(仅 方案:范围合理。四个报告位置通过共享的 进入代码审查 🔍 — Qwen Code · qwen3.7-max Reviewed at |
Code ReviewIndependent proposal: given the goal "name the model in every autofix comment", I'd read Comparison with the diff: the PR does exactly this, and does it cleanly.
No critical blockers. No AGENTS.md violations. No security concerns. TestingThis is a CI workflow change — the modified code runs inside GitHub Actions, not in the CLI. There is no user-facing TUI behavior to drive in tmux; the footer only appears when an autofix run completes on GitHub. The appropriate verification is unit tests + static checks: 61/61 autofix tests pass (including the new model-attribution test), 12/12 fleet-shepherd tests pass (untouched), YAML parses, and all modified 中文说明代码审查独立方案: 给定"在每条 autofix 评论中标注模型"的目标,我会将 与 diff 对比: PR 完全按此实现,且很干净。
无关键阻断。无 AGENTS.md 违规。无安全顾虑。 测试这是 CI workflow 变更——修改的代码在 GitHub Actions 中运行,不在 CLI 中。没有用户可见的 TUI 行为可在 tmux 中驱动;footer 只有在 GitHub 上 autofix 运行完成时才出现。合适的验证是单元测试 + 静态检查: 61/61 autofix 测试通过(含新的模型标注测试),12/12 fleet-shepherd 测试通过(未改动),YAML 可解析,所有修改的 — Qwen Code · qwen3.7-max Reviewed at |
|
Confidence: 5/5 — clean across every stage; would merge without hesitation. This is exactly the kind of PR I like to see: small, focused, and solving a real operational need. The diff does one thing — names the model in autofix comments — and does it in the most straightforward way possible. My independent proposal and the actual implementation are essentially identical, which means there wasn't a simpler path the author missed. The If I had to maintain this in six months, I'd thank the author — the footer is self-documenting, the env var comment explains why it's safe to echo, and the test would catch any surface that loses the plumbing. No reservations. Shipping it. ✅ 中文说明置信度:5/5 —— 每个阶段都干净;毫不犹豫地合入。 这正是我喜欢看到的 PR:小、聚焦、解决真实的运维需求。diff 只做一件事——在 autofix 评论中标注模型——而且用最直接的方式完成。我的独立方案和实际实现基本一致,说明作者没有遗漏更简路径。
如果六个月后我来维护,我会感谢作者——footer 自解释,env 变量注释说明了为何可以安全回显,测试会捕获任何丢失注入的位置。 无保留意见。合入。 ✅ — Qwen Code · qwen3.7-max Reviewed at |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
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. |
wenshao
left a comment
There was a problem hiding this comment.
— qwen3.8-max-preview via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed — no blockers. Suggestions are inline.
— qwen3.8-max-preview via Qwen Code /review
Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com>
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅
— qwen3.8-max-preview via Qwen Code /review
|
LGTM — additive display text, no behavior change. Confirmed the parts worth checking: |
|
Released in v0.20.1. |
What this PR does
Adds a one-line footer to every visible autofix comment, naming Qwen Code and the model it ran:
Four surfaces: the review-address fixed report, the no-action report, the handoff report, and the issue-phase PR's E2E comment.
Two reasons, both requested by the maintainer: diagnosis (which model produced a given result — invaluable when a run behaves oddly) and a small attribution for our own model.
How it works
The model comes from the
QWEN_PR_REVIEW_MODELrepo variable — already the agent'sOPENAI_MODEL, a variable (not a secret), so it is safe to echo into a public comment. Each reporting step plumbs it into its env and computesMODEL_DISPLAY="${MODEL:-default}", so an unset variable rendersdefaultrather than a bare backtick pair. The footer sits with the workflow-authored report body (immediately before the invisible<!-- autofix-eval -->marker); on the E2E path it is appended to the model-authored file after generation, never injected mid-stream.Reviewer Test Plan
How to verify
npx vitest run scripts/tests/qwen-autofix-workflow.test.js— 61/61. The new test pins theMODELenv plumbing and the footer on all four surfaces (it appears twice in push-and-report, which carries both the fixed and no-action bodies), thedefaultfallback, and the append-after ordering on the E2E path.npx vitest run scripts/tests/qwen-fleet-shepherd-workflow.test.js— 12/12 (untouched).run:block passesbash -n; the footer's escaped backticks render as inline code (verified by executing the body).Evidence (rendered footer)
Tested on
Risk & Scope
QWEN_PR_REVIEW_MODELis a non-secret repo variable already exposed asOPENAI_MODELand in logs; echoing it into a comment leaks nothing new. Purely additive display text.Linked Issues
Independent of, but best seen after, #7225 (P0 review-address fix).
中文说明
本 PR 做了什么
给每一条可见的 autofix 评论加一行 footer,标注 Qwen Code 与本次运行的模型:
四个出现位置:review-address 的已修复报告、无需改动报告、**交接(handoff)**报告,以及 issue 阶段新建 PR 的 E2E 评论。
两个目的(均为维护者要求):诊断(某次结果是哪个模型产出的 —— 运行异常时极有价值)与给自家模型做一点署名/广告。
实现方式
模型取自
QWEN_PR_REVIEW_MODEL仓库变量 —— 本就是 agent 的OPENAI_MODEL,是变量而非 secret,写入公开评论无泄露风险。每个报告步骤把它注入 env 并计算MODEL_DISPLAY="${MODEL:-default}",变量为空时显示default而非空的反引号对。footer 位于 workflow 生成的报告正文中(紧邻不可见的<!-- autofix-eval -->marker 之前);E2E 路径上则在模型生成文件之后追加,绝不中途注入。评审验证
npx vitest run scripts/tests/qwen-autofix-workflow.test.js—— 61/61。新测试钉住四处的MODELenv 注入与 footer(在同时承载「已修复 + 无需改动」两个正文的 push-and-report 中出现两次)、default兜底,以及 E2E 路径的「先生成后追加」顺序。npx vitest run scripts/tests/qwen-fleet-shepherd-workflow.test.js—— 12/12(未改动)。run:块通过bash -n;footer 的转义反引号渲染为行内代码(已实跑正文验证)。风险与范围
QWEN_PR_REVIEW_MODEL是非 secret 仓库变量,本就作为OPENAI_MODEL暴露、也出现在日志中,写入评论不新增泄露。纯展示文本、只增不改。关联 Issue
与 #7225(P0 review-address 修复)相互独立,但建议在其合入后查看效果。