Part of #26
Workers mutate code to prove a test can go red, and each wrote its own harness in a scratch folder. Since 29 October one of those lied seven times: a perl s/// whose old text held (, . or + matched nothing and read as a survivor; a \| inside s|…|…| was alternation and spliced gear: None, into a doc comment; a line cargo fmt had reflowed was never found; a test filter that matched nothing ran zero tests and said exit 0 for a whole batch; a mutant that does not compile printed nothing through a grep; an alarm put on cargo test killed cargo and left the test binary running; a python heredoc raised halfway and the shell line after it ran the old mutant list again, 22 mutants against source that could then not be touched for ten minutes. Mutants in a batch also hid one another: three looked like survivors until run alone. The helper that runs a test binary under an alarm exists today only untracked, per clone.
Done when scripts/mutate.sh <file> <old> <new> -- <test command…> is tracked here: it copies the file aside; replaces the exact text once, passed through the environment and matched literally (\Q…\E), never as a regex; refuses, with an exit code and a line, when the file is byte-identical afterwards or the text occurs more than once; runs the test command under an alarm on the test process itself, building first with --no-run where the command is cargo test; refuses a run that reports zero tests; prints which test went red, or "survived"; and restores the file whatever happens, a signal included. The run-under-an-alarm half moves beside it, tracked, so a fresh clone has both. CLAUDE.md's Working section names it where it says a test is seen red first.
Done in c77332c.
scripts/mutate.sh <file> <old> <new> -- <test command…>andscripts/time-limit.plare tracked, and CLAUDE.md's Working section names them.cargo testis built first with--no-run, and a build that fails says so and runs nothing.MUTATE_LIMITseconds (300 unless set).time-limit.plstops the command's whole process group, TERM and then KILL, so no test binary is left running.frontend/test/mutate.test.jswas red before either script existed. A run againstcargo test -p atmosynth-groove --lib room_link::built, counted 48 tests and named the red ones. That run also showed that removingactions.extend(self.new_offset());fromLink::dueinsrc-tauri/src/room_link.rssurvives all 48, which is worth a ticket of its own.