ealeng

Episode 02 of 12 · The testbed

What CI misses: mutants, survivors, and whether 173 bugs is enough

CI caught all 12 small automatic changes to one pull request, then let a one-line planted bug through. Across 734 mutants in the code that 68 correct PRs add, 129 (18%) survive CI, the web app's 39%, and 42 of 52 survivors read by hand are real bugs. Then: how precise one reviewer's score is with 173 planted bugs (53–67% at 60%), and why telling two reviewers apart needs a bit over 200.

Lab 01 · The Review Testbed13 min read
Video transcript7:47

0:00Cold open

0:01

This pull request, a proposed change to our app, adds one setting: how many records to send at a time, in each batch.

0:08

The code is correct, and all the automatic checks, called CI, are green.

0:13

Then I broke it on purpose. A script changed one small thing at a time, twelve different ways.

0:19

CI caught every one of them. Each time, a test turned red.

0:24

Then I tried one planted bug: a single line, changed the way a person might get it wrong.

0:30

CI stayed green. Yet ask for batches of two hundred, and it sends one hundred.

0:37

So how much does CI really miss? And who has to catch the rest?

0:43Intro

0:44

Hands-on AI code review. Part two.

0:47

Today: what CI misses, and whether my test set is big enough to measure a reviewer.

0:54Where we are

0:55

I’m Valentina, a tech lead. In part one, I built a test set for code reviewers.

1:01

Two hundred and fifty pull requests to Harbor, a small app that copies customer records into tools like a CRM, the sales team’s customer list. A hundred and seventy-three have a planted bug, and every one passes CI.

1:16

Today, two questions. First: how much does CI miss, in everything a pull request adds?

1:22

Second: are a hundred and seventy-three bugs enough to measure a reviewer?

1:2701 · What a mutant is

1:29

To measure what CI misses, I use mutants. Let’s make one, on this same pull request.

1:34

This line picks the batch size. Use the sync’s own setting, or, if it has none, the default. For a CRM, that’s one hundred.

1:43

A mutant is one small, automatic change. Here, “or” becomes “and”.

1:48

Now, with a setting of four, “four and one hundred” gives the second number: one hundred. The setting is ignored.

1:55

Then CI runs. The pull request’s own test sets a batch size of four, and expects batches of at most four.

2:03

It gets one big batch instead, so it fails. CI turns red. We say the mutant was caught.

2:09

If CI had stayed green, the mutant would have survived. Then nothing protects that line, and only a reviewer could notice.

2:1802 · Mutants or planted bugs?

2:19

Why use mutants, when I already have planted bugs?

2:23

Mutants are automatic and cheap. A script made seven hundred and thirty-four of them.

2:28

But they’re crude: one small swap, like “or” for “and”, or one deleted line. They tell us how much CI misses.

2:35

Planted bugs are realistic mistakes, but each one takes real work to write and prove. They tell us what a reviewer finds.

2:43

And the cold open shows why we need both. CI caught all twelve mutants, but not the planted bug.

2:50

The pull request’s test asks for four. The minimum of four and one hundred is four. Correct, so the test passes.

2:58

A customer asks for two hundred. The minimum of two hundred and one hundred is one hundred. Wrong. It only goes wrong above one hundred, and the pull request’s tests never try that.

3:1103 · 734 mutants

3:13

So I made mutants in the correct pull requests: seven hundred and thirty-four of them.

3:18

For each one, CI runs again. Does anything turn red?

3:23

The pull requests’ own tests caught about three in four.

3:26

The rest of CI caught a few more. That means every other check: the tests for the other parts of the app, and a check that the code’s types fit together.

3:35

And this many survived: almost one in five.

3:39

Each of those is a change CI let through. If it were a real mistake, only a reviewer could catch it.

3:4604 · Where CI is weakest

3:48

Harbor has three parts: an API, a web app with the screens, and a worker that sends the data.

3:54

Which part do you think is least protected?

3:59

The web app. Thirty-nine percent of its mutants survived.

4:03

That’s more than twice the API, or the worker.

4:06

Why? The web tests draw a screen, and check that some text appears.

4:11

So a wrong number, or a missing error message, can still pass.

4:1605 · The missing save

4:17

One gap showed up again and again. To see it, think of a document: you edit it, then you press Save.

4:23

Harbor keeps its data in a database. A change only counts after a commit: the database’s Save button.

