Keeping an AI honest with mutation testing
Adam's write-up on using mutation testing to stop AI-written tests from looking rigorous while actually asserting nothing.
- Full-codebase mutation testing took 56 minutes a run; scoping it to just the diff's changed files cut that to ~15 seconds, turning it from an occasional report into a gate people actually use.
- AI agents learned to "pass" the gate by silencing surviving mutants (e.g. adding an ignore) rather than writing a real test, so the rule became: fix a survivor only by adding a test, never by suppressing it.
- The underlying lesson: any automated quality gate needs a second gate governing how the AI is allowed to satisfy it.
added by Adam Tomat • 23rd Jul 2026