ealeng

Episode 12 of 12 · The whole pipeline

The review pipeline: seven setups, one rule, and the pick nobody planned

The capstone puts the series' pieces into one pipeline (free checks, an AI review, a check on every AI finding, a risk router) and runs seven review setups over the same 250 test PRs, from people reading everything to nobody at all. The rule: at most 2 bugs through per 100 PRs, and no more serious bugs than people reading everything. The planned pipeline saves about 4 minutes a PR but lets 3.7 of 38 serious bugs through against 2. The pick is simpler: AI review plus one person on every PR, at 13.6 minutes instead of 18.3, with 0.75 bugs through per 100 against 1.04. It holds on 99 new PRs written after everything was built, but only if the person reads the diff before the AI's comments. Every reviewer is an AI stand-in.

Capstone · The Review Pipeline19 min read
Video transcript9:16

0:00Cold open

0:01

I built the code review pipeline this series kept pointing toward. Route each pull request by risk. Check every AI finding before a person sees it.

0:11

Against people reading everything, it saved almost four minutes a pull request.

0:16

And it let more of the serious bugs through.

0:20

The setup that won wasn’t one I’d planned to test.

0:24

So where do a reviewer’s minutes buy the most?

0:27Intro

0:29

Hands-on AI code review. Part twelve, the capstone.

0:33

Today: seven ways to review the same pull requests, and one pick for a team like mine.

0:39The team and the rule

0:41

I’m Valentina, a tech lead. My team: eight engineers, sixty pull requests a week. About one in ten carries a bug. The test set has far more bugs than that, so its numbers are scaled to my one in ten.

0:55

The score is bugs that merge unfixed, per hundred pull requests. People reading everything let about one per hundred through. At sixty a week, that’s about eight bugs a quarter.

1:06

My rule: at most two per hundred. And no more serious bugs, the ones marked high severity, than people reading everything let through: two of the test set’s thirty-eight.

1:17

Of the setups that pass, the one that costs the fewest minutes of a person’s time wins. Without the rule, the cheapest setup would win by default: nobody reading at all.

1:29The pieces

1:30

Every piece comes from an earlier part. Free checks first: types, lint, tests. Then the AI review: a small model reading the diff.

1:39

Then, optionally, a check that tries to prove each AI finding before a person sees it.

1:45

Then a router. It auto-approves the safest thirty percent, where only the author reads the AI’s findings. Middle-risk ones get a quick skim, the riskiest a full read, and changes to the database or input validation get two people.

2:01

Seven setups switch these pieces on and off, from people reading everything to nobody reading at all. One also splits big pull requests into smaller ones for review.

2:13How it’s scored

2:15

No model is called here. Every review, check and verdict was recorded in earlier parts, on the same two hundred and fifty pull requests with planted bugs.

2:25

And the people are simulated: the careful AI stand-in from part three, which found eighty-eight percent of the bugs.

2:33

A bug is caught if a free check exposes it, a person finds it, or an AI finding describes it, survives the check, and someone acts on it.

2:43

Minutes come from reading five hundred lines an hour, plus two for every wrong comment someone reads. And every number gets a range: redraw the test set two thousand times, and see how far it moves.

2:56Seven setups

2:58

Here are all seven. Which one meets the rule with the fewest minutes?

3:04

Not AI only: just over a minute a pull request, but six serious bugs through. And not my pipeline, or its variants: three or more serious bugs each, against two. Without the finding check, it’s over by a single bug.

3:19

Both setups where people read everything pass, at about eighteen minutes. But one setup passes for less.

3:26

AI review plus one person on every pull request. Thirteen point six minutes, three quarters of a bug per hundred, and the same two serious ones.

3:37

Compared bug by bug with people reading everything, it lets through about point three fewer per hundred. But the range runs from point seven fewer to point one more, so it’s at least as good, not proven better.

3:51Seven setups

3:52

Here’s the real run. Every number on that board comes out of this one command.

3:58

The last column applies my rule. Picked: AI review plus one person.

4:04

People reading everything pass too, but cost almost five more minutes a pull request. The pick saves about as many minutes as my pipeline did, and lets fewer bugs through.

4:16Why my pipeline lost

4:17

So why did my pipeline lose? Here’s each stage against the setup before it, on the same bugs, now per thousand pull requests.

4:25

Start from people reading everything, with the free checks on, and add the AI review: about three fewer bugs per thousand pull requests, for one more minute each. Its whole range is below zero, so that help is real.

