Repository navigation
bench: preregister matched-harness review-cost bench, caveat the 3.4x ratio - #1956
Merged
Merged
Conversation
… ratio The review-cost-v2 bench ran the toolkit arm with --system-prompt, which replaces the whole Claude Code system prompt, while the Perun arms ran on the default harness. The one matched pair (V2 against the toolkit, both --system-prompt) cost $.01887 against $.01791 per review, 1.05 times (review-cost-v2-1019/ledger.jsonl). V2 was reverted and never shipped, so that pair does not measure the shipped /review, whose matched-harness ratio stays unmeasured until the new bench runs. - Harness caveat in review-cost-v2-1019/README.md and in every doc line that quotes the review cost ratio (README, perun-vs-rivals H7b/H7c, capability matrix, roadmap, review-cost-per-recall). - docs/bench/review-cost-matched-1023: preregistered bench of the shipped /review command against the shipped pr-review-toolkit agent, both on the default harness with --exclude-dynamic-system-prompt-sections, same 22 held-out cases, cap $4. This bench does not vendor the rival plugin: matched.py fetches it at run time from a pinned upstream commit, verifies a SHA-256 per file before writing any, and uses a temp dir. matched.py defaults to an offline dry run that builds the PERUN workspaces and skips the TK file check with a message unless a fetched, hash-checked plugin dir is given. No paid call was made. - scripts/test_review_cost_matched.py kills mutants in the prompt text, common flags, tool lists, ratio direction and fetch-before-probe order, asserts cap and quota Stop before any subprocess call, and patches subprocess.run to raise for the whole module so no test can start claude. Tests: 26/26 (scripts/test_review_cost_matched.py) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
The review cost gap against Anthropic's pr-review-toolkit has been reported as 1.84 times (V2s arm) and higher. That ratio compares two different harnesses: the toolkit arm ran with
--system-prompt, which replaces the Claude Code system prompt, while the Perun arms ran on the default harness. On the one matched pair in the old bench (an unshipped inline Perun prompt against the toolkit, both as--system-prompt), the ratio was 1.05 times.This PR adds a pre-registered, harness-matched bench (
docs/bench/review-cost-matched-1023/) that measures the shipped products on one harness:/reviewcommand plus the skill.code-revieweragent loaded as a plugin, fetched at run time from a pinned upstream commit, with a per-file SHA-256 check. No rival text is committed.It also corrects the docs that quoted the unmatched ratio (README, perun-vs-rivals, capability-matrix, review-cost-per-recall, roadmap). Each now says the ratio is not harness-matched, and that 1.05 times belongs to the unshipped V2 arm, not to the shipped
/review.Status
Built and dry-run only. No paid call was made; spend is $0. The paid run (44 reviews, estimate $2.4, hard cap $4, stops at plan utilization 0.8) waits on owner approval. The keep rule, metrics and stops are frozen in PREREGISTERED.md before any paid call.
Safety
scripts/test_review_cost_matched.pypatchessubprocess.runto raise for the whole module, so no test can startclaude.Review
339b6e087) found 🔴0 🟡3 🔵4: a false "never committed" claim, the 1.05 times ratio placed next to the shipped skill, and surviving mutants.0d3cb910996aa344ed465cc36ee21e4661f7696b, confirmed all three fixes and found 🔴0 🟡0 🔵3. The nits are queued for the next nits PR:run_startledger line is never asserted;review()are untested;This branch is that commit cherry-picked onto main
31419323d5860b34faa9b39dafe15e632ee34c94with no conflicts.Tests
🤖 Generated with Claude Code