Qwen Code 0.21.12 Introduces Review Witness Gates and Bounded Autofix Budgets
Qwen Code 0.21.12 adds strict evidence gating for AI code review findings and dual line-growth budgets for automated PR repairs. Unwitnessed critical issues are demoted to low confidence, preventing endless automated fix loops.

Why it matters
Implement these reference workflow patterns in your GitHub Actions to block hallucinated AI review comments and prevent runaway pull request bloat.
TL;DR
- 01Critical review findings must carry replaying command outputs or execution traces to post on PRs.
- 02Autofix workflows maintain separate 400-line growth budgets for source code and test files.
- 03Non-converging repair cycles automatically halt and escalate decisions to human maintainers.
Key facts
- Default Source Line Budget
- 400 net lines
- Default Test Line Budget
- 400 net lines
- Max Non-Shrinking Rounds
- 2 rounds
Review Witness Gate
Under Qwen Code 0.21.12, high-confidence review findings marked Critical must supply a witness field containing execution output or a valid not run reason. Without execution proof, claims stay off the pull request:
critical_requires: witness_or_not_run_reasonDual Growth Budgets
To prevent pull request bloat during automated fix cycles, the workflow tracks source and test diffs separately against the merge base:
- Source Growth Budget:
QWEN_AUTOFIX_GROWTH_BUDGET_SRC_LINES(default: 400 net lines) - Test Growth Budget:
QWEN_AUTOFIX_GROWTH_BUDGET_TEST_LINES(default: 400 net lines) - Divergence Limit: Pauses after 2 non-shrinking rounds for human intervention
When growth limits are hit, non-critical suggestions stop while blocking fixes remain active.
Try it in 2 minutes
env:
QWEN_AUTOFIX_GROWTH_BUDGET_SRC_LINES: 400
QWEN_AUTOFIX_GROWTH_BUDGET_TEST_LINES: 400yaml
✓ When to use
- When orchestrating automated AI agent repair loops in continuous integration systems.
✕ When NOT to use
- When running simple read-only review scripts without automated write permissions on pull requests.
What to do today
- Adopt witness validation logic in automated PR review pipelines.
- Set separate source and test line growth budgets in your AI autofix workflows.