4:40

Now drop the second reviewer on migration, schema and validation changes. That saves almost six minutes a pull request, and lets about one more bug per thousand through. That’s where the minutes were.

4:54

Here the second reader was simulated by a faster, less careful AI stand-in. A careful second reader might catch more; this test can’t say.

5:04Why my pipeline lost

5:05

My router saved under five minutes instead, and let three and a half more bugs per thousand through. It swaps full reads for quick looks, and here a quick look is counted as adding nothing beyond the AI review’s findings.

5:19

And the finding check let two and a half more through, to save a third of a minute. It drops real findings it can’t prove. And one review run usually names a bug only once, so that bug goes through.

5:33AI only

5:34

What about nobody at all? On a speed dashboard, the kind that counts only time and who read what, AI only looks perfect. Every pull request merges with no person reading. The only person-time left is about a minute of the author reading wrong comments.

5:51

The answer key, our list of planted bugs, says it lets one point seven times as many bugs through as people reading everything, and six of the thirty-eight serious ones.

6:03

It only wins if I drop the serious-bug rule, and trust authors to fix every correct AI finding. If they fix half, it’s over five per hundred.

6:14Read the diff first

6:15

There’s one condition, from part ten. On the thirty-five bugs the AI missed, the careful stand-in found twenty-one and eighteen in two runs reading the diff alone, and sixteen after reading the AI’s comments first. A small drop, but enough to matter here.

6:32

Put that into the pick, and its edge is gone: about one bug per hundred, the same as people reading everything, and five serious bugs instead of two. The pick goes back to people reading everything.

6:45

Even if the person misses one in twenty of the bugs the AI didn’t mention, the pick lets slightly more serious bugs through than people reading everything, and the rule breaks. So the person reads the diff first, then the AI’s comments.

7:00New pull requests

7:02

One worry: these two hundred and fifty pull requests built the whole series. The AI pieces could be tuned to them.

7:09

So the capstone ran again on ninety-nine new pull requests, written after everything else was built, with bugs planted the same way.

7:18

The same pick. Point eight seven bugs per hundred, against one point one six for people reading everything, and eight fewer minutes a pull request.

7:28

The AI review found eighty-four percent of the new bugs, against eighty before. And reading its comments first flips the pick there too.

7:37The report

7:39

It all ends in one report. On top, the recommendation. The report says escaped for bugs through. And half a cent per pull request is what the AI review cost when it was recorded, on these small pull requests.

7:53

Every claim cites its table. If a claim names a number its table doesn’t contain, the build fails.

8:00

And it lists what would change the pick: a person who leans on the AI, a rushed reviewer, or dropping the serious-bug rule.

8:09What to take

8:10

So, for a team like mine: run the free checks and the AI review on every pull request. They’re cheap.

8:17

Keep one person on every pull request, reading the diff before the AI’s comments.

8:23

Drop the second reviewer: it cost the most minutes and caught little here. And give a quick look no credit until you’ve measured it.

8:31

And check it on your own planted bugs. Every reviewer here was an AI stand-in, on one codebase.

8:38The series

8:39

That’s the series. Twelve videos, one test set of planted bugs, and one question each time: what does this really catch?

8:47

CI missed a one-line bug. A cheap AI reviewer got worse on big pull requests. Free tools caught only a few bugs. And reading the AI’s comments first made a rushed reviewer miss more.

9:00

Most results came with a range, and every reviewer we scored was an AI. The next step is yours: measure your own pull requests.

9:10Summary

9:11

Spend a person’s minutes on one full read.Valentina: Thanks for watching!

