ci(autofix): number the status comment like every other round message - #7748
Conversation
`effective_round` counts rounds already finished, and "Push and report" posts ROUND + 1 as the round it just performed. The status comment used the raw value, so the same round showed two numbers in one thread — observed on #7724 at 10:10 UTC: the report said "round 6/100" while the status said "AutoFix round 5 finished". Display ROUND + 1 in both status messages, guarded so a missing or non-numeric round degrades to the raw value instead of failing the step.
|
@qwen-code /takeover |
|
✅ Qwen Triage finished — CI landed green on ✅ Qwen Triage 已完成 —— |
|
🤝 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 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。移除 |
|
Thanks for the PR! Template looks good ✓ Problem: observed bug with concrete evidence — on #7724 the status comment said "round 5 finished" while the round report in the same thread said "round 6/100". Same round, two different numbers. That's exactly the confusion the status comment exists to prevent. Direction: aligned. This is a display-only consistency fix in the autofix CI loop — no product direction concerns. Size: not applicable (no core module paths touched). Approach: the scope is exactly right — two identical 6-line additions at the two status comment sites, incrementing Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:已观测到的 bug,有具体证据——在 #7724 上,状态评论写 "round 5 finished",而同一线程中的轮次报告写 "round 6/100"。同一轮出现两个编号,恰恰是状态评论本该消除的困惑。 方向:对齐。这是 autofix CI 循环中的纯显示一致性修复,无产品方向顾虑。 规模:不适用(未触及核心模块路径)。 方案:范围恰好——在两个状态评论位置各加 6 行相同代码,将 进入代码审查 🔍 — Qwen Code · qwen3.8-max-preview Reviewed at |
Code ReviewIndependent proposal: the round report numbers the round being performed ( Comparison with the diff: the PR does exactly this, and nothing more. Both sites get the same 6-line block — set One thing I verified: No findings. TestingThis is an unattended CI run — PR code is never executed here. Evidence comes from the PR's own CI checks: Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 Ubuntu unit test is still running. macOS/Windows/Integration are skipped (expected for this change — CI-only, no runtime code). The finalize workflow will update this table when CI settles. Not verified: live autofix round behavior (requires a real autofix run; the author reports exercising the display logic directly and mutation-testing the pinning assertions). 中文说明代码审查独立方案: 轮次报告按正在执行的轮次编号( 与 diff 对比: PR 完全按此方案实现,且无多余改动。两处各加相同的 6 行代码块——设置 已验证: 无发现。 测试这是无人值守 CI 运行——此处不执行 PR 代码。证据来自 PR 自身的 CI 检查。Ubuntu 单元测试仍在运行中。macOS/Windows/集成测试已跳过(符合预期——仅 CI 改动,无运行时代码)。finalize 工作流会在 CI 结束后更新此表。 未验证:实际 autofix 轮次行为(需要真实的 autofix 运行;作者报告已直接验证显示逻辑并对钉住断言做了变异测试)。 — Qwen Code · qwen3.8-max-preview Reviewed at |
|
Confidence: 5/5 — clean, minimal fix for an observed inconsistency; would merge without hesitation. This is exactly the kind of PR the gate should wave through quickly. The bug is real and concretely evidenced (two messages in #7724, same round, different numbers). The fix is the smallest possible change — two identical 6-line blocks that increment the display value, guarded so a missing round number degrades instead of crashing a best-effort step. No control flow touched, no round accounting changed, nothing beyond what the stated goal needs. The test pins both sites and the author mutation-verified the assertions. My independent proposal matched the PR's approach exactly — I didn't find a simpler path it missed. If I had to maintain this in six months, the comment at each site tells me precisely why the increment is there. Approval deferred until CI lands green on 中文说明置信度:5/5 —— 干净、最小化的修复,针对已观测到的不一致;毫不犹豫地合并。 这正是 gate 应该快速放行的 PR。bug 真实且有具体证据(#7724 中两条消息,同一轮,不同编号)。修复是最小可能的改动——两个相同的 6 行代码块递增显示值,加守卫使缺失的轮次号降级而非让尽力而为的步骤崩溃。未触及控制流,未改轮次计数,没有超出目标所需的任何改动。测试钉住了两处,作者还做了变异验证。 我的独立方案与 PR 方案完全一致——没找到更简路径。如果半年后维护这段代码,每处的注释会告诉我为什么需要这个递增。 审批延迟至 CI 在 — Qwen Code · qwen3.8-max-preview Reviewed at |
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.
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.
No issues found. LGTM! ✅
中文说明
未发现问题。LGTM!✅
— qwen3.7-max via Qwen Code /review
Independent local verification report (Linux)Verdict: verified — the off-by-one premise is real in the workflow source, the fix's shell behaves exactly as claimed on all three inputs, the pinning test kills the mutation, and the test-failure set is byte-identical to main. 1. Premise check (the report really does print ROUND + 1)The round report step computes 2. Shell behavior, executed directly (tmux)Extracted the exact patched snippet and ran it:
3. Tests — attribution and mutation
ConclusionThesis: one thread, one numbering convention — and the convention to converge on is the one the report (and the markers) already use. Evidence: the premise located in the workflow source (§1), the three claimed input/output pairs reproduced by executing the real snippet (§2), and an identical failure set plus a mutation-killed pin (§3). Display-only, guarded, matches its description exactly. LGTM. 中文摘要Linux 本地独立验证:前提属实——报告步骤用 — independent review loop, executed-snippet verification on Linux |
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: No changes this roundThere is no actionable feedback to address on PR #7748.
The PR stays as-is: a display-only, guarded change that numbers the status 中文说明本轮无需修改PR #7748 没有任何需要处理的可执行反馈。
PR 保持现状:一处纯显示层、带保护的修改,让状态评论采用与轮次报告及标记相同的「正在执行的轮次」编号约定,外加一个钉桩测试。 Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧠 Handled by Qwen Code · model/模型 |
yiliang114
left a comment
There was a problem hiding this comment.
Approve ✅
Clean off-by-one fix for #7738's status comment. ROUND counts completed rounds, but the report posts ROUND + 1 — using the raw value made the same round carry two different numbers in one thread. The ^[0-9]+$ regex guard before arithmetic is correct defensive coding. Tests pin both steps (post + finalize). No issues.
|
Released in v0.21.1. |
|
Acknowledged — PR #7748 ( ✅ completed |
What this PR does
Fixes an off-by-one in the AutoFix status comment (#7738): it now numbers the round being performed, like every other message the loop posts.
Why
effective_roundcounts rounds already finished, andPush and reportpostsROUND + 1as the round it just performed. The status comment used the raw value, so the same round carried two different numbers in one thread.Observed live on #7724 at
10:10 UTC— both written by the bot, minutes apart, about the same round:🤖 Addressed the latest review feedback (round **6**/100)✅ AutoFix round **5** finishedThat is exactly the confusion the status comment exists to remove, so it is worth a follow-up rather than leaving it.
How
Display
ROUND + 1in both status steps, guarded by a numeric check so a missing or non-numeric round degrades to the raw value instead of failing the step (it is a best-effort step — it must never cost a round).Reviewer Test Plan
effective_round=5→ shows 6 (matches the report'sround 6/100); emptyeffective_roundfalls back toROUND=3→ shows 4; a non-numeric value stays as-is and does not crash.npx vitest run scripts/tests/qwen-autofix-workflow.test.js— 103/103 (two consecutive clean runs; the suite's known load-flakes appeared in one earlier run and are unrelated).bash -nclean on both run blocks, actionlint 16 vs main 16 (no new findings).Risk & Scope
ROUNDitself is untouched — only what the status comment prints.Linked Issues
Follow-up to #7738. Defect observed on #7724.
中文说明
本 PR 做了什么
修复 AutoFix 状态评论(#7738)的 off-by-one:现在按正在执行的轮次编号,与循环发布的其它消息一致。
为什么
effective_round统计的是已完成的轮数,而Push and report发布的是ROUND + 1(它刚执行的那一轮)。状态评论直接用了原始值,导致同一轮在同一线程里出现两个编号。在 #7724 于
10:10 UTC实测到 —— 两条都由 bot 发出、相隔几分钟、指同一轮:轮次报告写(第 **6**/100 轮),状态评论写✅ AutoFix round **5** finished。这恰恰是状态评论本该消除的困惑,因此值得一个跟进修复。
怎么做
两个状态步骤都显示
ROUND + 1,并加数字校验:若轮次值缺失或非数字,则退回原始值而不是让步骤失败(它是尽力而为的步骤,绝不能拖垮一轮)。评审验证
effective_round=5→ 显示 6(与报告的round 6/100一致);effective_round为空 → 回退ROUND=3→ 显示 4;非数字值原样保留且不崩溃。npx vitest run scripts/tests/qwen-autofix-workflow.test.js—— 103/103(连续两次干净;该 suite 的已知负载 flake 在更早一次出现,与本 PR 无关)。bash -n干净、actionlint 16 vs main 16(无新增)。风险与范围
ROUND本身未动,只改状态评论打印的内容。关联 Issue
#7738 的跟进;缺陷在 #7724 上观察到。