Skip to content

review: read and output budget on the small-diff fast path - #1964

Closed
remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/review-read-budget
Closed

remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/review-read-budget

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Adds a read and output budget to deep-code-review's small-diff fast path, aimed at the review-cost gap (the review bench ties its rival at about 3.5x the cost).

Measured local split of review-session size: Read results ~47%, Bash output ~27%, model output ~22%. Skill bytes are under 1% (see #1963). This targets the first two.

  • One BUDGET line in SKILL.md. git diff --stat -p is the single patch read. The reviewer greps the callers and callees of each changed symbol and reads those ranges plus hunk context with offset/limit. A whole file is read only if it is under ~200 lines. Test and CI output is piped through tail -n 40, with no narration between tool calls. The line states it never skips a security check.
  • scripts/test_review_read_budget.py pins the rule's parts and its place in the fast path, and checks that steps 1 and 5 (the security and guarantee floor) still exist. A new eval case is added in evals/evals.json.

Not yet measured: the cost and recall effect on the review bench. The expected Read and Bash cut is an estimate. A paired bench run is the next step before this counts as a cost win.

Tests: 8/8 (read-budget 1, always-loaded bytes 6, mustload gate). Independent review: 0🔴; the 3🟡 and 1🔵 are folded in. The main one is that the first draft did not let the reviewer read callers.

🤖 Generated with Claude Code

https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z

One-line BUDGET rule in deep-code-review SKILL.md: 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. Security checks unchanged. Pinned by scripts/test_review_read_budget.py and a new eval case.

Tests: 8/8 (test_review_read_budget 1, test_always_loaded_bytes 6, mustload gate, size-ratchet gate)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
@remigiusz-antczak

Copy link
Copy Markdown
Collaborator Author

Superseded by #1982.

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