Every broken test suite scored a perfect 1.000

Do the tests your coding agent writes actually catch bugs? I planted 599 validated defects and ran 32 suites at them. The interesting number is not the one I went looking for.

Alex · 6 December 2026 · 4 modules, 27 functions, 599 validated mutants, €1.32 of usage

The measure

Mutation testing: change one thing in the code so it behaves differently, run the suite, see whether it fails. The share of planted changes a suite catches is its mutation score. Unlike coverage, you cannot satisfy it by executing a line without checking what the line did.

The published numbers are all for single-shot generation — one prompt, one answer, no tools. A comparative study puts LLM-written suites at a peak of 0.546 against 0.690 for human-written ones. A 2026 empirical study of tests written by coding agents measured assertion density and coverage, found both healthy, and said explicitly that mutation testing is what would settle whether that translates into fault detection. Nobody had run it.

What I expected to find, and did

Four arms, each adding one capability, on Haiku:

armmutation scorecost per run
one prompt, no tools0.9712$0.0053
agent, may run pytest0.9843$0.0239
agent + coverage target0.9933$0.0250
agent + surviving mutants fed back1.0000$0.1494

Monotone, unsurprising, and much higher than the published single-shot figures. Mutation-guided iteration reached 1.000 in every case, for about eight times the first round's cost.

What I did not expect

Three of the 32 first-round suites failed against the unmodified module — they do not pass on correct code. All three came from the same arm: the one with no tools, which cannot run what it writes. Every arm that could execute produced a working suite, 29 times out of 29.

All three broken suites scored a mutation score of 1.000.

Of course they did. A suite that fails on correct code fails against every mutant too, and a mutation score that does not check validity first counts each of those failures as a kill. One of the three was not valid Python at all. It still scored 1.000.

So the thing an executing agent buys you is not sharper tests. It is tests that exist. If you take one thing from this: run the suite against the unmodified code before you believe any number computed from it.

Coverage could not tell any of them apart

Every arm reached 100% statement coverage and 100% decision coverage, in every valid run, on every module. The mutation scores over those same runs range from 0.96 to 1.00 — one suite leaves five planted defects alive, another leaves none.

If coverage were the measure, these suites would be identical. It is not a measure of whether anything was checked.

Taking the docstrings away changed nothing

Half the runs used modules whose docstrings state the behaviour — the inclusive boundary, the rounding direction, which end of the range is excluded. The other half used byte-identical code with every docstring cut to one line. One-shot went 0.9712 with them and 0.9841 without; the agent 0.9843 against 0.9747. Both differences are smaller than the spread between modules and one has the wrong sign.

The reason matters more than the result. The model has the code in front of it, and for a mutation score the code is the specification: a test written from the implementation pins what the implementation does, a mutant changes what it does, so the test fails. Documentation is irrelevant to that loop.

Which is the limit of the whole measure

A mutation score is regression-detection power. It is not correctness.

A suite written from an implementation ratifies that implementation, bug and all. If a function rounds the wrong way, tests generated from it assert the wrong rounding, score beautifully against every mutant, and will defend the bug against whoever later fixes it. Nothing here measures that. The experiment that would — plant a defect where the code contradicts its own docstring, and see which one the generated suite asserts — is the obvious next one, and I have not run it.

The part that applies to anyone measuring this

A mutation score is only as honest as its mutants. The standard way it gets inflated is the equivalent mutant: an edit no input can reveal, which survives every possible suite and is counted against it anyway. So every mutant here was kept only if some input tells it apart from the original, with the witness recorded. 43 of 642 were discarded that way.

The inputs you validate with turn out to decide the answer. Mine come in two kinds: edge cases written by hand from the docstrings, and a few hundred seeded random draws per function. Only 18 of 599 kept mutants need a random draw to be distinguishable at all — and they behave completely differently:

mutantskilled by a careful hand-written suite
distinguishable by a hand-picked edge case276 of 282 (97.9%)
distinguishable only by a random draw1 of 8 (12.5%)

On one module the two sets score the same unchanged suite at 0.9832 and 0.9512: a 3.2-point difference produced by four mutants. A human picks edge cases out of the documentation and then writes tests against those same edges, so a mutant set validated on hand-picked inputs is quietly selected for being catchable.

Any mutation score built on hand-validated mutants, or on mutants that were never validated at all, is optimistic by roughly that much.

How hard is this corpus? Easier than the literature's

I wrote two careful suites by hand, from the docstrings, without looking at the mutant list: 0.9512 and 0.9581, both at 100% coverage. Against a published human baseline of 0.690 on real-world benchmarks, that says plainly that 27 small pure functions are an easier target than the code those studies used. Read every number above with that in mind.

Four times the measurement was wrong first

Each of these made the answer look better than it was, which is the direction that does not announce itself.

  1. The grader scored a file that was not a test file at 1.000. It copied each suite under its own name; pytest only collects test_*.py, so a saved answer collected nothing, exited 5, and every mutant counted as killed because the exit code was non-zero.
  2. Joining every fenced block in a one-shot answer. With no tools, a model narrated a tool call it could not make; the pseudo-XML went into the “test file”, which then did not parse — and an uncollectable file scores 1.000.
  3. --tools without --allowedTools. The first agent trial wrote no file and logged a permission denial: the first flag decides which schemas are sent, the second which calls are allowed.
  4. A validation cache keyed without the input source, so random draw 0 was compared against the original’s result for hand-written input 0. Every mutant looked distinguishable and the equivalent count fell to zero — a suspiciously perfect result that was the bug announcing itself.

The harness

Corpus, oracle, seven mutation operators with validation, a dependency-free coverage tracer, the grader, the eight-arm runner, the figure pipeline and an offline test suite that needs no network and no API — plus every recorded run as raw CSV, including the rows thrown away.

Test Strength — €49

Point it at your own modules, write the oracle for them, and you get your own figure instead of mine. Every number on this page is in the report, and the method is above if you would rather build it yourself.