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
@@ -306,6 +306,11 @@ limit, preserves any output already emitted, and records the cap reason in the
review body and Langfuse metadata. Environment variables provide deployment-wide
defaults; repository budget values override them.
Without an explicit repository budget, changed diffs receive adaptive headroom:
the default 20-step/120K-token budget grows to 40/400K, 60/800K, or 80/1.2M for
diffs over 200, 800, or 2,000 changed lines. This keeps focused PRs inexpensive
while allowing broad TypeScript/Go reviews to finish. Hard ceilings still apply.
**Cross-lens dedup:** synthesiser drops duplicates by
`sha256[:16](path|line|severity|problem[:80])` (matches the feedback DB's
`posthash`), then promotes multi-lens agreement by one severity step