252/252 Mutants Killed—and Every Kill Was Fake: A Mutation Testing Postmortem

Grimmoner · reddit · 2026-10-19

The author uses Claude Code to build small Python home-automation tools and runs mutation testing on anything that matters: deliberately break the code one small change at a time and confirm some test fails for each mutant. One run looked perfect—three hours, 252 mutants, 252 killed—until a post-run control check failed and voided everything.

Root cause: the runner copies code and tests into a fresh temp folder per mutant. Three days earlier, a test had started reading a data file next to the code, and nobody added it to the copy list. Every copy—mutated or not—failed that same test, so every mutant "died" from the missing file. The baseline ran on the source folder where the file exists, hiding the bug. The same flaw had already voided an earlier "11 of 11 killed" result sitting in the changelog as evidence.

An earlier incident: a run crossing midnight lost its /tmp test venv config (likely macOS tmp cleanup); pytest couldn't start, and a suite that can't start fails—so everything after midnight read as killed.

Current safeguards:

The lesson generalizes to evals and LLM judges: run one must-pass and one must-fail case through the exact same harness every run. 100% should make you suspicious, not happy.

Original post →

More from coding & agent

coding & agent channel →