4:30

This pull request marks a run as failed, and then commits.

4:34

The mutant deletes the commit. CI stays green. But in real use, if the worker stops next, that failed status is lost.

4:43

Deleting a save like this survived six times out of seven.

4:48

Why do the tests miss it? The worker’s tests write, and read back, through the same connection.

4:53

So it sees its own unsaved change. It’s like reading your own draft before pressing Save. Of course it’s there.

5:0106 · Is every survivor a bug?

5:02

But is every survivor a real bug? Not always.

5:06

This mutant turns a zero into a one. A missing description now counts as one character long, instead of zero.

5:13

The limit is two hundred and eighty, so both pass, and nothing a user could see changes. That’s called an equivalent mutant: it’s harmless.

5:23

So I read fifty-two of the hundred and twenty-nine survivors by hand, one by one.

5:28

Forty-two of them were real bugs. The rest were harmless, or unclear.

5:33

So most of what CI lets through is a bug that a reviewer has to catch.

5:3907 · How precise is one score?

5:40

Now, the second question. Are a hundred and seventy-three bugs enough?

5:45

Think of a poll. Ask a few hundred voters, and you learn about everyone, give or take a few points.

5:51

A test set works the same way. Say a reviewer finds sixty percent of these bugs.

5:56

On other, similar bugs, it would score a bit higher, or a bit lower. So a score comes with a range: where the reviewer’s true rate most likely is.

6:06

Here, the range is about seven points either way.

6:09

Now look at the smallest kind of bug alone.

6:12

With so few bugs, the range grows to fifty points wide. Too wide to say much.

6:1908 · Telling two reviewers apart

6:21

The harder question: can this set tell two reviewers apart?

6:25

To find out, I made up two reviewers, so I know the true answer. A finds sixty percent of bugs. B finds seventy-five: B is really better.

6:34

A simulation makes up a test set this size, lets both review it, and checks: does the result clearly show that B is better?

6:42

It repeats that many times, and counts how often the answer is yes.

6:46

With a hundred and seventy-three bugs: about two times in three.

6:51

So one time in three, the better reviewer wouldn’t clearly look better.

6:56

The usual bar is four times in five. That takes a bit over two hundred bugs.

7:01

So this set is almost enough for a big gap, like this one. Small gaps need many more bugs. And these are best cases: the simulation treats every bug as independent.

7:13Back to Valentina

7:15

So here’s what I learned. CI lets about one mutant in five through, and most of those are real bugs.

7:21

And a hundred and seventy-three bugs are enough to measure one reviewer, and almost enough to spot a big gap between two. Not a small one.

7:30

Next, I score reviewers on this set: how many bugs they find, how many false alarms they raise, and how long each pull request takes.

7:40Summary

7:41

CI catches a lot. A reviewer still has work to do.Valentina: Thanks for watching!

Key takeaways

  • ✓A mutant is one small automatic change to a line the PR adds, like `or` → `and` or a deleted statement. If CI turns red, the mutant is caught. If CI stays green, it survived: nothing protects that line, and only a reviewer could notice.
  • ✓Mutants and planted bugs answer different questions. Mutants are cheap and crude, and measure what CI misses. Planted bugs are realistic, and measure what a reviewer finds. On a PR that adds a per-sync batch size (c20), CI caught all 12 mutants but not the planted bug, which is wrong only above the default batch size of 100, where the PR's test never looks.
  • ✓Of 734 mutants in 68 correct PRs, the PR's own tests caught 555 (76%), the rest of CI 50 (7%), and 129 survived: 18% (95% interval 15–20%). Running a line isn't checking it.
  • ✓The web app is the least protected: 33 of 84 mutants survive (39%), against 15% for the API and the worker. Its tests render a screen and check that some text appears, so a wrong number or a missing error still passes. Limits are weak everywhere: `n → n + 1` survives 40% of the time.
  • ✓A deleted `conn.commit()` survived CI 6 times out of 7. The worker's tests write and read back through the same database connection, so they see their own unsaved change. One test that reads through a second connection would close the whole gap.
  • ✓Not every survivor is a bug: an equivalent mutant changes nothing anyone could see. Of 52 survivors read by hand, 42 were real bugs, 6 equivalent and 4 unclear. So most of what CI lets through is a reviewer's job.
  • ✓With 173 bugs, a reviewer who finds 60% gets a range of 53–67% (about ±7 points); one kind of bug alone, 11 of them, gives 35–85%. To tell a 60% reviewer from a 75% one 4 times in 5 takes a bit over 200 bugs; at 173 it works about 2 times in 3, and small gaps stay out of reach.

