Skip to content

Add read/output budget to the small-diff review fast path - #1982

Merged
remigiusz-antczak merged 2 commits into
mainfrom
land/1964b
Oct 24, 2026
Merged

remigiusz-antczak merged 2 commits into
mainfrom
land/1964b

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Supersedes #1964. The same change, rebuilt as one commit on current main.

  • Adds 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.md routes to it with one line ("BUDGET (small DIFF): read references/small-diff-read-budget.md first."). SKILL.md goes from 2893 to 2966 bytes, recorded as a size-budget-raise in changelog.d/review-read-budget.md.
  • evals/evals.json gains 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.
  • Tests: 2/2 in scripts/test_review_read_budget.py, run from scripts/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.d hook passes, and test-ci-gates.sh shows 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

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
@remigiusz-antczak
remigiusz-antczak merged commit 81421fd into main Oct 24, 2026
1 check passed
@remigiusz-antczak
remigiusz-antczak deleted the land/1964b branch October 24, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant