Key takeaways
- ✓Every result here is the stand-in's: an AI model given the same instructions and the same diff a person would get. No person reviewed these PRs. A person can review about 40 of them (about 9 hours); later chapters need scores on hundreds, many times over.
- ✓A budget is which model, and how hard it thinks (its effort). Quick (gpt-5.4-nano, low) costs 0.11¢ a PR; standard (gpt-5.4-mini, low) 0.50¢; careful (gpt-5.4-mini, high) 3.36¢ and a median of 31 s. That's about 30× quick, and still close to free next to a reviewer's minute.
- ✓A comment finds a bug in two steps: it points at the bug's lines (same file, within 3 lines; code checks that), and it describes the same problem (a judge model decides). Of 487 candidates the judge kept 428 (88%); on planted bugs' lines alone, about 1 in 12 was about something else.
- ✓On all 250 PRs, recall rose with budget, 66% → 80% → 88%, and so did false alarms (clean PRs with a bug comment that matches nothing): 39% → 48% → 58%. Like a smoke alarm turned up: more fires, more burnt toast.
- ✓One run isn't a score. On the same 40 PRs, quick found 18, 20, then 16 of 30 bugs, and on 16 of the 40 PRs even "any bug comment at all?" changed between runs (careful: 4). Compare reviewers over several runs.
- ✓Past 200 changed lines, quick dropped from 69% to 46% (12 of 26) and standard from 83% to 62%; careful held, 88% to 85%. Quick spent 2 to 4 seconds whatever the size; careful went from 8 to 58. Effort that grows with size seems to help: spend more on big PRs, or make them smaller.
- ✓False alarms are an upper bound on noise. Careful's 9 unmatched comments on the sample's 10 clean PRs include 4 that look like real, unplanted problems (none proven yet). And 88% on planted bugs isn't recall on real bugs, or a person's score.
In Chapter 1, a pull request (PR) asked for batches of 200 and sent 100: the per-sync batch size was capped at the destination's default. Three AI reviewers all caught it. One says it plainly: "If a sync sets batch_size larger than the default, we'll silently ignore it." But on PRs over 200 changed lines, the cheapest of the three finds fewer than half the planted bugs: 12 of 26. Same model family, same PRs. This chapter is about how to score a reviewer, and what its score can and can't tell you.
The source is Lab 02 of the code-review labs, "How Humans Review": scripts 01_pick_sample.py, 02_stand_in.py, 03_score.py and 04_size_and_time.py, recorded in October 2026. The video uses the lab's recorded runs and re-runs only 04_size_and_time.py, which reads results and calls no model. Despite the lab's title, no person reviewed anything here. Every reviewer is the stand-in: an AI model given the same instructions and the same diff a person would get. The lab has tools for your own timed sittings; their columns stay empty until someone does them. The test set is the one from Chapters 1 and 2: 250 PRs, 173 with a planted bug and 77 clean.
How the PRs are named. Each pull request has an id like c20-d2. The first part is the change: c20 is one feature, adding a per-sync batch size. (c changes come from the app's own history, n changes were written for the test set.) The second part is the version: -clean is the correct PR, and -d1, -d2 are copies of it with one planted bug each. The opening's capped batch size is c20-d1.
Why a stand-in?
A person can review only about 40 of the 250 PRs. The corpus has 58 families (PRs built from the same source task), and a reviewer must see at most one PR per family, or the second is a rerun of the first. The lab's sample is 40 PRs from 40 families, 30 buggy and 10 clean, with a quota per size (3 XS, 16 S, 12 M, 9 L), so big PRs are over-weighted. That's 4,300 changed lines, about 8.6 hours at the often-quoted 500 lines an hour.
Later chapters need scores on hundreds of PRs, again and again. So the lab uses a stand-in. Two differences from a person:
- It sees only the diff, with 5 lines of context. A person can open the whole repo.
- It has no memory between PRs, so it can review every PR in the corpus, several from one family included.
A stand-in can speak for a person only where its recall matches that person's, measured on the same PRs. Nobody has done that measurement yet, so every number below is about the stand-in.
Three budgets
The stand-in comes at three budgets. A budget is which model it uses and how long that model thinks before it answers, its effort.
| Budget | Model | Effort | Total, 250 PRs | Per PR | Median seconds a PR |
|---|---|---|---|---|---|
| quick | gpt-5.4-nano | low | $0.28 | 0.11¢ | 3 |
| standard | gpt-5.4-mini | low | $1.25 | 0.50¢ | 3 |
| careful | gpt-5.4-mini | high | $8.39 | 3.36¢ | 31 |
Careful costs about 30 times quick. But even careful is under 4 cents a PR: next to a person's minute, every budget is close to free. Note that quick differs from the other two in its model, not just its effort. Standard and careful share a model, which makes them the cleaner pair to compare.
When does a comment count?
To score a reviewer, you need to decide when a comment found a bug. In the lab, a comment finds a bug in two steps:
- It points at the bug. Same file, within 3 lines of one of the bug's lines. A comment with no line covers its whole file. Code decides this. Comments that pass are candidates.
- It describes the same problem. For the stand-in, a judge decides: a model asked one question, "does this comment describe this bug?" For your own comments, you'd decide yourself after your last sitting.
Take the other bug in that batch-size PR from Chapter 1, c20-d2: the batch-size setting is never loaded, and its test was loosened to hide it. Pick a comment and make your own call before you see the judge's:
The planted bug
The per-sync batch size is never loaded: load_sync checks "batch_size" in row, which searches the row's values, not its column names, so the setting is always empty. The test's assertions on it were removed.
models.py: line 32 · test_batch_size.py: lines 16, 19, 20
worker/harbor_worker/models.py:32
“This membership check is on the `Row` object itself, which iterates values rather than column names, so the new `batch_size` column won't be picked up here. As written, the worker will keep falling back to the destination default instead of honoring per-sync overrides.”
Step 1 · points at the bug's lines? (code)
0 lines from the nearest bug line in this file; the window is 3.
yes: a candidate
Step 2 · describes the same problem? (judge)
Your call first:
On planted bugs' lines alone, 39 of 459 candidates (about 1 in 12) were about something else. The judge is gpt-5.4-mini, the model careful uses. The 40 hand labels (36 yes, 4 no) were made by the AI that built the lab, not by a person.
Careful's comment is on the right line and names the real cause. Quick's sits on one of the bug's lines too, but it says the test depends on another bug. It never says why the setting is always empty, so it doesn't count.
How often does step 2 matter? The stand-in's comments include 487 candidates, and the judge said 428 (88%) describe the same problem. That count includes candidates for known issues (real bugs nobody planted, listed in Chapter 1's answer key), which match on the whole file. On planted bugs' lines alone, 39 of 459 candidates, about 1 in 12, were about something else.
Is the judge right? On 40 random candidates labelled by hand, it agreed every time (36 yes, 4 no). But those hand labels were made by the AI that built the lab, from the bug and the comment, before seeing the judge's verdicts. And the judge is gpt-5.4-mini, the same model careful uses. Treat recall as give or take several points.
The scorecard
Two numbers, on all 250 PRs (run 1):
- Recall: the share of planted bugs found.
- False alarms: the share of clean PRs that get at least one
bugcomment matching nothing on the answer key. Optionalnitcomments don't count.
| Budget | Recall (173 bugs) | False alarms (77 clean PRs) |
|---|---|---|
| quick | 66% (114) | 39% (30) |
| standard | 80% (138) | 48% (37) |
| careful | 88% (152) | 58% (45) |
Careful raises a false alarm on more than half the clean PRs. Finding more and flagging more go together, as for any classifier with a threshold. Turn a smoke alarm up and it catches more fires, and more burnt toast. The widget shows the intervals, and what happens when you split by size (the "Big pull requests" section below):
Recall: planted bugs found (173 planted bugs). False alarms: clean PRs (77) with a bug comment that matches nothing on the answer key. The thin line is the 95% interval.
quick
gpt-5.4-nano, low
Recall 66% (114/173, 58–73%)
False alarms 39% (30/77, 29–50%)
standard
gpt-5.4-mini, low
Recall 80% (138/173, 74–85%)
False alarms 48% (37/77, 37–59%)
careful
gpt-5.4-mini, high
Recall 88% (152/173, 83–92%)
False alarms 58% (45/77, 47–69%)
More budget finds more, and flags more clean PRs: recall and false alarms rise together.
Median seconds per PR, by size (XS → L)
Quick and standard spend about the same few seconds on 20 lines as on 200, and their recall drops on big PRs. Careful's time grows with size, and its recall holds. Per PR: quick 0.11¢, standard 0.50¢, careful 3.36¢.
The intervals come from a bootstrap over changes: resampling whole changes rather than single bugs, because the bugs planted in one change aren't independent.
Same reviewer, run again
Is one run enough? The lab gave each budget the same 40 sample PRs three times.
| Budget | Planted bugs found (of 30), runs 1 / 2 / 3 | PRs where "any bug comment?" changes |
|---|---|---|
| quick | 18 / 20 / 16 | 16 of 40 |
| standard | 22 / 23 / 24 | 11 of 40 |
| careful | 26 / 25 / 26 | 4 of 40 |
Same reviewer, same PRs, and quick's recall moves by 14 points (53% to 67%). On 16 of the 40 PRs, even whether it raises any bug at all changes from run to run:
Each square is one run. Filled: that run wrote at least one bug comment on the PR. Empty: it wrote none. A red outline marks a PR where the runs disagree.
Each id is a change and a version: the line under it is the change (hover for the full title); -clean is the correct PR, -d1, -d2… the same PR with one planted bug. Grey ids are the 10 clean PRs. Recall on 30 bugs in one run already has an interval of about ±17 points; the run-to-run spread comes on top. Compare reviewers over several runs.
A cheap reviewer is a noisy one. This noise comes on top of sampling noise: one run's recall on 30 bugs already has a 95% interval of about ±17 points (careful's 26 of 30 is 70–95%; a Wilson interval, a standard interval for a share). So on a small set, compare reviewers over several runs, never one.
Big pull requests
Back to the opening. Here is recall on PRs up to 200 changed lines and over 200, on the whole corpus:
| Budget | ≤200 lines (147 bugs) | >200 lines (26 bugs) |
|---|---|---|
| quick | 69% (61–77%) | 46% (29–63%), 12 of 26 |
| standard | 83% (78–88%) | 62% (50–76%), 16 of 26 |
| careful | 88% (83–93%) | 85% (70–97%), 22 of 26 |
The cheap budgets drop past 200 lines; careful doesn't. Standard's two intervals don't overlap. Paired on the same bugs, careful finds 23 points more than standard on PRs over 200 lines (13 to 33, a bootstrap over 10 changes) and only 5 more on smaller ones (−1 to +12).
Why? 04_size_and_time.py measures how long each reviewer spends per PR, by size:
| Budget | XS | S | M | L |
|---|---|---|---|---|
| quick | 2 s | 3 s | 4 s | 4 s |
| standard | 2 s | 2 s | 3 s | 4 s |
| careful | 8 s | 24 s | 49 s | 58 s |
Quick spends about the same few seconds on 20 lines as on 200. Careful's time grows with size. If a reviewer thinks just as long on a big PR, each line likely gets less attention. That fits the old advice that reviews miss more past 200 to 400 lines (the SmartBear/Cisco study). It's a suggestion, not a proof: quick also uses a smaller model. Standard, which is careful's model at low effort, is the cleaner comparison, and it drops too. The fix is either more effort for big PRs or smaller PRs.
Are the false alarms false?
So is careful just noisy? On the sample's 10 clean PRs, careful (run 1) flagged 7, with 9 bug comments that match nothing on the answer key. The lab's README reads all nine. Four look like real problems nobody planted:
| PR | What careful said |
|---|---|
n11-clean (honour Retry-After on 429 responses) |
A Retry-After header may be a date, and the code parses it with float(), so a recoverable 429 can become a hard failure |
| n11-clean (same PR) | A test of the 5-minute retry cap only checks the constant, not that the delay is capped |
| n18-clean (rate-limit requests per destination kind) | Retries inside the loop skip the rate limit |
c22-clean (add LOWERCASE and TRIM transforms to field mappings) |
An integration test sets up a TRIM mapping and never checks it ran |
The other five are speculative (sync ids used as file names, so a ../ id could write elsewhere) or a matter of spec (should a PARTIAL run email the owner?). None of the four is proven with a test yet; Chapter 4 labels unmatched comments like these and proves the real ones with failing tests. Still, some false alarms may not be false. The false-alarm rate is an upper bound on the noise, not the noise.
What a score can't tell you
- Real bugs are harder. Careful finds 88% of planted bugs, but those were written to be findable in the diff, against a description of what the PR should do. No missing files, no design mistakes. 88% is recall on this corpus.
- What a person would score. That needs a person to do the reviews. The lab's sittings tool is there for it; until someone does, the stand-in speaks only for itself.
- What review teaches. Review also spreads knowledge of the code (Bacchelli and Bird, 2013): the reviewer learns the change, and two people can now fix it at 2 am. No score measures that.
Also in the lab
From the lab's README (its own run, October 2026), beyond the video:
- By type, careful is weakest on performance (14 of 21) and security (13 of 16) bugs, and quick beats both mini budgets on performance (16 of 21). With 16 to 21 bugs a type, those gaps are inside the noise.
- Why step 2 exists. In a pilot, mini commented on line 32 of a PR whose bug is on line 33, about a different problem (a race).
- The sample changed between two runs because the sampler walked a Python
set, whose order changes per process. It sorts now, and a test checks the sample is stable. It was caught because the reading total printed 4,242 lines one run and 4,414 the next. - A possible fifth known issue, not added. Careful flagged that a MIRROR run that runs out of time in its last batch still deletes missing records, against
send()'s docstring. The code only deletes rows that really are gone from the source, so the lab calls it a docstring mismatch, not a bug. - Cost. The stand-in cost $13.07 (250 PRs × 3 budgets, plus 2 more runs of the sample), the judge $0.61. Both are cached, so reruns are free.
What to do
- Score with a two-step match: lines checked by code, the problem checked by a person or a judge. Near the bug isn't a find.
- Check the judge against labels you made yourself, and know if it shares a model with the reviewer it grades.
- Report recall and false alarms together, with intervals, and the cost per PR next to them.
- Run a reviewer several times on a small set before comparing it with anything.
- Split recall by PR size. A reviewer that spends fixed effort per PR fades on big ones.
- Read the false alarms before calling a reviewer noisy; some may be real bugs.
Caveats
- No person reviewed anything. Every number is the stand-in's. Whether it is like a person is unmeasured.
- The judge's check was labelled by an AI, and 40 pairs bound its error only below about 9%.
- The 250-PR scorecard and size split are run 1 only; only the 40-PR sample was run three times.
- Planted bugs, not real ones. They sit in lines the PR adds and are findable in the diff.
- Big PRs are few. 26 bugs over 200 lines, so those intervals are wide (careful 70–97%).
- "Look real" is a reading, not a test result. None of the four is proven yet.
The checklist
- Sample one PR per family, stratified by size, and print the interval widths before reviewing.
- Match comments in two steps, with a 3-line window, and store every candidate and verdict.
- Hand-label a random set of candidates and measure the judge against them.
- Score recall and false alarms with intervals that respect clustered bugs.
- Repeat runs on the sample and count how often "any bug comment?" flips.
- Split recall and time by size, and check whether effort grows with it.
- Read the unmatched comments on clean PRs and mark the ones worth a test.
Practice: scoring in code
Write step 1 of the match, recall and the false-alarm rate, a Wilson interval, and the run-to-run flip count. The tests use the lab's recorded numbers: the lines of the never-loaded batch size (c20-d2) and the two comments on it, the 250-PR scorecard (66/39, 80/48, 88/58), careful's 26 of 30 (70–95%), and the 16, 11 and 4 flips on the sample.
Quiz
1.A PR adds a per-sync batch size, but a planted bug means the setting is never loaded (c20-d2). A comment from quick sits on line 19 of the test file, one of the bug's lines, but says the test depends on another bug. Does it find the bug?
2.Careful flags 58% of clean PRs, against quick's 39%. What does that tell you?
3.Quick found 18, 20, then 16 of the same 30 bugs in three runs. What should you do when comparing two reviewers on a 40-PR sample?
4.On PRs over 200 changed lines, quick found 12 of 26 bugs and careful 22. What does the lab suggest is behind the gap?
5.Careful finds 88% of planted bugs. Can you say an AI reviewer finds 88% of real bugs?
6.The judge agreed with hand labels on 40 of 40 pairs. Why still treat recall as give or take several points?
Check your understanding
Try each question before opening its answer.
Why does the lab score an AI stand-in instead of a person, and what does that change about the results?
A person can review only about 40 PRs (one per family, about 9 hours), and later chapters need scores on hundreds, many times over. The stand-in gets the same instructions and diff, but sees only the diff and has no memory between PRs. So every number is the stand-in's; it can speak for a person only after a person's recall is measured on the same PRs, which hasn't happened.
A comment sits on the bug's line but describes a different problem. Does it count, and who decides?
No. Code checks step 1 (same file, within 3 lines). A judge model checks step 2 (same problem) for the stand-in. Quick's comment on the test line of the never-loaded batch size (c20-d2) passed step 1 and failed step 2. On planted bugs' lines, about 1 in 12 candidates was about something else.
Careful flags 58% of clean PRs. Is it noisy?
Partly. More budget raised recall (66% to 88%) and false alarms (39% to 58%) together. But a false alarm only means the comment matches nothing on the answer key: 4 of careful's 9 unmatched comments on the sample's clean PRs look like real, unplanted problems. The rate is an upper bound on noise.
Quick finds 18, 20 and 16 of the same 30 bugs. What does that mean for comparisons?
One run's recall has run-to-run noise on top of the ±17 points of sampling noise that 30 bugs allow. On 16 of 40 PRs, even "any bug comment?" changed. Compare reviewers over several runs, or the mean, not one run.
Why do the cheap budgets miss more on big PRs, and what can you do about it?
They spend about the same few seconds on any PR (quick 2 to 4 s), so each line likely gets less attention on a big one; recall drops past 200 lines (quick 69% to 46%, standard 83% to 62%). Careful's time grows from 8 to 58 s and its recall holds (88% to 85%). Spend more effort on big PRs, or make PRs smaller.
Careful finds 88% of planted bugs. What can't that tell you?
Its recall on real bugs (planted ones were written to be findable in the diff), what a person would score (that needs a person's reviews), and what review teaches the team about the code, which no score measures.
Next up: Chapter 4 scores real AI review tools on the same PRs, and labels the comments that match no planted bug: the AI reviewer as a classifier.