From 73e080d8d671ea711086d673c5840a4e1bf8c31b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 22 Sep 2026 03:01:04 +0200 Subject: [PATCH] Cut 9: re-anchor cut3 and cut6 onto the mixed seed 9.1 changed the line those two harnesses pin, stranding five anchors including cut6's own no-op control -- so cut6 was defending nothing until now. Same thing the diagnostics refactor did to four harnesses earlier, and the second time in a day that a change to Commit has stranded anchors elsewhere. The rules are unchanged; only the text moved. That maintenance cost is now a known property of pinning mutations to literal source text. It buys a stale anchor failing loudly within one run, which is how both instances were caught immediately, and it belongs in Cut 10's list beside Soul's harness audit. Co-Authored-By: Claude Opus 5 --- tests/mutation_tests_fire_control_cut3.sh | 8 ++++---- tests/mutation_tests_fire_control_cut6.sh | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/mutation_tests_fire_control_cut3.sh b/tests/mutation_tests_fire_control_cut3.sh index b32acb159..66a882167 100644 --- a/tests/mutation_tests_fire_control_cut3.sh +++ b/tests/mutation_tests_fire_control_cut3.sh @@ -7,7 +7,7 @@ # # OutOfArcConsumesNoDraw no longer exists. It asserted against ItemManager.Random (`e.Items.Random`), but # Cut 6b (6.1) moved every shot's roll onto its own freshly-seeded, immediately-discarded -# `new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u)` local to Commit -- a deliberate, +# `new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u))` local to Commit -- a deliberate, # good change (reproducibility independent of unrelated draws elsewhere) that also meant Commit stopped # reading or writing ItemManager.Random on any path, arc or no arc, which made the old test's own declared # mutation ("roll first and multiply by zero") pass for a reason that had nothing to do with arcs. Cut 7 @@ -197,7 +197,7 @@ check_mutation \ check_mutation \ "RollsAreSeeded: Commit's draw must be a pure function of (zone, shot id), not fresh entropy per call" \ "$FIRE_CONTROL_CS" \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ 'var random = new Random((uint) System.Guid.NewGuid().GetHashCode() | 1u);' \ "FireAuthorityTests.RollsAreSeeded" \ "red" @@ -350,8 +350,8 @@ check_mutation \ check_mutation \ "CombatNeverDrawsFromTheSharedStream: Commit must never read ItemManager's shared stream, on any path" \ "$FIRE_CONTROL_CS" \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u); shot.Source.ItemManager.Random.NextFloat();' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u)); shot.Source.ItemManager.Random.NextFloat();' \ "FireAuthorityTests.CombatNeverDrawsFromTheSharedStream" \ "red" diff --git a/tests/mutation_tests_fire_control_cut6.sh b/tests/mutation_tests_fire_control_cut6.sh index 175769cc4..1de667cc2 100644 --- a/tests/mutation_tests_fire_control_cut6.sh +++ b/tests/mutation_tests_fire_control_cut6.sh @@ -194,8 +194,8 @@ check_mutation() { check_mutation \ "control (no-op round trip)" \ "$FIRE_CONTROL_CS" \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ "FireControlCut6Tests.SameFightRollsSameThroughUnrelatedDraws" \ "green" @@ -206,7 +206,7 @@ check_mutation \ echo "" echo "=== 6.1 Commit must not read or write the shared ItemManager.Random stream (expect red) ===" if replace_unique "$FIRE_CONTROL_CS" \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ 'var random = shot.Source.ItemManager.Random;' \ && replace_unique "$FIRE_CONTROL_CS" \ 'return MakeOutcome(shot, hit, shielded, shieldBroken, cell, aimed, now);' \ @@ -224,8 +224,8 @@ fi check_mutation \ "6.1 ShotId must reach the seed" \ "$FIRE_CONTROL_CS" \ - 'var random = new Random((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u);' \ - 'var random = new Random((zone.CombatSeed * 2654435761u) | 1u);' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) ^ (uint) shot.ShotId | 1u));' \ + 'var random = new Random(MixSeed((zone.CombatSeed * 2654435761u) | 1u));' \ "FireControlCut6Tests.ShotIdDecidesTheDie" \ "red"