ci(autofix): unify issue-fix and review-response into one lifecycle workflow#5233
Conversation
…orkflow Replace the issue-only scheduled-issue-autofix workflow with a single qwen-autofix workflow that runs the whole autonomous-fix lifecycle and acts as one identity, qwen-code-dev-bot (via CI_DEV_BOT_PAT, no fallback). A router job forks each scheduled tick: the review phase sweeps the bot's open PRs every 4h, and the issue phase locates and fixes one new bug every 12h (at 00/12 UTC). The review phase fans out over every PR that has new, unaddressed feedback or a base conflict, triages each comment by severity (verify-then-fix for critical/merge-blocking; engineering judgment for suggestions, without deviating from the PR's direction — low-value or over-engineered ones are explained, not implemented), resolves any conflict with main, re-runs the same deterministic verification gate, force-pushes, and reports the outcome on the PR. A per-PR round cap and an evaluation watermark keep the 4h cadence cheap and prevent bot-on-bot loops. Co-authored-by: Qwen-Coder <[email protected]>
|
Thanks for the PR! Template looks good ✓ On direction: this closes a real gap — the autofix bot opens PRs but nobody ever addresses review feedback or base conflicts, so PRs stall. Consolidating issue-fix and review-response into one scheduled lifecycle is the right move. The safety guardrails (MAX_ROUNDS cap, trust gate filtering to OWNER/MEMBER/COLLABORATOR + the review bot, evaluation watermark to avoid re-processing) are well thought out. This is clearly within the CI automation remit. On approach: the scope feels right — replacing 489 lines with 1088 is proportional to the added review-response capability (a whole new phase with scan + address + verify + push). The issue phase is carried over largely unchanged. Two observations for the maintainer:
Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 方向:这个 PR 解决了一个真实的问题——autofix 机器人开了 PR 但从不处理 review 反馈和 base 冲突,导致 PR 停滞。把 issue 修复和 review 响应合并到一个定时生命周期中是正确的做法。安全护栏(MAX_ROUNDS 上限、信任门控只接受 OWNER/MEMBER/COLLABORATOR + review bot、评估水位线避免重复处理)设计合理。完全属于 CI 自动化范畴。 方案:范围合理——用 1088 行替换 489 行,新增的 review 响应能力(完整的 scan + address + verify + push 流程)比例恰当。issue 阶段基本保持不变。两点供维护者参考:
进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewRead through the entire 1088-line workflow. This is well-engineered — the watermark system, trust gate, and round counter are correct. What's solid:
No critical blockers found. The jq expressions, bash logic, and job wiring all check out. A few things worth noting:
Action pins verified — all four pinned actions ( TestingThis is a CI workflow change — no user-visible TUI behavior to test in tmux. The end-to-end behavior requires
Recommended live test before relying on the schedule: 中文说明代码审查通读了整个 1088 行的 workflow。工程质量很高——水位线系统、信任门控和轮次计数器都是正确的。 做得好的地方:
未发现关键阻塞问题。 jq 表达式、bash 逻辑和 job 连线都正确。几点值得注意:
Action 依赖已验证 — 四个固定版本的 action 都解析为有效 commit。 测试这是 CI workflow 变更——没有用户可见的 TUI 行为可以在 tmux 中测试。端到端行为需要在 repo 中配置好
建议在依赖定时调度之前进行实时测试:用 — Qwen Code · qwen3.7-max |
ReflectionStepping back: this PR replaces a one-shot autofix workflow (open PR, stop) with a full lifecycle system that also responds to review feedback and resolves merge conflicts. The motivation is real — the old bot's PRs would stall waiting for a human to address review comments, defeating the purpose of automation. The implementation is well above what I'd expect from a typical CI PR. The watermark system for tracking processed feedback, the trust gate against prompt injection, and the round cap to prevent infinite bot loops all show careful thinking about failure modes. The code is honest about what it does — heavy inline bash, yes, but that's the nature of CI workflows, and every non-trivial block is commented. The one concern I keep coming back to is the token model: the entire workflow now depends on a single I compared this against what I would have designed independently. My instinct would have been to add a separate review-response workflow alongside the existing issue-fix one. This PR's approach — merging both into a single workflow with a router — is actually better: less CI surface area, one place to reason about the full lifecycle, and the router pattern makes it easy to add more phases later. No critical bugs found in the jq expressions, bash logic, or job wiring. Static YAML validation passes. This is ready to ship. 中文说明退一步看:这个 PR 用一个完整的生命周期系统替换了一次性的 autofix workflow(开 PR,停止),新系统还能响应 review 反馈和解决合并冲突。动机是真实的——旧 bot 的 PR 会停滞等待人类处理 review 评论,违背了自动化的初衷。 实现质量远超典型的 CI PR。用于追踪已处理反馈的水位线系统、防止 prompt 注入的信任门控、以及防止无限 bot 循环的轮次上限,都体现了对失败模式的仔细思考。代码诚实地展示了它的工作——大量内联 bash 是 CI workflow 的本质,每个非平凡的代码块都有注释。 我反复考虑的一个问题是 token 模型:整个 workflow 现在依赖单一的 与我独立设计的方案对比:我的直觉是在现有 issue-fix workflow 旁边添加一个单独的 review-response workflow。这个 PR 的方案——用 router 将两者合并到一个 workflow 中——实际上更好:更少的 CI 表面积,一个地方推理完整生命周期,router 模式也便于未来添加更多阶段。 未发现 jq 表达式、bash 逻辑或 job 连线中的关键 bug。静态 YAML 验证通过。可以合并。 — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
What this PR does
Replaces the issue-only
qwen-scheduled-issue-autofixworkflow with a singleqwen-autofixworkflow that runs the entire autonomous-fix lifecycle as one bot identity,qwen-code-dev-bot(via theCI_DEV_BOT_PATsecret, with no token fallback).A
routejob forks each scheduled tick into phases:main, re-runs the same deterministic verification gate (build / typecheck / lint / changed-package tests), force-pushes, and reports the outcome on the PR. When there is nothing worth doing it says so instead of churn-committing.Safety: a per-PR round cap (
MAX_ROUNDS) and an evaluation watermark stop bot-on-bot loops and keep the 4h cadence cheap — heavy per-PR agent jobs only start when there is genuinely new feedback. Review feedback is treated as untrusted input and is gated to maintainers (OWNER/MEMBER/COLLABORATOR) plus the automated reviewer, so a hostile commenter cannot steer the agent.Why it's needed
The autofix bot previously opened a PR and stopped: review feedback (from the automated reviewer or maintainers) and base conflicts were never acted on, so PRs stalled and a maintainer had to take over. Consolidating issue-fix and review-response into one scheduled lifecycle, under one bot identity, closes that loop.
Reviewer Test Plan
How to verify
This is a CI workflow change; the end-to-end behavior is exercised by dispatching it, not by local app testing.
route,issue-autofix,review-scan,review-address) wire up vianeeds/if; the router's hour-fork, the feedback trust filter, the round-counter, and the conflict-watermark logic were unit-checked offline with jq/bash.workflow_dispatchwithphase=review, a specificpr_number, anddry_run=trueto confirm scan → triage → verify on a real PR without pushing; thenphase=issuedry_run=truefor the issue path.Requires the
CI_DEV_BOT_PATsecret (aqwen-code-dev-botPAT with repo scope).Evidence (Before & After)
N/A — non-user-visible CI/automation change.
Tested on