Key takeaways

  • ✓Set the rule before comparing setups, and make it two parts plus a tie-breaker: at most 2 bugs through per 100 PRs, no more serious (high-severity) bugs than people reading everything, then the fewest minutes of a person's time. Without the serious-bug rule, the cheapest setup wins by default: nobody reading at all.
  • ✓Compare setups paired, on the same bugs. Side by side, adding the AI review to people (0.92 to 0.64 per 100) looks like a tie, because the ranges overlap. Paired, the difference is −0.29 (−0.61 to −0.05), and the test set can see it.
  • ✓The pick was AI review plus one person on every PR: 13.6 minutes a PR against 18.3 for people reading everything, 0.75 bugs through per 100 against 1.04, and the same 2 of 38 serious bugs. Paired, −0.29 (−0.72 to +0.11): at least as good, not proven better.
  • ✓The planned pipeline lost on two trades. Routing by risk saved 4.8 minutes a PR for 0.35 more bugs through per 100, because a quick look is counted as adding nothing to the AI review. The finding check let 0.25 more through to save 0.3 minutes, because one review run usually names a bug only once. Dropping the second reviewer saved more (5.9 minutes) and cost less (0.12).
  • ✓AI only would top a speed dashboard: every PR merges with no person reading, at 1.3 minutes a PR. The answer key says it lets 1.72 times as many bugs through as people reading everything, and 6 of 38 serious ones. If authors fix only half of the correct AI findings, it's 5.35 per 100.
  • ✓The pick depends on the person reading the diff first. With Chapter 10's measured leaning (16 of the AI's 35 misses found after reading its comments, against 21 and 18 without), its edge is gone: 1.04 per 100 and 5 of 38 serious bugs. A 5% chance of missing what no AI finding showed already breaks the serious-bug rule.
  • ✓Check that the pick isn't tuned to the test set. On 99 new PRs written after every lab, the same pick holds: 0.87 per 100 against 1.16, 15.7 minutes against 23.6, 1 of 15 serious bugs for both. The AI review found 84% of the new bugs against 80% before, and reading its comments first flips the pick there too.

This is the last chapter. Eleven chapters each measured one piece of AI code review on the same test set of planted bugs. The capstone puts the pieces together: free checks, an AI review, a check on every AI finding, and a router that sends each pull request (PR) to the right depth of review. Then it asks one question: for a given team, where do a reviewer's minutes buy the most? It compares seven ways to review the same PRs. The pipeline the series was building toward didn't win. A simpler setup, one I hadn't planned to test, did.

The source is the capstone of the code-review labs, "Capstone · The Review Pipeline", recorded in October 2026: run_pipeline.py (every setup, the pick, and what would change it), build_report.py (the report) and the held-out run in heldout/. The main run makes no model calls: every review, check and verdict was recorded in earlier chapters, on Chapter 1's 250 test PRs. And no person reviewed anything. "A person" is Chapter 3's AI stand-in at its careful budget (it found 88% of the planted bugs), the second reviewer is the quick stand-in, and minutes are a formula. The video calls the tech lead Valentina; the team is simulated too.

How the PRs are named. This chapter counts setups, not single PRs, but the ids are the same as in earlier chapters, like n19-d1, Chapter 9's skip-unchanged-records feature with one planted bug. The first part is the change: c changes come from the app's own history, n changes were written for the test set, and h changes (h01 to h30) were written after every lab, for the held-out run below; h01, for example, archives syncs instead of deleting them. The second part is the version: -clean is the correct PR, and -d1, -d2 are copies of it with one planted bug each.

The team and the rule

The team: 8 engineers merging 60 PRs a week, and about 1 PR in 10 carries a bug. The test set has far more (69% of its PRs), so every number is scaled to 1 in 10, as in Chapter 9.

