fix(ci): inject actual model name into triage signature - #7475
Conversation
The triage skill template hardcodes 'qwen3.7-max' in the comment signature line. When QWEN_TRIAGE_MODEL is changed to a different model, the signature still shows the old name. Add a prepare step that replaces the hardcoded model name in pr-workflow.md with the actual OPENAI_MODEL value before triage runs.
|
Thanks for the PR! Template looks good ✓ Problem: observed — the triage bot's comment on #7298 signs off with Direction: aligned — this is CI automation accuracy. The signature should reflect the model actually doing the work. No product-direction concerns. Size: not applicable (CI workflow file, not core infrastructure). Approach: the scope feels right — a single Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:已观测到——triage bot 在 #7298 的评论中签名为 方向:对齐——这是 CI 自动化准确性修复。签名应反映实际工作的模型。无产品方向顾虑。 规模:不适用(CI workflow 文件,非核心基础设施)。 方案:范围合理——在 agent 运行前用 进入代码审查 🔍 — Qwen Code · qwen3.7-max Reviewed at |
Code ReviewIndependent proposal: given the problem (hardcoded model name in the skill template), I'd add a workflow step that Diff assessment: the implementation matches the independent proposal. The step is correctly placed after checkout and before the triage action. The TestingCI workflow change — no user-facing product behavior to drive. Tested the
中文说明代码审查独立方案: 给定问题(skill 模板中硬编码的模型名),我会添加一个 workflow 步骤,用 Diff 评估: 实现与独立方案匹配。步骤正确放置在 checkout 之后、triage action 之前。 测试CI workflow 变更——无用户可见的产品行为可驱动。本地测试了
— Qwen Code · qwen3.7-max Reviewed at |
|
Confidence: 5/5 — clean, minimal CI fix that does exactly what it says. Ten lines, one 中文说明置信度:5/5 — 干净、最小的 CI 修复,完全如其所述。 十行代码,一个 — 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. |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed — no blockers. Suggestions are inline. 1 Suggestion-level finding(s) could not be anchored to a changed line and were dropped; nothing further to act on here.
— qwen3.7-max via Qwen Code /review
| run: |- | ||
| set -euo pipefail | ||
| if [ -n "${OPENAI_MODEL:-}" ]; then | ||
| sed -i "s/qwen3\.7-max/${OPENAI_MODEL}/g" .qwen/skills/triage/references/pr-workflow.md |
There was a problem hiding this comment.
[Suggestion] The sed substitution uses / as its delimiter, which will break if the model name variable contains a / — Failure scenario: setting vars.QWEN_TRIAGE_MODEL to a namespaced identifier like dashscope/qwen-max-latest or openai/gpt-4o expands to s/qwen3\.7-max/dashscope/qwen-max-latest/g, which sed rejects as an unterminated command. Under set -euo pipefail the step aborts and no triage comment is posted.
| sed -i "s/qwen3\.7-max/${OPENAI_MODEL}/g" .qwen/skills/triage/references/pr-workflow.md | |
| sed -i "s|qwen3\.7-max|${OPENAI_MODEL}|g" .qwen/skills/triage/references/pr-workflow.md |
— qwen3.7-max via Qwen Code /review
|
This PR merged while automation was applying the review suggestion. I pushed f8f62f3 to the branch with the one-line sed delimiter fix, but it is not part of merge commit 962f9e0 and main still has the old |
What this PR does
Adds a prepare step in
qwen-triage.ymlthat replaces the hardcoded model name (qwen3.7-max) in.qwen/skills/triage/references/pr-workflow.mdwith the actualOPENAI_MODELvalue (sourced fromQWEN_TRIAGE_MODEL) before the triage agent runs. This ensures the comment signature line (— _Qwen Code · <model>_) always reflects the model actually used.Why it's needed
The triage skill template hardcodes
qwen3.7-maxin the signature footer (pr-workflow.md line 61). The workflow correctly readsQWEN_TRIAGE_MODELintoOPENAI_MODELfor the model call, but the signature template is a separate static string — changing the model variable has no effect on the displayed name. See #7298 comment where the signature showsqwen3.7-maxregardless of the configured model.Reviewer Test Plan
How to verify
QWEN_TRIAGE_MODELto a model name different fromqwen3.7-max(e.g.qwen3.8-max)— _Qwen Code · qwen3.8-max_instead ofqwen3.7-maxQWEN_TRIAGE_MODELand confirm the fallbackQWEN_PR_REVIEW_MODELvalue is usedqwen3.7-maxremainsEvidence (Before & After)
N/A — CI automation change only.
Tested on
Environment (optional)
N/A — GitHub Actions workflow change.
Risk & Scope
sedreplacement is global (/g); ifqwen3.7-maxappears elsewhere in pr-workflow.md it will also be replaced. Currently it only appears in signature lines, so this is safe.Linked Issues
Ref #7298
中文说明
这个 PR 做了什么
在
qwen-triage.yml中增加一个准备步骤,在 triage agent 运行前,将.qwen/skills/triage/references/pr-workflow.md中硬编码的模型名(qwen3.7-max)替换为实际的OPENAI_MODEL值(来源于QWEN_TRIAGE_MODEL)。确保评论签名行始终反映实际使用的模型。为什么需要
triage skill 模板在签名中硬编码了
qwen3.7-max(pr-workflow.md 第 61 行)。workflow 虽然正确读取了QWEN_TRIAGE_MODEL用于模型调用,但签名模板是独立的静态字符串,修改模型变量不会影响显示的名称。审查测试计划
如何验证
QWEN_TRIAGE_MODEL设为非qwen3.7-max的模型名QWEN_TRIAGE_MODEL,确认回退到QWEN_PR_REVIEW_MODELqwen3.7-max证据(前后对比)
N/A — 仅 CI 自动化变更。
测试平台
环境(可选)
N/A — GitHub Actions workflow 变更。
风险与范围
sed使用全局替换,如果qwen3.7-max出现在 pr-workflow.md 的其他位置也会被替换。目前仅出现在签名行,安全。关联 Issue
Ref #7298