What
Add a max-diff-lines (or similar) input to the eight Claude analysis workflows (reusable-security-{secrets,deps,owasp}, reusable-quality-{typescript,async,code-smell}, reusable-a11y-{aria,wcag}) that skips the Claude step entirely with a visible notice when the PR changeset exceeds the threshold, instead of burning tokens on a run likely to exhaust its budget.
The changed step already computes the file list — extend it with a total-diff-line count (git diff --numstat | awk '{s+=$1+$2} END{print s}') and gate the Claude step's if: on it. Post a neutral notice (e.g. a PR comment or ::notice::) so the skip is visible rather than silent.
Why
Discussed while landing #17/#18/#19: large PRs used to flake with error_max_turns (rotating subset across re-runs). Turn budgets are now 50, but a deterministic pre-gate is still cheaper than a doomed opus run — zero tokens spent on changesets that can't be meaningfully analyzed.
Related cleanup
file-limit (default 30) currently truncates the analyzed file list silently — a green check that only looked at the first 30 files reads as full coverage. Fold it into the skip gate or have the analysis note the truncation in its PR comment.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vuuw6bCHCoYyhT7Q6jXhRj
What
Add a
max-diff-lines(or similar) input to the eight Claude analysis workflows (reusable-security-{secrets,deps,owasp},reusable-quality-{typescript,async,code-smell},reusable-a11y-{aria,wcag}) that skips the Claude step entirely with a visible notice when the PR changeset exceeds the threshold, instead of burning tokens on a run likely to exhaust its budget.The
changedstep already computes the file list — extend it with a total-diff-line count (git diff --numstat | awk '{s+=$1+$2} END{print s}') and gate the Claude step'sif:on it. Post a neutral notice (e.g. a PR comment or::notice::) so the skip is visible rather than silent.Why
Discussed while landing #17/#18/#19: large PRs used to flake with
error_max_turns(rotating subset across re-runs). Turn budgets are now 50, but a deterministic pre-gate is still cheaper than a doomed opus run — zero tokens spent on changesets that can't be meaningfully analyzed.Related cleanup
file-limit(default 30) currently truncates the analyzed file list silently — a green check that only looked at the first 30 files reads as full coverage. Fold it into the skip gate or have the analysis note the truncation in its PR comment.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vuuw6bCHCoYyhT7Q6jXhRj