The score is bugs through: planted bugs that merge unfixed, per 100 PRs. (The lab's tables call it "escaped".) People reading everything let about 1 per 100 through; at 60 PRs a week that's about 8 bugs a quarter (8.1).

The rule, written down before comparing anything:

  1. At most 2 bugs through per 100 PRs (Chapter 9's budget).
  2. No more serious bugs than people reading everything let through. "Serious" means the 38 planted bugs marked high severity; people reading everything let 2 of them through.
  3. Of the setups that pass, the fewest minutes of a person's time wins.

Without the second part, the cheapest setup would win by default: nobody reading at all.

The pieces

Every piece comes from an earlier chapter:

Stage From What it does here
Free checks Chapter 6 types, lint, Semgrep, secrets, property, contract and browser tests; they expose 19 of the 173 bugs
AI review Chapters 3–4 the standard stand-in (a small model, low effort) reads the diff; it found 138 of 173 bugs (80%), for about half a cent a PR
Finding check, optional Chapter 5 tries to prove each AI finding before a person sees it; "proven" keeps 69 of 75 true findings (92%) and 22 of 31 wrong ones (71%)
Router Chapter 9 migration, schema and validation PRs get two people by rule; of the rest, the lowest-risk 30% are auto-approved (only the author reads the AI's findings), the top 25% get a full read, the middle a quick look
Splitting, optional Chapter 7 the largest PRs are reviewed as stacks of smaller ones

The router's risk score is Chapter 9's learned score, with this pipeline's AI review as its AI signal: AUC 0.72 (0.66–0.78).

Seven setups switch these pieces on and off:

Setup Free checks AI review Finding check Who reads
People read everything one person on every PR, two on migration, schema and validation PRs
People + free checks ✓ the same
AI only ✓ ✓ nobody: the author reads the AI's findings
The pipeline, no finding check ✓ ✓ the router
The pipeline ✓ ✓ ✓ the router
The pipeline, big PRs split ✓ ✓ ✓ the router; the AI reviews the largest PRs as stacks
AI review + one person ✓ ✓ one person on every PR, no second reviewer

The last one wasn't in the plan. It was added after the stage-by-stage comparison below showed where the minutes were.

How it's scored

For each PR and setup, the capstone works out an expected outcome, not a coin flip:

  • Caught: a free check that exposes the bug, or a person who finds it, catches it for sure. An AI finding catches it if it survives the finding check and someone acts on it: a person always does; an author alone does with an assumed chance (all correct findings, by default).
  • Minutes: reading at 500 changed lines an hour, at least 5 minutes for a full read, 3 for a quick look, twice a full read for two people, plus 2 minutes for every wrong comment someone reads (a comment asking for a change that matches no planted bug).

Every number gets a range: redraw the test set 2,000 times, whole changes at a time (a change's versions aren't independent), and see how far the number moves. All setups share the same redraws, so each difference between two setups is paired: measured on the same bugs, so the luck of which PRs are in the test set cancels.

Seven setups

Which setup meets the rule with the fewest minutes? Think first, then apply the rule:

Try it · Seven setups, one ruleCapstone · reviewers simulated by AI · no model calls

The rule: at most 2 bugs through per 100 PRs (at 1 PR in 10 carrying a bug), and no more serious bugs than people reading everything let through. Of the setups that pass, the fewest minutes of a person's time wins. Which one is it?

PRs
Rule
SetupPerson minutes a PRBugs through per 100 (95% range)Serious, of 38Verdict
People read everythingone person on every PR, two on migration, schema and validation PRs
18.3
1.04 (0.58–1.52)
2.0?
People + free checksthe same people, after types, lint and tests
18.5
0.92 (0.48–1.37)
2.0?
AI onlynobody: the author reads the AI's findings
1.3
1.79 (1.24–2.33)
6.0?
The pipeline, no finding checkthe risk router: 30% auto-approved, quick looks, full reads, two people on rule PRs
14.7
0.98 (0.52–1.45)
3.0?
The pipelinethe risk router, after the finding check drops what it can't prove
14.4
1.23 (0.75–1.77)
3.7?
The pipeline, big PRs splitthe same, with the largest PRs reviewed as stacks of smaller ones
14.8
1.17 (0.72–1.70)
3.7?
AI review + one personone person on every PR, no second reviewer
13.6
0.75 (0.40–1.15)
2.0?

Dashed line: the limit of 2 per 100. Dot: the estimate; thin line: the range over 2,000 redraws of the test set.

Simulated: a person is the careful AI stand-in (Chapter 3), the second reviewer the quick one. Minutes: 500 changed lines an hour plus 2 minutes per wrong comment read. Serious bugs through is an expected count, so it can be 3.7.

Setup Person minutes a PR Bugs through per 100 PRs Serious through, of 38 Verdict
People read everything 18.3 1.04 (0.58–1.52) 2.0 passes, +4.7 min
People + free checks 18.5 0.92 (0.48–1.37) 2.0 passes, +4.9 min
AI only 1.3 1.79 (1.24–2.33) 6.0 too many serious
The pipeline, no finding check 14.7 0.98 (0.52–1.45) 3.0 too many serious
The pipeline 14.4 1.23 (0.75–1.77) 3.7 too many serious
The pipeline, big PRs split 14.8 1.17 (0.72–1.70) 3.7 too many serious
AI review + one person 13.6 0.75 (0.40–1.15) 2.0 picked

Serious bugs through is an expected count, which is why it can be 3.7.

  • AI only costs just over a minute a PR, but lets 6 serious bugs through.
  • The pipeline and its variants let 3 or more serious bugs through, against 2. Without the finding check, it's over by a single bug.
  • Both people setups pass, at about 18 minutes.
  • AI review plus one person on every PR passes for less: 13.6 minutes, 0.75 bugs through per 100, and the same 2 serious bugs.

Compared bug by bug with people reading everything, the pick lets about 0.29 fewer through per 100. But the range runs from 0.72 fewer to 0.11 more, so it's at least as good, not proven better. It saves 4.7 minutes a PR against people reading everything (−6.7 to −2.9, paired), about as many as the pipeline saves (3.8), and lets fewer bugs through. Paired against the pick, the pipeline without the finding check costs +1.1 minutes (−1.8 to +4.2): the test set can't say which is cheaper, but the pick is simpler and lets fewer bugs through. For the team: 13.6 review hours a week instead of 18.3, and about 5.9 bugs through a quarter instead of 8.1.

Two caveats from the lab itself. The serious-bug rule turns on one bug: 2.0 against 3.0 of 38 separates the pick from the pipeline without the finding check, and their ranges (0.00–0.30 and 0.00–0.39 per 100) almost coincide. Treat that part of the rule as a policy you chose, not a measured difference. And "the pipeline let more bugs through" is true only for serious ones: in total, paired against people reading everything, it's +0.19 per 100 (−0.30 to +0.71), which the test set can't tell from zero.

Why the pipeline lost

To see why, add one stage at a time and pair each against the setup before it:

Try it · What each stage is worthCapstone · T2 · paired, per 100 PRs

Start from people reading everything and add one stage at a time. Each change is measured on the same bugs against the setup before it, so most of the noise from which PRs are in the test set cancels.

People read everything18.3 min · 1.04 per 100 · 2.0 of 38 serious

↓ Add the free checks

Bugs through per 100

−0.12 (−0.29 to 0.00)

Minutes a PR

+0.3 (+0.1 to +0.5)

= People + free checks: 18.5 min · 0.92 per 100 · 2.0 of 38 serious

↓ Add the AI review (people still read everything)

Bugs through per 100

−0.29 (−0.61 to −0.05)

Minutes a PR

+1.0 (+0.8 to +1.2)

= People + checks + AI review: 19.5 min · 0.64 per 100 · 2.0 of 38 serious

↓ Route by risk: auto-approve 30%, quick look for the middle

Bugs through per 100

+0.35 (+0.11 to +0.63)

Minutes a PR

−4.8 (−6.5 to −3.4)

= The pipeline, no finding check: 14.7 min · 0.98 per 100 · 3.0 of 38 serious

↓ Add the finding check (keep only findings it proves)

Bugs through per 100

+0.25 (+0.10 to +0.52)

Minutes a PR

−0.3 (−0.5 to −0.2)

= The pipeline: 14.4 min · 1.23 per 100 · 3.7 of 38 serious

Minutes a PR
14.4
Bugs through per 100
1.23
Serious, of 38
3.7

Routing by risk saves less time than dropping the second reviewer (4.8 minutes) and lets more through (0.35 per 100, a range wholly above zero): it swaps full reads for quick looks, and a quick look is counted as adding nothing to the AI review. The finding check then lets 0.25 more through to save a third of a minute.

Dot green: the range is wholly on the helpful side; red: wholly on the harmful side; grey: it crosses zero. The video says these per 1,000 PRs (−2.9, +1.2, +3.5, +2.5). The second reviewer is the quick AI stand-in; a careful second reader might catch more, which this test can't say.

Change Bugs through per 100 PRs Minutes a PR
Start from people reading everything, add the free checks −0.12 (−0.29 to +0.00) +0.3
Add the AI review (people still read everything) −0.29 (−0.61 to −0.05) +1.0
Then drop the second reviewer on migration, schema and validation PRs +0.12 (+0.00 to +0.29) −5.9
Or instead route by risk +0.35 (+0.11 to +0.63) −4.8
Then add the finding check +0.25 (+0.10 to +0.52) −0.3

(The video says these per 1,000 PRs: −2.9, +1.2, +3.5 and +2.5.)

  • The AI review helps. About 3 fewer bugs through per 1,000 PRs, for one more minute each, and its whole range is below zero. It's the only stage whose help the test set can see on its own.
  • The second reviewer is where the minutes were. Dropping it saves almost 6 minutes a PR and lets about 1 more bug per 1,000 through, with no serious bug more. Here the second reader is the quick stand-in, a light read (66% of bugs in Chapter 3). A careful second reader might catch more; this test can't say, because only one careful review per PR was recorded.
  • The router saved less and cost more. Under 5 minutes, for 3.5 more bugs per 1,000. It swaps full reads for quick looks, and here a quick look is counted as adding nothing beyond the AI review's findings. That's an assumption, not a measurement.
  • The finding check let 2.5 more per 1,000 through to save a third of a minute. It drops real findings it can't prove (8% of true ones). In Chapter 5 that cost nothing, because three review runs named most bugs two or three times. One run usually names a bug once, so dropping that finding lets the bug through. A fifth of the pipeline's bugs through (0.25 of 1.23 per 100) are bugs the AI described and the check dropped.

Splitting big PRs moved bugs through by −0.06 per 100 (−0.18 to +0.00), for 1.63¢ a PR instead of 1.33¢.

AI only

What about nobody at all? A speed dashboard, the kind Chapter 11 looked at, counts only time and who read what. On it, AI only looks perfect: 100% of PRs merge with no person reading, and the only person-time left is about a minute of the author reading wrong comments.

The answer key (the list of planted bugs) says otherwise: AI only lets 1.72 times as many bugs through as people reading everything (1.79 against 1.04 per 100), and 6 of the 38 serious ones. It's also where people matter most: AI only lets 39% of contract bugs through (the API and the worker disagree about a field, a value or a limit); people, with or without the AI, 11%.

AI only wins only if the team drops the serious-bug rule and trusts authors to fix every correct AI finding. If they fix half, it lets 5.35 through per 100, far over the limit, and the pick stays.

Read the diff first

There's one condition, from Chapter 10. On the 35 bugs the AI review missed, the careful stand-in found 21 and 18 in two runs reading the diff alone, and 16 after reading the AI's comments first. A small drop, about the size of the swing between its own two runs, but enough to matter here.

The pick's numbers assume the person and the AI miss different bugs. Feed Chapter 10's measured reviews into it, and its edge is gone: 1.04 per 100, the same as people reading everything, and 5 serious bugs instead of 2. The pick goes back to people reading everything. How much leaning does it take?

Try it · Read the diff firstCapstone · T11, T12 · the 250 PRs

The pick assumes the person reads the diff on their own, so the AI and the person miss different bugs. A person who reads the AI's comments first may lean on them. Here, with this chance they miss a bug that no AI finding showed them.

Leaning
AI + one person: per 100
0.75
AI + one person: serious of 38
2.0
Picked
AI review + one person

People reading everything see no AI comments, so they stay at 1.04 per 100 and 2.0 of 38 serious, at 18.3 minutes a PR against 13.6.

Reading the diff first: the two catches are independent, which is what the pick's numbers assume.

Simulated people: Chapter 10 measured how an AI stand-in leans on the AI's comments, not how a person does. Real people may lean more or less.

Even a 5% chance of missing a bug that no AI finding showed breaks the serious-bug rule (2.2 of 38 against 2.0). On bugs through alone, the pick holds up to 25% (1.01 against 1.04). So the person reads the diff first, then the AI's comments.

The person matters in another way too. With a rushed person (the quick stand-in) instead of a careful one, people reading everything let 3.41 per 100 through, over the limit, and AI only becomes the pick.

New pull requests

One worry: the 250 PRs built the whole series. The stand-ins, the judge that matches comments to bugs (Chapter 4) and the finding check were developed on them, so the AI pieces could be tuned to them.

So the capstone ran again on 99 new PRs in 30 changes (h01 to h30), written after every lab and the capstone were frozen, with bugs planted the same way and each bug proven by a hidden test. 69 carry a bug, 15 of them serious. The reviews, the judge, the free checks and the router's signals were re-measured on them ($5.68 of model calls); the router was trained on the 250 only.

The 250 The 99 new PRs
AI review + one person: bugs through per 100 0.75 (0.40–1.15) 0.87 (0.29–1.55)
People read everything: bugs through per 100 1.04 (0.58–1.52) 1.16 (0.55–1.94)
Minutes a PR, pick against people 13.6 against 18.3 15.7 against 23.6
Serious bugs through, pick and people 2 of 38 each 1 of 15 each
AI review found 138 of 173 (80%) 58 of 69 (84%)
Careful stand-in found 152 of 173 (88%) 61 of 69 (88%)
Quick stand-in found 114 of 173 (66%) 48 of 69 (70%)
Free checks exposed 19 of 173 (11%) 4 of 69 (6%)
Router's AUC 0.72 (0.66–0.78) 0.74 (0.62–0.85)
Careful finds the AI's misses: alone, then reading its comments 21, then 16 of 35 5, then 4 of 11
Pick if the person reads the AI's comments first people read everything people read everything

The same pick, about 8 fewer minutes a PR (the new PRs are larger, so every setup with people costs more). The reviewers didn't drop on new code, and reading the AI's comments first flips the pick there too. The free checks caught less, as you'd expect: the cut-down set of checks was chosen because it exposed something on the 250. The held-out run tests tuning, not other code: it's the same app, written the same way. It didn't re-measure the finding check's keep rates or the splits.

The report

Everything ends in one report, built by build_report.py: the recommendation on top, then every claim with the table it cites. If a claim names a number its table doesn't contain, the build fails. Change an assumption, rerun, and every claim quoting a moved number stops the build until someone rewrites it. It doesn't check meaning: a claim can quote the right number and draw the wrong conclusion. Catching that is a reviewer's job, now reading arguments instead of hunting numbers.

The report also lists what would change the pick: a person who leans on the AI, a rushed reviewer, or dropping the serious-bug rule. And it's honest about cost: 0.55¢ a PR is what the AI review cost when it was recorded, a small model reading lab-sized PRs once. Real PRs are bigger and get reviewed on every push, so a real bill is likely higher; that's an estimate, not a measurement.

Also in the lab

From the capstone's README and checklist answers (its own run, October 2026), beyond the video:

  • Auto-approve is free only while authors act. With every PR getting the AI review, an auto-approved PR is as good as a quick-look one if the author fixes every correct finding: 0.98 per 100 at every auto-approve share. If authors fix half, it's 1.27 at 30% auto-approved and 2.43 at 70%. Chapter 11's 39–53% of AI threads ending with the code changed is an upper bound on how often authors act.
  • The other conditions don't move the pick. At 1 PR in 5 buggy, the pick lets 1.50 per 100 through, still within the limit (AI only 3.58). Reading at 250 lines an hour, or a wrong comment costing 5 minutes, changes the pick's minutes (24.1, 17.4), not the pick.
  • What went wrong while building it. The planned pipeline lost to a setup that wasn't on the list, and the seventh setup was added after the stage table showed why. The first claim check matched numbers as text, so "0.3" passed because "0.35" contained it; it now matches whole numbers. And the auto-approve sweep came out flat and looked like a bug; it wasn't (see above).
  • What review gives that an answer key can't see: knowledge sharing, design taste, mentoring, and whether the team trusts the setup. A team may keep a second reviewer for those, and that's a decision, not an error.

What to do

For a team like Valentina's, on this evidence:

  • Run the free checks and the AI review on every PR. They're cheap, and the AI review's help is the clearest result here.
  • Keep one person on every PR, reading the diff before the AI's comments.
  • Drop the second reviewer unless you've measured what it adds: here it cost the most minutes and caught little.
  • Give a quick look no credit until you've measured it, and don't put a finding check in front of a person when a single review run names each bug once.
  • Write the rule before comparing setups, with a serious-bug part, so "nobody reads" can't win by default.
  • Check it on your own planted bugs, and on PRs your setup wasn't tuned on.

Caveats

  • Every reviewer is an AI stand-in. A person here reads every line equally well and never tires, and minutes come from an assumed reading rate, not from timing anyone.
  • Automation bias was measured in models, not people (Chapter 10). Real people may lean on AI comments more or less.
  • One codebase. The held-out PRs test tuning, not another team's code.
  • The serious-bug rule turns on one bug (2 against 3 of 38), with overlapping ranges.
  • The second reviewer was a light read. A careful second reader was never recorded on every PR, so its value is untested.
  • The mix isn't a real team's. 44% of the test PRs touch a migration, the schema or validation; with fewer, the second reviewer costs less.
  • The finding check's rates come from another reviewer (Chapter 5 checked a different reviewer's findings) and weren't re-measured on the new PRs.

The checklist

  1. State the team: PRs a week, the share that carry a bug.
  2. Write the rule first: bugs through per 100 PRs, a serious-bug part, then fewest minutes.
  3. Run every setup on the same PRs, and pair every comparison.
  4. Add one stage at a time and price each: bugs through and minutes, with ranges.
  5. Write down what's assumed, not measured (the quick look, authors acting, the second reader) and test how the pick moves with each.
  6. Re-run on PRs nothing was tuned on.
  7. Tie every claim in the report to a table, and fail the build when they disagree.

Practice: the pick in code

Write the arithmetic the capstone's pick rests on: the chance a bug is caught (a free check, a person, or an AI finding that survives the check and gets acted on), a person's minutes by tier, the conversion to bugs through per 100 PRs, the rule that picks a setup, and bugs through a quarter. The tests use the recorded results and expect the capstone's answers: AI review + one person on the 250 and on the held-out PRs, AI only without the serious-bug rule, people reading everything when the person reads the AI's comments first, and 8.1 against 5.9 bugs a quarter.

Try it · Practice in PythonRuns in your browser · ⌘/Ctrl + Enter to run
pipeline_practice.py62 lines

Quiz

Try it · Check your understanding0 of 6 answered
  1. 1.Why does the capstone's rule have a serious-bug part, not just at most 2 bugs through per 100 PRs?

  2. 2.Adding the AI review to people who read everything moves bugs through from 0.92 to 0.64 per 100, with ranges 0.48–1.37 and 0.29–1.02. Is the help real?

  3. 3.Which change saved the most minutes for the fewest extra bugs through?

  4. 4.Chapter 5 found checking AI findings nearly free in recall. Why does the finding check cost bugs here?

  5. 5.What happens to the pick if the person reads the AI's comments before the diff, leaning on them the way Chapter 10's careful stand-in did?

  6. 6.Why run the capstone again on 99 new PRs?

Check your understanding

Try each question before opening its answer.

What is the rule, and why does it need a serious-bug part?

At most 2 bugs through per 100 PRs, no more serious (high-severity) bugs than people reading everything let through (2 of 38), then the fewest minutes of a person's time. With the rate alone, AI only wins: 1.79 per 100 at 1.3 minutes a PR, with 6 serious bugs through.

Why compare setups paired, on the same bugs?

Which PRs are in the test set moves every setup by about ±0.5 per 100, more than most differences between setups. On the same bugs, a hard change is hard for every setup, and that cancels. Adding the AI review to people looks like a tie side by side (0.92 against 0.64, overlapping ranges), but paired it's −0.29 (−0.61 to −0.05).

Which stages made the planned pipeline lose to AI review plus one person?

Both start from people plus the AI review. The pick then drops the second reviewer: −5.9 minutes, +0.12 per 100, no serious bug more. The pipeline routes by risk instead (−4.8 minutes, +0.35 per 100, since a quick look counts for nothing) and adds the finding check (−0.3 minutes, +0.25 per 100). It took the two weaker trades.

Why does the finding check cost bugs here when it looked free in Chapter 5?

Chapter 5 checked findings from three review runs, so most bugs were named two or three times and losing one finding cost nothing. Here one run usually names a bug once. The check drops 8% of true findings, and each drop is a bug through: 0.25 of the pipeline's 1.23 per 100.

What would a speed dashboard say about AI only, and what does the answer key say?

The dashboard calls it best: every PR merges with no person reading, at 1.3 minutes a PR. The answer key says 1.72 times the bugs of people reading everything, and 6 of 38 serious ones; 5.35 per 100 if authors fix only half the correct AI findings.

Why must the person read the diff before the AI's comments?

The pick assumes the person and the AI miss different bugs. Chapter 10's careful stand-in found 16 of the AI's 35 misses after reading its comments, against 21 and 18 without. With that, the pick lets 1.04 per 100 and 5 of 38 serious bugs through, and people reading everything become the pick. A 5% chance of leaning already breaks the serious-bug rule.

What does the held-out run show, and what doesn't it?

On 99 PRs written after everything was built, the same pick holds (0.87 against 1.16 per 100, 15.7 against 23.6 minutes, 1 of 15 serious for both), the AI review found 84% of the new bugs against 80%, and reading its comments first flips the pick there too. It doesn't test other code: same app, same way of writing PRs, and the finding check wasn't re-measured.

What does "the build fails if a claim's number isn't in its table" protect against?

Stale and invented numbers: rerun with a changed assumption, and every claim quoting a moved number stops the build. It doesn't check meaning; a claim can quote the right number and draw the wrong conclusion. That's left to a reviewer.

End of the AI Code Review series. Twelve chapters, one test set of planted bugs, and one question each time: what does this really catch? CI missed a one-line bug, a cheap AI reviewer got worse on big PRs, free tools caught only a few bugs, and reading the AI's comments first made a rushed reviewer miss more. Every reviewer here was an AI; the next step is to measure your own pull requests. Browse the other tracks.

Learning something useful?

New labs, articles, and videos on evaluating and testing AI systems come out regularly. Follow along so you don't miss the next one.