Inventory grid harness: the cargo state follows a thermal view on the same panel (kills cargo-thermal-kept); the mutation script can run named switch mutants

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-12-01 05:23:14 +01:00
commit 799b4c4c9f
2 changed files with 6 additions and 4 deletions

View file

@ -914,6 +914,8 @@ public static class InventoryGridParityCapture
var iconMultiplier = panel.NodePrototype.GetComponent<InventoryCell>().Icon.pixelsPerUnitMultiplier;
var grid = panel.Grid;
state.Setup?.Invoke(panel, fixture);
// A bay shown after the thermal view on the same panel must not draw pipes.
if (state.Cargo) panel.Display(fixture.Ship, false, true);
if (state.Cargo) panel.Display(fixture.Ship.CargoBays.First());
else panel.Display(fixture.Ship, state.Hud, state.Thermal);
MutateLook(panel, state);

View file

@ -13,7 +13,7 @@ side. A mutant whose reading is not 1.2 above the bound is recorded as UNCLAIMED
One Unity batch instance runs on Starfire at a time, so each launch takes the lock directory F:/aeth-wt/unity.lock.d first.
Run from the repo root: python tests/mutation_tests_inventory_grid.py
The switch's mutants (SWITCH_MUTANTS) run with: python tests/mutation_tests_inventory_grid.py --switch <golden.json>
The switch's mutants (SWITCH_MUTANTS) run with: python tests/mutation_tests_inventory_grid.py --switch <golden.json> [mutant ...]
Exit code 0 only if the control passes, every claimed mutant is killed, and the bound sits where the margin rule puts it.
"""
from __future__ import annotations
@ -153,7 +153,7 @@ def replace_unique(path: Path, anchor: str, mutated: str, occurrences: int = 1)
return original
def run_switch(golden: str) -> int:
def run_switch(golden: str, only: list[str]) -> int:
SCRATCH.mkdir(parents=True, exist_ok=True)
args = ["-hullOnly", "-recordsIn", golden]
failures: list[str] = []
@ -185,8 +185,8 @@ def run_switch(golden: str) -> int:
def main() -> int:
if len(sys.argv) == 3 and sys.argv[1] == "--switch":
return run_switch(sys.argv[2])
if len(sys.argv) >= 3 and sys.argv[1] == "--switch":
return run_switch(sys.argv[2], sys.argv[3:])
SCRATCH.mkdir(parents=True, exist_ok=True)
failures: list[str] = []
readings: dict[str, tuple[int, float]] = {}