feat: adapt review budget to diff size

This commit is contained in:
Claude
2026-09-01 11:50:46 +00:00
parent f9eef969e6
commit 4d51e14a1a
5 changed files with 60 additions and 2 deletions
+5
View File
@@ -157,6 +157,11 @@ overridden deployment-wide with `PRAGENT_MAX_REVIEW_STEPS`,
`PRAGENT_REVIEW_TIMEOUT`, or per repository in the trusted base-branch
`.pr-review.json`; repository values win.
For repositories with broad diffs, the pilot automatically raises headroom to
40/400K, 60/800K, or 80/1.2M steps/tokens as changed lines cross 200, 800, or
2,000. Explicit repository budgets always take precedence, and the global
hard ceilings remain in force.
Two measured reviews of a ~1100-line PR in this repo: 28 and 31 agent steps,
~2.1M input tokens each, **zero cache reads or writes**. The demo repo's PR, same
tier: 126K tokens.