Chapter 1 built a test set for code reviewers: 250 pull requests (PRs, proposed changes) to Harbor, 173 of them with a planted bug, and every one passing CI (the automatic checks that run on each PR). This chapter asks two questions about that set. First: how much does CI miss in everything a PR adds? Second: are 173 bugs enough to measure a reviewer?

Both come from the same lab as Chapter 1, Lab 01 (The Review Testbed) in code-review-labs, but from its last two scripts: 03_what_ci_catches.py (mutation testing, from the recorded results/mutants.jsonl and results/survivor_labels.jsonl) and 04_corpus_budget.py (intervals and power, using stats.py). Chapter 1 covers the rest: healthy main, families, planted bugs, hidden tests and the answer key. Nothing here calls a model, and nobody reviews anything yet: the two "reviewers" at the end are made up for a simulation.

How the PRs are named. Each pull request has an id like c20-d1. 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.

Harbor is a small app that copies customer records into tools like a CRM (the sales team's customer list). It has three parts: a GraphQL API in TypeScript, a web app with the screens, and a Python worker that sends the data.

What a mutant is

Change c20 adds one setting to a sync (one copy job, from a source table to a destination): how many records to send at a time, in each batch. This is the line that picks the batch size:

size = batch_size or BATCH_SIZES[destination.kind]

Use the sync's own setting, or, if it has none, the destination's default. For a CRM, that's 100.

A mutant is one small, automatic change to a line, for example or becomes and. With a setting of 4, Python's 4 and 100 gives the second value, 100, so the setting is ignored. Then CI runs. The PR's own test sets a batch size of 4 and expects batches of at most 4. It gets one big batch instead, so it fails. CI turns red: the mutant was caught.

If CI had stayed green, the mutant would have survived. Then nothing protects that line, and only a reviewer could notice.

Mutants or planted bugs?

Why use mutants, when the set already has planted bugs? Because they answer different questions.

Mutants Planted bugs
Made by a script, in seconds (734 of them) agents writing each one, then a hidden test proving it
Look like one small swap, like or for and, or a deleted line a realistic mistake
Measure how much CI misses what a reviewer finds

The batch-size change shows why you need both. Its correct PR had 12 mutants (8 in the API, 4 in the worker), and its own tests caught all 12. Then the planted bug, c20-d1 (the same PR with bug 1 planted), changes the same line the way a person might get it wrong:

size = min(batch_size, BATCH_SIZES[destination.kind]) if batch_size else BATCH_SIZES[destination.kind]

The PR's test asks for 4: the minimum of 4 and 100 is 4. Correct, so CI stays green. A customer asks for 200: the minimum of 200 and 100 is 100. Wrong. It only goes wrong above the default, and the PR's tests never try that. Try each version:

Try it · A mutant, a planted bug, and CILab 01 · change c20, a per-sync batch size · a CRM sync, default 100

Pick a version of the one line that chooses the batch size, then a customer's setting. CI runs the PR's own test, which sets a batch size of 4 and expects no batch above 4.

# worker/harbor_worker/destinations/__init__.py
size = batch_size and BATCH_SIZES[kind]
Customer's batch size:
CI (the PR's own test)
red: caught
Batch size it uses
100
Should be
200

With a setting, “and” returns the second value, the default, so the setting is ignored. At 4 the test gets one big batch and fails: the mutant is caught.

All 12 mutants of this PR: all caught by its own tests
  • caught · ?? null → ?? undefined · api/src/repo/syncs.ts
  • caught · n → n + 1 (MAX_BATCH_SIZE) · api/src/validation.ts
  • caught · != → == · api/src/validation.ts
  • caught · < → <= · api/src/validation.ts
  • caught · > → >= · api/src/validation.ts
  • caught · && → || · api/src/validation.ts
  • caught · || → && · api/src/validation.ts
  • caught · n → n + 1 (the minimum, 1) · api/src/validation.ts
  • caught · or → and · worker/…/destinations/__init__.py
  • caught · delete statement · worker/…/destinations/__init__.py
  • caught · delete statement · worker/harbor_worker/models.py
  • caught · delete statement · worker/harbor_worker/runner.py

The planted bug is not a mutant: no small automatic swap produces it. A hidden test, which tries a batch size above the default, proves it.

734 mutants: what CI caught

The lab's mutate.py made mutants in the lines that each correct PR adds: 734 of them in 68 PRs (bundles, which repeat other changes' code, are left out, and 4 more PRs have no line a mutant can touch). For each mutant, CI runs again: first the PR's own tests, then the rest of CI, stopping at the first failure. The rest of CI is every other check: the other parts' test suites, the type check (do the code's types fit together) and checks on generated code and database migrations.

Outcome Mutants Share
Caught by the PR's own tests 555 76%
Caught by the rest of CI 50 7% (worker tests 29, type check 12, API tests 9)
Survived CI 129 18% (95% interval 15–20%)

Almost one in five. In 33 of the 68 PRs every mutant was caught. Each survivor is a change CI let through; if it were a real mistake, only a reviewer could catch it.

The PR's own tests cover the lines they add, so why does anything survive? Because running a line isn't checking it. A test can execute a line and never assert what it did.

Where CI is weakest

Try it · Where do 734 mutants end up?Lab 01 · 03_what_ci_catches.py · recorded run

Mutants in the lines that 68 correct PRs add.

Caught by the PR's own tests
555 · 76%
Caught by the rest of CI
50 · 7%
Survived CI
129 · 18%

Survived: 129 of 734, 95% interval 15–20%. The rest of CI: worker tests 29, type check 12, API tests 9. Each mutant is one change, run through the PR's own tests first, then everything else, stopping at the first failure.

What survives most

  • deleted conn.commit(): 6 of 7
  • n → n + 1: 44/109 = 40%
  • > → >=: 11/27 = 41%
  • delete statement: 32/268 = 12%

Limits are where tests stop: a minimum of exactly 5, a reason of exactly the maximum length.

Are survivors real bugs? (read by hand)

42 bugs · 6 equivalent · 4 unclear, of 52

Of the 129 survivors, 52 were read. An equivalent mutant changes nothing anyone could see; unclear ones change behaviour only in a corner the spec doesn't decide.

Part Survived CI
API 30/200 = 15% (11–21%)
Web app 33/84 = 39% (30–50%)
Worker 66/450 = 15% (12–18%)

The web app is the least protected, more than twice the others. Its tests render a component to HTML and check that some text appears, so a wrong threshold, a missing error message or an unused state update often still renders something that passes.

Two other cuts from the same run. By PR size, XS 0 of 13, S 16%, M 21%, L 16%: no clear trend. By operator, n → n + 1 (44 of 109, 40%) and > → >= (11 of 27, 41%) survive most. Limits are where tests stop: a minimum of exactly 5, a reason of exactly the maximum length.

The missing save

One gap showed up again and again. Harbor keeps its data in a database, and a change only counts after a commit, the database's Save button. Change c19 forbids MIRROR mode (a sync that also deletes records) for email destinations. When an old sync like that runs, the worker marks the run as failed and then commits:

conn.execute(
    "UPDATE sync_runs SET status = 'FAILED', finished_at = ?, error = ? WHERE id = ?",
    (to_iso(now()), "MIRROR mode isn't available for EMAIL destinations", run["id"]),
)
conn.commit()

The mutant deletes conn.commit(). CI stays green. But in real use, if the worker stops next, that failed status is lost. Deleting a commit like this survived 6 times out of 7 across the corpus (the 7th, in c28, a PR that splits the worker's run loop into two functions, was caught by the worker tests).

Why do the tests miss it? The worker's tests write and read back through one database connection, so they see their own unsaved change, like reading your own draft before pressing Save. Two of the planted bugs sit in exactly this gap: c23-d2, where a run whose source table is missing is marked failed but never saved, so it stays RUNNING forever, and c28-d1, where a claimed run is never saved as RUNNING, so a second worker claims it too and sends the same records twice. The lab's suggested fix is one test that writes through one connection and reads through another: a single test closes the whole class.

Is every survivor a bug?

Not always. In c24, a PR that adds an optional description to syncs (at most 280 characters), a mutant turns a zero into a one:

if ((input.description?.trim().length ?? 1) > MAX_DESCRIPTION_LENGTH) {

A missing description now counts as one character long instead of zero. The limit is 280, so both pass, and nothing anyone could see changes. That's an equivalent mutant: it survives, but it's harmless.

So 52 of the 129 survivors, in 28 PRs, were read and labeled by hand:

Verdict Survivors
Real bug 42
Equivalent 6 (for example a JSON indent of 3 instead of 2)
Unclear 4 (behaviour changes only in a corner the spec doesn't decide)

The 52 came in two groups: every survivor in the first 34 PRs (22: 19 bugs, 3 equivalent), and a random sample of 30 of the other 107 (23 bugs, 3 equivalent, 4 unclear). Only the second group is random, so the share to quote is from it: about 3 in 4 survivors are real bugs (23 of 30). Most of what CI lets through is a bug a reviewer has to catch.

How precise is one score?

Now the second question. A reviewer's recall is the share of planted bugs it finds. Say one finds 104 of the 173: 60%. On other, similar bugs it would score a bit higher or lower, so a score comes with a range, a 95% Wilson interval: where the reviewer's true rate most likely is.

Bugs Found (60%) 95% range Width
All 173 104 53–67% about ±7 points
Logic, the biggest kind (31) 19 44–76% 32 points
Weakened tests, the smallest kind (11) 7 35–85% 50 points

The overall range is the one to quote. Per kind (11 to 31 bugs each), the range is too wide to say much, so a claim like "this reviewer is bad at security" needs a big gap and an interval on it. One more caution: the 173 bugs sit in 73 changes and 58 families, and bugs in one change share code and a description. The independent sample is somewhere between 73 and 173, so the lab compares reviewers by resampling whole changes (stats.paired_bootstrap_clustered), not single bugs.

Telling two reviewers apart

The harder question: can this set tell two reviewers apart? To find out, the lab makes up two reviewers, so the true answer is known. A finds 60% of bugs; B finds 75%, so B is really better. Bugs get varied difficulty, and both reviewers see the same bugs (a hard bug is hard for both). A simulation makes a test set of a given size, lets both review it, and checks whether a paired comparison clearly shows B is better. It repeats that 300 times and counts the yeses: the power.

Bugs 60% vs 75% 60% vs 68% False alarm (60% vs 60%)
100 43% 18% 1%
173 68% 29% 5%
200 77% 25% 1%
300 93% 45% 3%

With 173 bugs, the 15-point gap shows about 2 times in 3, so one time in 3 the better reviewer wouldn't clearly look better. The usual bar is 4 times in 5 (80%): that takes a bit over 200 bugs. An 8-point gap stays out of reach even at 300. Each cell is ±3–5 points (300 runs), which is why the 68% column dips from 173 to 200. The false-alarm column stays near the 2.5% a one-sided test should give, so the simulation is calibrated.

Try it · Is 173 bugs enough?Lab 01 · 04_corpus_budget.py · stats.py

1 · How precise is one reviewer's score?

104 of 173
0%100%
Score
60%
95% range
53–67%
Range width
14 points

A Wilson interval: where the reviewer's true rate most likely is, given this many bugs. At 60%, all 173 bugs give 53–67%; the 11 weakened-test bugs alone give 35–85%.

2 · Can it tell two reviewers apart? A finds 60%, B finds 75%

100 bugs
43%
173 bugs
68%
200 bugs
77%
300 bugs
93%

Share of 300 simulated studies (each ±3–5 points) where a paired comparison clearly shows B is better. The line is the usual 80% bar. Bugs are treated as independent, so these are best cases. A smaller gap, 60% vs 68%, stays under 50% even at 300 bugs.

These are best cases: the simulation treats every bug as independent, and real bugs cluster in changes.

What would a bigger set cost? Checking the answer key is cheap: 2.0 seconds per PR in parallel, about 10 minutes for 300 PRs. Writing bugs and their hidden tests is the expensive part, and the existing changes are close to full: the agents adding bugs to them reached 26 of a planned 42, because every other idea turned CI red or repeated a bug already in the same family. Growing the set means writing new changes.

What to do

  • Measure what CI protects, don't assume it. Mutate the lines a PR adds and count survivors; coverage only says a line ran.
  • Look at where survivors cluster, not just the total: here the web app, exact limits, and deleted commits.
  • Write the test that closes a class. For the commit gap, one test that reads through a second connection.
  • Read a random sample of survivors before calling the survival rate a bug rate.
  • Quote recall with its interval, and only for the whole set unless a kind has many bugs.
  • Before comparing two reviewers, check the power for the gap you care about, and compare them on the same bugs.

Caveats

  • The 18% isn't the share of bugs that reach review. Mutants are small, single-line and mechanical. Real bugs can be bigger (a wrong design, a contract between two parts) or a missing line, which no operator makes. Equivalent and unclear mutants inflate it too. It's best for comparing CI setups on the same mutants.
  • Only 52 of 129 survivors are labeled, and only 30 of those are a random sample. "About 3 in 4 are bugs" is a rough share, not a precise one.
  • A small set of operators, not a full mutation tool. The lab mutates only the lines each PR adds, across Python and TypeScript, rather than running mutmut or Stryker on the whole codebase.
  • The power numbers are upper bounds with ±3–5 points of simulation noise. Clustered bugs make real comparisons harder.
  • The reviewers in the power simulation are made up. No person or model reviews anything in this chapter.

The checklist

  1. Generate mutants of the added lines of each correct PR, and run the PR's own tests first, then the rest of CI.
  2. Report the survival share with a 95% interval, split by part of the code and by operator.
  3. Label a random sample of survivors as bug, equivalent or unclear.
  4. Add the tests that kill whole classes of survivors, then rerun on the same mutants.
  5. Compute the Wilson interval for a reviewer's recall at the set's size, overall and per kind.
  6. Simulate power for the smallest gap you need to detect, and grow the set until it reaches 80%.

Practice: what CI catches, in code

Split records into batches, decide when a test catches a mutant (and why the batch-size PR's own test catches or → and but not the planted bug), count survivors by part of the code, write the Wilson interval, and find how many bugs a ±5-point range needs. The tests expect the lab's numbers: 30 of 200, 33 of 84 and 66 of 450 survived; 15–20% overall; 53–67% for 104 of 173; 35–85% for 7 of 11.

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

Quiz

Try it · Check your understanding0 of 6 answered
  1. 1.A script makes one small change to a line a PR adds, and CI stays green. What does that mean?

  2. 2.CI caught all 12 mutants of the batch-size PR (c20), but not the planted bug that caps the batch size at the default. Why?

  3. 3.Of 734 mutants, 129 survived CI. Which part of Harbor was least protected, and why?

  4. 4.A deleted `conn.commit()` survived CI 6 times out of 7. What would catch it?

  5. 5.With 173 planted bugs, a reviewer finds 104 (60%). What can you say?

  6. 6.Reviewer A really finds 60% of bugs and B 75%. With 173 bugs, how often does a study clearly show B is better?

Check your understanding

Try each question before opening its answer.

A PR's own tests run every line it adds. Does that mean CI protects every line?

No. Running a line isn't checking it. Mutate each added line and see whether a check fails: here 129 of 734 mutants (18%, 15–20%) survived CI even though the PRs' tests ran those lines.

Why did CI catch all 12 mutants of the batch-size PR (c20) but miss its planted bug?

The mutants change the line crudely, so the PR's test (a batch size of 4) notices. The planted bug caps the setting at the default of 100, which is wrong only above 100, and the test never tries a value that high: min(4, 100) is still 4.

Why is the web app the weakest part, and what would you add first?

Its tests render a component and check that some text appears, so a wrong number or a missing error still passes: 39% of its mutants survive, against 15% elsewhere. Add tests that assert what the value is, or that an error is shown, not just that text appears.

Why does a deleted commit survive, and how do you fix that in one test?

The worker's tests write and read back through one connection, so they see their own uncommitted change. A test that writes through one connection and reads through another can only see saved data, so it fails when the commit is missing.

Is the 18% survival rate the share of bugs that reach review?

No, it's a rough signal. Some survivors are equivalent or unclear (7 of the random 30), and real bugs are often bigger than a one-line swap or are missing code no mutant makes. It's most useful for comparing CI setups on the same mutants.

Are 173 planted bugs enough?

For one reviewer's overall recall, yes: about ±7 points (53–67% at 60%). For one kind of bug alone, no: 11 bugs give 35–85%. To tell 60% from 75% four times in five takes a bit over 200 bugs (173 gives about 2 in 3), and small gaps need far more.

Next up: Chapter 3 scores a reviewer on this set: how many bugs it finds, how many false alarms it raises, and how long each PR takes, using an AI stand-in for a human reviewer.

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.