Skip to content

Prefer the real mutation tool, and make a hand-rolled runner prove it ran - #8

Merged
AmazingAng merged 1 commit into
AmazingAng:mainfrom
drmikecrowe:contrib/mutation-tooling
Aug 14, 2026
Merged

Prefer the real mutation tool, and make a hand-rolled runner prove it ran#8
AmazingAng merged 1 commit into
AmazingAng:mainfrom
drmikecrowe:contrib/mutation-tooling

Conversation

@drmikecrowe

Copy link
Copy Markdown
Contributor

The manual mutation procedure currently reads as an equal alternative to a mutation tool. It isn't — and this repo's own six-round verification is the evidence.

The hand-rolled runner reported kills for mutants it never executed, because two same-size mutants written in the same second shared a bytecode cache. (Fixed in #4/#5; tools/mutants.py now pins mtimes and aborts if the cache reappears.)

What makes that worth a rule rather than just a bugfix is its direction. It could only ever inflate the score. A mutant that silently doesn't run reports a kill, so the layer stays green precisely because it is broken, and no red gauntlet can surface it. Every other layer in this skill fails loudly when it breaks. This one didn't.

Two changes:

  1. SKILL.md mutation cell states a preference order rather than an equivalence. A real tool generates mutants from the syntax tree: it can't apply a mutant to code that moved, and it can't report one it didn't run. Reach for it first; manual mutation is for languages with no tool.
  2. The manual procedure carries the execution-proof requirement, pointing at the guard tools/mutants.py already gained — so the next person writing a runner from this procedure knows it's required rather than incidental, and EVIDENCE says which check proves execution.

The general form, which is the part I'd argue for keeping even if you reword the rest: a hand-written mutant list matched against source text is a second copy of the code, and it goes stale on every refactor of the thing it's meant to guard.

Note: our fork goes further and reports the layer UNAVAILABLE rather than falling back to a hand-rolled runner at all. That's a bigger change to this skill's posture and it is deliberately not in this PR — happy to discuss separately if you want it.

+18/-1 across SKILL.md and references/gauntlet.md. Demo and CI untouched.


Part of a series from a fork that has been running this skill daily (drmikecrowe/old-coder). Independent of the other PRs.

🤖 Generated with Claude Code

… ran

The manual mutation procedure reads as an equal alternative to a mutation tool.
It is not, and this repo's own six-round verification is the evidence: the
hand-rolled runner reported kills for mutants it never executed, because two
same-size mutants written in the same second shared a bytecode cache.

What makes that failure worth a rule rather than a bugfix is its direction. It
could only ever inflate the score. A mutant that silently does not run reports a
kill, so the layer stays green precisely because it is broken, and no red
gauntlet can surface it. Every other layer here fails loudly when it breaks;
this one did not.

Two changes follow. The SKILL.md cell now states a preference order rather than
an equivalence: the project's tool generates mutants from the syntax tree and
cannot skip one silently, so reach for it first. And the manual procedure now
carries the execution-proof requirement, pointing at the guard tools/mutants.py
already gained in the fix, so the next person writing a runner from this
procedure knows it is required rather than incidental.

The general form: a hand-written mutant list matched against source text is a
second copy of the code, and it goes stale on every refactor of the thing it is
meant to guard.

(Our fork goes further and reports the layer UNAVAILABLE rather than falling
back to a hand-rolled runner at all. That is a bigger change to this skill's
posture, so it is not in this PR.)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@drmikecrowe
drmikecrowe marked this pull request as ready for review August 12, 2026 15:31
@AmazingAng
AmazingAng merged commit 331ab81 into AmazingAng:main Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants