Close the gaps a mutation pass found in the new ship tests (S-Soul F1-F3)

A pass of 137 hand-written mutations over ShipAuthoring.cs, ShipModCatalog.cs
and ship_cc.py, run against the tests from the last three commits, left six
surviving or unrunnable. Each is resolved:

- Validator: the hull Width/Height < 1 guards and the opacity IsInfinity
  guard could not change any outcome (an empty grid has no occupied cell;
  +Infinity exceeds 1 and -Infinity is below 0). Deleted.
- Two accepted shapes had no test: a hardpoint footprint with empty cells
  beside occupied ones, and an empty ParentId meaning no parent. Added.
- The GLB header length was pinned only from above. Added the shorter case.
- Compose's working-directory cleanup was invisible because the assertion
  listed files, not directory entries. It now lists both.
- ReadPackage runs the catalog's item validation on the hull (the derived
  catalog must reopen); that call now has a test.
- Python: a single non-ship record, a non-array payload long enough to fill
  every slot, and a hardpoint-only change to the layout revision each had a
  surviving mutation. Tests added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 02:14:10 +02:00
commit fe38f28865
4 changed files with 53 additions and 9 deletions

View file

@ -96,6 +96,23 @@ public sealed class ShipValidationTests
ShipAuthoringStore.Validate(ship);
}
[Fact]
public void EmptyCellsInAHardpointFootprintNeedNotLieOnTheHull()
{
var ship = ShipAuthoringTests.Fixture();
ship.Hull.Hardpoints[0].Shape = new Shape(2, 1);
ship.Hull.Hardpoints[0].Shape.Cells[0, 0] = true;
ShipAuthoringStore.Validate(ship);
}
[Fact]
public void AnEmptyParentIdMeansNoParent()
{
var ship = ShipAuthoringTests.Fixture();
ship.Anchors[0].ParentId = "";
ShipAuthoringStore.Validate(ship);
}
[Fact]
public void AnAnchorMayNameItsHardpointAsParent()
{