Repository navigation
Add read/output budget to the small-diff review fast path - #1982
Merged
Merged
Conversation
One-line BUDGET pointer in deep-code-review SKILL.md to a new routed reference, references/small-diff-read-budget.md (read it first): git diff --stat -p as the one patch read, grep callers and callees then offset/limit reads, tail -n 40 on test and CI output, no narration. The rule text lives in the reference so SKILL.md stays under the 3000-byte fast-path floor (2957); the SKILL.md raise is documented with a size-budget-raise line. Security checks unchanged. Pinned by scripts/test_review_read_budget.py (registered in ci-tests.d) and a new eval case. Tests: 2/2 (test_review_read_budget) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #1964. The same change, rebuilt as one commit on current main.
references/small-diff-read-budget.md: a read and output budget for the small-diff review fast path (one patch read, then targeted range reads of callers, callees and hunk context). It never skips a security check.SKILL.mdroutes to it with one line ("BUDGET (small DIFF): readreferences/small-diff-read-budget.mdfirst."). SKILL.md goes from 2893 to 2966 bytes, recorded as a size-budget-raise inchangelog.d/review-read-budget.md.evals/evals.jsongains a small-diff-read-budget case. The conflict with the security-verify cases from Add verify-or-drop, exclusion list and variant analysis to the security path #1979 is resolved by keeping both; the file parses as valid JSON.scripts/test_review_read_budget.py, run fromscripts/ci-tests.d/review-read-budget.sh.An independent review of this branch found no issues.
Local CI repro on this commit: size-ratchet ok against main, mustload ok, every
scripts/ci-tests.dhook passes, andtest-ci-gates.shshows 295 passed and 9 failed. The 9 are the known sandbox-only failures (dcr-gates opt-in, peer pains, reap_own pgrep, tracker socket bind).🤖 Generated with Claude Code
https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z