---
name: unapplied-mutation-green-reads-as-a-passing-guard
description: "A scratch mutation that FAILS TO APPLY yields a green indistinguishable from a real guard — so a purposeful red needs two assertions, that the mutation landed and that the cell then failed."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 49590165-5580-485a-b466-61de5a51084c
  modified: 2026-08-22T06:19:40.243Z
---

**A purposeful red needs TWO assertions, not one: that the mutation LANDED, and that the cell then
FAILED.** A scratch that fails to apply runs the cell against the UNMUTATED tree and prints a pass —
which is byte-identical to the output of a guard that really defended. todlando measured this on
himself (TURNKEY #212 W4 Lane 1, 2026-08-22) and reported it rather than shipping the green.

His instance: the mutation script asserted, its output scrolled past above the cargo output, the
test ran against the clean tree and printed `1 test run: 1 passed, 66 skipped  SCRATCH_B_EXIT=0`.
Read for the verdict instead of for the mutation, that becomes **"cell B is a real guard" on
evidence that the guard was never tested.**

**Discriminator, and it is cheap: PRINT THE MUTATED FUNCTION BODY before running the cell.** Then
the log carries proof the scratch reached its subject. Also assert `MATCH_COUNT == 1` and REFUSE
rather than replacing a first hit — a replace that silently takes hit #1 has already chosen a
population for you (kin: [[scripted-edit-zero-match-refusal]]).

**The general shape, three faces in one day:** an instrument that DID NOT RUN and an instrument that
RAN AND AGREED produce the same output.
- the truncation pipe — `tail`'s 0 standing in for the product's 3 ([[exit-status-after-a-truncation-pipe-measures-the-truncator]])
- a zero-match filter reading as absence ([[zero-match-filter-reads-as-absent]])
- the unapplied scratch, here

**Root cause of his non-application, environmental and it will recur:** this shell collapses one
level of backslash when a heredoc writes a script, so a `\n` written into an inline Python/matcher
source arrives as a real linebreak. It also manufactured a false compile-red (12
`unknown start of token`) earlier in the same lane. **Do:** write the exact old and new text to
delimiter files with a QUOTED heredoc (`<<'EOF'`), where single backslashes survive, and have the
script READ them. Never put escapes in an inline script.

Kin: [[structural-exclusion-cannot-be-mutation-proved]] (the other way a mutation-table green means
nothing) · [[mutate-the-defect-not-the-trigger]] · [[negative-control-must-mutate-every-encoding]] ·
[[is-this-red-mine-delta-test]].

**3rd face, doyle 2026-09-07 (a DOC write, not a mutation):** a python heredoc writing a Windows path into WEBSERVE-272-JIT.md turned `\releases\artifacts` into CR+`eleases`+BEL+`rtifacts` — the tool collapsed one backslash level, python then read `\r` and `\a` as escapes; my FIRST repair used the same heredoc and rewrote the same bytes while printing `occurrences of good: 1` (the assertion checked the string I typed, which was already mangled). Verified only by a repr() read of the file bytes; fixed by building the path with chr(92) so no backslash crosses the shell. Rule widened: any backslash-bearing literal through a heredoc is verified by BYTES on disk (repr/od), never by the writer's own success line.
