test: the key-precision and dropped-branch mutants actually bite (#331)

Running the mutants exposed two toothless guards before review did:
- reverting the keys to toFixed(6) no longer produced false П4 refusals
  because the new 2e-7 incidence absorbed the debris pair — the REAL harm of
  coarse keys is the opposite direction: nodes 4e-7 apart merged into one
  key and П4 went blind to a genuine near-miss. AC1 now pins that case.
- the `break` patch failed to reproduce the old first-branch-only loss (the
  frontier re-visits the node through the pushed endpoints); the patch now
  truncates the node's candidate list to one entry, which loses forks the
  way `.find` did — both the fork unit and the 10 000-atom run turn red.

Issue: #331
User-Visible: no
This commit is contained in:
Codex
2026-08-28 04:42:07 +03:00
parent 58f3acbbde
commit 0cdf85d9e2
2 changed files with 10 additions and 7 deletions
+2 -7
View File
@@ -569,13 +569,8 @@ export const MUTANTS = [
+ 'understates the wall run — a legitimate thickness-step filler gets refused (#331 §2.3)',
patches: [{
file: 'src/junction-limits.ts',
find: ' visited.add(candidate);\n'
+ ' total += length(candidate.a, candidate.b);\n'
+ ' frontier.push(candidate.a, candidate.b);',
replace: ' visited.add(candidate);\n'
+ ' total += length(candidate.a, candidate.b);\n'
+ ' frontier.push(candidate.a, candidate.b);\n'
+ ' break;',
find: ' for (const candidate of byNode.get(key(node)) || []) {',
replace: ' for (const candidate of (byNode.get(key(node)) || []).slice(0, 1)) {',
}],
},
{