From 97dd38dfb8344285854cc0c8644aa0cc82bf5a49 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 14:02:36 +0200 Subject: [PATCH 1/7] Pin CultMath 0.3.0 and make the pin guard fire on Linux Directory.Build.props, Packages/manifest.json and the lock move to cultmath-unity-v0.3.0 (614fd445) together. VerifyCultLibRevision matched the CultMath ProjectReference by a backslash-spelled identity and was skipped on Linux; it now matches by project file name. Does not pass tests: generated content re-rolls with the new noise kernel, fixtures follow in later commits. Co-Authored-By: Claude Opus 5.5 --- Directory.Build.props | 4 ++-- Directory.Build.targets | 2 +- Packages/manifest.json | 2 +- Packages/packages-lock.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e1f4acc37..8c27ee3ec 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,8 +6,8 @@ 45c2f4006f5f7dab357426cabd3197e8d0a17f66 $(CULTMATH_ROOT) $(CultLibRoot) - - 6d5e2096563a320933b64ddfd6ded8f2e846ac91 + + 614fd445845f6251ee2986707beecea0bb211791 C:\Program Files\Git\cmd\git.exe git diff --git a/Directory.Build.targets b/Directory.Build.targets index c9c079a6c..809f01c86 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -18,7 +18,7 @@ + Condition="'$(SkipCultLibRevisionCheck)' != 'true' and '@(ProjectReference->WithMetadataValue('Filename','CultMath'))' != ''"> Date: Fri, 9 Oct 2026 14:54:42 +0200 Subject: [PATCH 2/7] Tests: TutorialSeed1 follows the galaxy CultMath 0.3.0 rolls The noise kernel changed at cultmath-unity-v0.3.0, so the fixed seed gives a different tutorial. TutorialGalaxy_unchanged keeps its claim (a fixed seed gives a fixed tutorial) against the regenerated shape. Does not pass the whole suite: the RestoredHullsTests and the evasion test follow. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/DemoTerminusTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs index 1f282f48a..ae1895e75 100644 --- a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs +++ b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs @@ -220,7 +220,7 @@ public sealed partial class RunStartTests " | zones " + g.Zones.Length + " | owners " + string.Join(",", g.Zones.Select(z => z.Owner == null ? "-" : z.Owner.ShortName)); - // Measured on 228f241e, before the demo cut, at seed 1. + // Measured at seed 1 under CultMath 0.3.0 (cultmath-unity-v0.3.0); the noise kernel changed there, which re-rolled the galaxy. private const string TutorialSeed1 = - "Miss Terri’s Sugariffic Snack Company,Zhestokost,Lucent Media,Adrasteia,Aeronautics Unlimited,Finch Cybernetics | homes 47,10,17,49,35,1 | entrance 25 | zones 64 | owners Zhestokost,Finch,Lucent,Zhestokost,Finch,Adrasteia,Zhestokost,Adrasteia,Zhestokost,Zhestokost,Zhestokost,Zhestokost,Finch,Lucent,Adrasteia,Adrasteia,Zhestokost,Lucent,Finch,Finch,Lucent,Lucent,Finch,AU,Adrasteia,-,-,Adrasteia,Lucent,-,AU,Lucent,Zhestokost,Lucent,Lucent,AU,Adrasteia,AU,Lucent,AU,Finch,Finch,-,Lucent,Zhestokost,Zhestokost,Miss Terri's,Miss Terri's,Miss Terri's,Adrasteia,Finch,-,-,Miss Terri's,Lucent,AU,Miss Terri's,Zhestokost,Lucent,Lucent,Lucent,Finch,-,-"; + "Miss Terri’s Sugariffic Snack Company,Zhestokost,Lucent Media,Adrasteia,Aeronautics Unlimited,Finch Cybernetics | homes 3,44,40,19,0,30 | entrance 12 | zones 64 | owners AU,AU,Finch,Miss Terri's,Lucent,Zhestokost,-,Lucent,AU,AU,Lucent,Adrasteia,-,Finch,Zhestokost,-,Adrasteia,-,AU,Adrasteia,AU,Zhestokost,Miss Terri's,-,AU,Finch,Miss Terri's,-,Zhestokost,-,Finch,-,-,AU,-,-,-,-,Miss Terri's,AU,Lucent,-,Finch,-,Zhestokost,AU,-,Zhestokost,Adrasteia,Adrasteia,AU,Miss Terri's,Finch,AU,Finch,-,Lucent,Zhestokost,-,AU,Miss Terri's,Zhestokost,-,Lucent"; } From 0ccf02746d0909d09374230dc0d1b253c8954dc1 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 14:54:43 +0200 Subject: [PATCH 3/7] Tests: restored-hull station tests pick their zone by the property they test EAC-7089 and EAC-2733 were generated-content names that CultMath 0.3.0 re-rolled away. The no-Lagrange-candidate zone is now found by its property (planets that are all rosette members, so no genuine candidate) by scanning seeds, and the zero-natural-station zone by its isTutorial: false roll. Every assertion keeps its claim; the candidate predicate is shared with the leak test's fixture check. Co-Authored-By: Claude Opus 5.5 --- .../RestoredHullsTests.cs | 53 +++++++++++++++---- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs index 7447e8037..b1ce60093 100644 --- a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs +++ b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs @@ -116,6 +116,36 @@ public sealed class RestoredHullsTests return planetOrbits.Count(o => o.Parent.IsSet() && o.Parent.Key.Equals(orbit.Parent.Key) && abs(o.Distance - orbit.Distance) < .1f) > 1; } + // The zone a test needs is chosen by the property its claim is about, from the galaxy the generator rolled, because + // which zone has that property follows the noise kernel (CultMath 0.3.0 re-rolled "EAC-7089" and "EAC-2733" away). + // A planet orbit is a genuine Lagrange candidate when it is the only planet at its distance under its parent -- + // exactly what ZoneGenerator's potentialLagrangePoints filter keeps. + private static OrbitData[] ParentedPlanetOrbits(CultCache cache, ZonePack pack) => + pack.Planets.Select(p => cache.Get(cache.Get(p).Orbit)).Where(o => o.Parent.IsSet()).ToArray(); + + private static bool HasGenuineLagrangeCandidate(OrbitData[] planetOrbits) => + planetOrbits.Any(o => planetOrbits.Count(c => c.Parent.Key.Equals(o.Parent.Key) && abs(c.Distance - o.Distance) < .1f) == 1); + + // The first seed, and in its tutorial galaxy the first non-entrance zone, that has planets every one of which is a + // rosette member: no genuine Lagrange candidate, so only the entrance's widened candidate set can seat a station + // there. Such a zone is rare, so seeds are tried in order until one has it. + private static (uint seed, string zoneName) NoLagrangeCandidateZone(CultCache cache) + { + var items = new ItemManager(cache, new ProvenanceLedger(), Settings(), _ => { }); + for (var seed = 1u; seed <= 64u; seed++) + { + var galaxy = new Galaxy(TutorialGalaxySettings(), TutorialBackgroundSettings(), TutorialNameSettings(), + cache, new PlayerSettings(), new DirectoryInfo(Path.GetTempPath()), _ => { }, null, seed); + foreach (var zone in galaxy.Zones.Where(z => !ReferenceEquals(z, galaxy.Entrance))) + { + var orbits = ParentedPlanetOrbits(cache, ZoneGenerator.GenerateZone(items, TutorialZoneSettings(), galaxy, zone, isTutorial: false, ambient: false)); + if (orbits.Length > 0 && !HasGenuineLagrangeCandidate(orbits)) return (seed, zone.Name); + } + } + Assert.True(false, "fixture: no tutorial galaxy at seeds 1-64 has a zone whose planets are all rosette members."); + return default; + } + // ZoneGenerator.GenerateZone writes OrbitData/BodyData (run-store types, AetheriaStores.RunTypes), so a // catalog-only cache has no home for them. A scratch run file, deleted after the seed that used it. private static CultCache OpenReadOnlyRealCatalogWithScratchRun(string catalogPath, string runPath) @@ -652,8 +682,8 @@ public sealed class RestoredHullsTests return new Galaxy(cache, game, _ => { }); } - // Cut 1 fix batch 2 (Soul's finding #2): the tutorial entrance's widened candidate set. Seed 3's real tutorial - // galaxy has a zone, "EAC-7089", whose planets are entirely one rosette with no captured satellites at all: 4 + // Cut 1 fix batch 2 (Soul's finding #2): the tutorial entrance's widened candidate set. A real tutorial + // galaxy has a zone (NoLagrangeCandidateZone finds one; under CultMath 0.2.x it was seed 3's "EAC-7089"), whose planets are entirely one rosette with no captured satellites at all: 4 // planets sharing one Distance under one Parent, and nothing else -- potentialLagrangePoints is empty for it // (verified directly against this exact fixture, not carried over from Soul's own forced-fallback probe, whose // own candidate check undercounted planet orbits by using pack.Planets.Count -- which excludes Empty rosette @@ -678,7 +708,8 @@ public sealed class RestoredHullsTests try { using var cache = OpenReadOnlyRealCatalogWithScratchRun(gameData, scratchRun); - var galaxy = BuildGalaxyWithForcedEntrance(cache, seed: 3u, "EAC-7089"); + var (seed, zoneName) = NoLagrangeCandidateZone(cache); + var galaxy = BuildGalaxyWithForcedEntrance(cache, seed, zoneName); var items = new ItemManager(cache, new ProvenanceLedger(), Settings(), _ => { }); var pack = ZoneGenerator.GenerateZone(items, TutorialZoneSettings(), galaxy, galaxy.Entrance, isTutorial: true); @@ -716,7 +747,7 @@ public sealed class RestoredHullsTests // Cut 1 fix batch 2 (Soul's finding #2, leak check): the entrance override must not leak to (a) other // tutorial zones or (b) a non-tutorial game's own entrance zone. Both are pinned against a seed-1 galaxy -- - // the widened-candidate test above uses a different fixture, seed 3's "EAC-7089" -- so this test and the one + // the widened-candidate test above uses a different fixture, NoLagrangeCandidateZone's -- so this test and the one // below it stand or fall on this one known fixture, not that one. [Fact] public void EntranceOverrideDoesNotLeakToOtherTutorialZonesOrNonTutorialGames() @@ -737,8 +768,8 @@ public sealed class RestoredHullsTests // (a) A non-entrance tutorial zone that naturally rolls zero stations keeps that roll under // isTutorial: true -- the floor must not leak past the galaxy.Entrance reference check. - var otherZone = galaxy.Zones.Single(z => z.Name == "EAC-2733"); - Assert.NotSame(galaxy.Entrance, otherZone); + // The zone is chosen by its natural roll: zero stations without the tutorial floor (isTutorial: false). + var otherZone = galaxy.Zones.First(z => !ReferenceEquals(z, galaxy.Entrance) && StationCount(z, isTutorial: false) == 0); Assert.Equal(0, StationCount(otherZone, isTutorial: true)); // (b) The entrance zone itself, generated for a non-tutorial game (isTutorial: false), keeps its @@ -792,7 +823,7 @@ public sealed class RestoredHullsTests } // Cut 1 fix batch 3 (F6, N2): the entrance-only widening must not leak to a non-entrance zone that would - // otherwise get zero stations. Seed 3's "EAC-7089" (the same no-Lagrange fixture the widened-candidate test + // otherwise get zero stations. NoLagrangeCandidateZone's zone (the same no-Lagrange fixture the widened-candidate test // above uses, this time NOT retargeted as Entrance) rolls a real, nonzero station count on its own -- forced // here by boosting one faction's presence there (HomeZone distance 0, InfluenceDistance 50, so the roll's // floor(rand * (factionPresence+1)) is overwhelmingly likely nonzero) via the same public SavedGame round @@ -848,8 +879,9 @@ public sealed class RestoredHullsTests try { using var cache = OpenReadOnlyRealCatalogWithScratchRun(gameData, scratchRun); - var galaxy = BuildGalaxyWithBoostedPresence(cache, seed: 3u, "EAC-7089"); - var zone = galaxy.Zones.Single(z => z.Name == "EAC-7089"); + var (seed, zoneName) = NoLagrangeCandidateZone(cache); + var galaxy = BuildGalaxyWithBoostedPresence(cache, seed, zoneName); + var zone = galaxy.Zones.Single(z => z.Name == zoneName); Assert.NotSame(galaxy.Entrance, zone); var items = new ItemManager(cache, new ProvenanceLedger(), Settings(), _ => { }); @@ -857,8 +889,7 @@ public sealed class RestoredHullsTests // Confirms this fixture still has no genuine (non-rosette) Lagrange candidate -- a regression here // would mean the fixture no longer probes what this test claims to probe. - var planetOrbits = pack.Planets.Select(p => cache.Get(cache.Get(p).Orbit)).Where(o => o.Parent.IsSet()).ToArray(); - var hasGenuineCandidate = planetOrbits.Any(o => planetOrbits.Count(c => c.Parent.Key.Equals(o.Parent.Key) && abs(c.Distance - o.Distance) < .1f) == 1); + var hasGenuineCandidate = HasGenuineLagrangeCandidate(ParentedPlanetOrbits(cache, pack)); Assert.False(hasGenuineCandidate, "the entrance-adjacent fixture zone now has a genuine Lagrange candidate; it no longer tests the no-Lagrange leak path."); var stationCount = pack.Entities.OfType().Count(e => (cache.Get(e.Hull.Data) as HullData)?.HullType == HullType.Station); From c724001467c1c19754ccdbf8fd5435476ef2142e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 14:54:44 +0200 Subject: [PATCH 4/7] Tests: the evasion range's target is a written-out Djinni fit EvRangeLaunch placed stage.Generated("Djinni"), whose fit follows the galaxy; at CultMath 0.3.0 the generated target gave 95 hits jinking against 78 coasting. The target now carries an explicit Talaria/cockpit/reactor fit, so the hit comparison does not depend on generated content. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/EvasionTermTests.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/EvasionTermTests.cs b/tests/Aetheria.Shared.Tests/EvasionTermTests.cs index ea6ce903d..1d4337380 100644 --- a/tests/Aetheria.Shared.Tests/EvasionTermTests.cs +++ b/tests/Aetheria.Shared.Tests/EvasionTermTests.cs @@ -502,7 +502,7 @@ public sealed partial class RunStartTests } // Two shooters on opposite sides of the same target, 200 m away: one with a projectile gun and one with a laser - // (a beam's authored velocity is 0, a flight time of zero). The target is the generated Djinni, the catalog's one ship that strafes. + // (a beam's authored velocity is 0, a flight time of zero). The target is the fitted Djinni, the catalog's one ship that strafes. private sealed class EvRange { public Zone Arena; @@ -510,6 +510,18 @@ public sealed partial class RunStartTests public Weapon Gun, Laser, GunnerLaser; } + // The target's fit, written out: the Djinni's own hardpoints filled with the Talaria it is generated with, its + // reactor, cockpit and radiators. What the evasion tests price is this ship's strafing, not whatever the generator + // rolls for it from the galaxy. + private static ScenarioFit EvDjinni(ScenarioStage stage) => stage.Fit("Djinni", + ("Cockpit 2x2", int2(6, 3), ItemRotation.None), ("Core Power", int2(6, 11), ItemRotation.None), + ("Talaria", int2(6, 0), ItemRotation.Reversed), ("Talaria", int2(5, 1), ItemRotation.Reversed), ("Talaria", int2(7, 1), ItemRotation.Reversed), + ("Talaria", int2(4, 4), ItemRotation.CounterClockwise), ("Talaria", int2(4, 11), ItemRotation.CounterClockwise), + ("Talaria", int2(9, 4), ItemRotation.Clockwise), ("Talaria", int2(9, 11), ItemRotation.Clockwise), + ("Talaria", int2(6, 14), ItemRotation.None), + ("Iapyx", int2(1, 4), ItemRotation.Reversed), ("Iapyx", int2(3, 1), ItemRotation.Reversed), + ("Iapyx", int2(9, 1), ItemRotation.Reversed), ("Iapyx", int2(11, 4), ItemRotation.Reversed)); + private EvRange EvRangeLaunch() { Ship gunner = null, lasing = null, target = null; @@ -517,7 +529,7 @@ public sealed partial class RunStartTests { stage.Player(stage.Bare("Djinni"), float2(-50000, -50000)); gunner = stage.Place(EvLonginus(stage, "FastBlast+-", "ColdFire"), float2(0, 0), facing: float2(0, 1)) as Ship; - target = stage.Place(stage.Generated("Djinni"), float2(0, 200), facing: float2(0, 1)) as Ship; + target = stage.Place(EvDjinni(stage), float2(0, 200), facing: float2(0, 1)) as Ship; lasing = stage.Place(EvLonginus(stage, "ColdFire"), float2(0, 400), facing: float2(0, -1)) as Ship; }); var (_, arena, _, failures) = Launch(scenario, Inputs(() => GalaxySeed)); From ab396c786a3370f105d489f929f01127f26393d5 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 14:57:48 +0200 Subject: [PATCH 5/7] Tests: the evasion volleys fire enough shots to resolve the price gap With the target's fit written out the jinking price is .383 against .440 coasting, but 200 rolled shots gave 93 hits jinking against 78 coasting: the gap between the prices is smaller than the noise of two 200-shot volleys. 2000 shots put the expected gap near four standard deviations; the assertion is unchanged. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/EvasionTermTests.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/EvasionTermTests.cs b/tests/Aetheria.Shared.Tests/EvasionTermTests.cs index 1d4337380..9723cad90 100644 --- a/tests/Aetheria.Shared.Tests/EvasionTermTests.cs +++ b/tests/Aetheria.Shared.Tests/EvasionTermTests.cs @@ -584,6 +584,10 @@ public sealed partial class RunStartTests return (hits, price); } + // The two volleys' hit counts are rolls, so their gap is the price gap plus noise. At the price gap this fixture + // has (about .06 on .44) 200 shots flip the comparison one seed in eight; this many keeps it near four standard deviations. + private const int EvVolleySize = 2000; + // The evasion term is in the live price, the HUD's forecast and the roll: a ship crossing at 150 m/s that has been // jinking is harder to hit than the same ship coasting, for a projectile gun. [Fact] @@ -597,7 +601,7 @@ public sealed partial class RunStartTests EvCross(range, jinking: false); var coastingDiagnostic = FireControl.Inspect(gun, shooter, target); var coastingPrice = FireControl.HitProbability(gun, shooter, target); - var coasting = EvVolley(range, gun, shooter, 200); + var coasting = EvVolley(range, gun, shooter, EvVolleySize); Assert.Equal(0f, coastingDiagnostic.Evasion); Assert.Equal(1f, coastingDiagnostic.PEvasion); Assert.True(coastingPrice > .2f, $"fixture: a coasting target is hittable ({coastingPrice})"); @@ -605,10 +609,10 @@ public sealed partial class RunStartTests EvCross(range, jinking: true); var jinkingDiagnostic = FireControl.Inspect(gun, shooter, target); var jinkingPrice = FireControl.HitProbability(gun, shooter, target); - var jinking = EvVolley(range, gun, shooter, 200); - Console.WriteLine($"EVASION price: coasting {coastingPrice:F3} hits {coasting.hits}/200 committed {coasting.price:F3}; " + + var jinking = EvVolley(range, gun, shooter, EvVolleySize); + Console.WriteLine($"EVASION price: coasting {coastingPrice:F3} hits {coasting.hits}/{EvVolleySize} committed {coasting.price:F3}; " + $"jinking {jinkingPrice:F3} (evasion {jinkingDiagnostic.Evasion:F2} m, tracking {jinkingDiagnostic.Tracking:F1}, PEvasion {jinkingDiagnostic.PEvasion:F3}) " + - $"hits {jinking.hits}/200 committed {jinking.price:F3}"); + $"hits {jinking.hits}/{EvVolleySize} committed {jinking.price:F3}"); Assert.True(jinkingDiagnostic.Evasion > 0f); Assert.True(jinkingDiagnostic.PEvasion < 1f); From 549c1b0253cf7ca608bd2ed49dad4a6a6ebe5667 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 15:39:05 +0200 Subject: [PATCH 6/7] Tests: the two no-Lagrange zone tests share one scan; restore NotSame, use Assert.Fail The tutorial-seed scan for a zone with no genuine Lagrange candidate ran once per test; it now runs once behind a Lazy. The leak test regains Assert.NotSame(galaxy.Entrance, otherZone), and the scan's miss path uses Assert.Fail (xUnit2020). Co-Authored-By: Claude Opus 5.5 --- .../RestoredHullsTests.cs | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs index b1ce60093..61c5fad1f 100644 --- a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs +++ b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs @@ -129,7 +129,27 @@ public sealed class RestoredHullsTests // The first seed, and in its tutorial galaxy the first non-entrance zone, that has planets every one of which is a // rosette member: no genuine Lagrange candidate, so only the entrance's widened candidate set can seat a station // there. Such a zone is rare, so seeds are tried in order until one has it. - private static (uint seed, string zoneName) NoLagrangeCandidateZone(CultCache cache) + // The scan is the cost (tens of seconds), and it depends only on the generator, so both tests share one result + // through a lazy computed under its own scratch run store. + private static readonly Lazy<(uint seed, string zoneName)> NoLagrangeCandidateZoneScan = new(ScanForNoLagrangeCandidateZone); + + private static (uint seed, string zoneName) NoLagrangeCandidateZone() => NoLagrangeCandidateZoneScan.Value; + + private static (uint seed, string zoneName) ScanForNoLagrangeCandidateZone() + { + var scratchRun = Path.Combine(Path.GetTempPath(), $"aetheria-nolagrange-scan-{Guid.NewGuid():N}.cc"); + try + { + using var cache = OpenReadOnlyRealCatalogWithScratchRun(Path.Combine(FindRepoRoot(), "GameData", "Aetheria.cc"), scratchRun); + return ScanForNoLagrangeCandidateZone(cache); + } + finally + { + if (File.Exists(scratchRun)) File.Delete(scratchRun); + } + } + + private static (uint seed, string zoneName) ScanForNoLagrangeCandidateZone(CultCache cache) { var items = new ItemManager(cache, new ProvenanceLedger(), Settings(), _ => { }); for (var seed = 1u; seed <= 64u; seed++) @@ -142,8 +162,7 @@ public sealed class RestoredHullsTests if (orbits.Length > 0 && !HasGenuineLagrangeCandidate(orbits)) return (seed, zone.Name); } } - Assert.True(false, "fixture: no tutorial galaxy at seeds 1-64 has a zone whose planets are all rosette members."); - return default; + return Assert.Fail("fixture: no tutorial galaxy at seeds 1-64 has a zone whose planets are all rosette members."); } // ZoneGenerator.GenerateZone writes OrbitData/BodyData (run-store types, AetheriaStores.RunTypes), so a @@ -708,7 +727,7 @@ public sealed class RestoredHullsTests try { using var cache = OpenReadOnlyRealCatalogWithScratchRun(gameData, scratchRun); - var (seed, zoneName) = NoLagrangeCandidateZone(cache); + var (seed, zoneName) = NoLagrangeCandidateZone(); var galaxy = BuildGalaxyWithForcedEntrance(cache, seed, zoneName); var items = new ItemManager(cache, new ProvenanceLedger(), Settings(), _ => { }); @@ -770,6 +789,7 @@ public sealed class RestoredHullsTests // isTutorial: true -- the floor must not leak past the galaxy.Entrance reference check. // The zone is chosen by its natural roll: zero stations without the tutorial floor (isTutorial: false). var otherZone = galaxy.Zones.First(z => !ReferenceEquals(z, galaxy.Entrance) && StationCount(z, isTutorial: false) == 0); + Assert.NotSame(galaxy.Entrance, otherZone); Assert.Equal(0, StationCount(otherZone, isTutorial: true)); // (b) The entrance zone itself, generated for a non-tutorial game (isTutorial: false), keeps its @@ -879,7 +899,7 @@ public sealed class RestoredHullsTests try { using var cache = OpenReadOnlyRealCatalogWithScratchRun(gameData, scratchRun); - var (seed, zoneName) = NoLagrangeCandidateZone(cache); + var (seed, zoneName) = NoLagrangeCandidateZone(); var galaxy = BuildGalaxyWithBoostedPresence(cache, seed, zoneName); var zone = galaxy.Zones.Single(z => z.Name == zoneName); Assert.NotSame(galaxy.Entrance, zone); From a3ea1d7ba1f20a6041abe6555c03648f353f2105 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 9 Oct 2026 15:40:42 +0200 Subject: [PATCH 7/7] Tests: scan's miss path fails then returns default (Assert.Fail is void) Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/RestoredHullsTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs index 61c5fad1f..b5622b268 100644 --- a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs +++ b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs @@ -162,7 +162,8 @@ public sealed class RestoredHullsTests if (orbits.Length > 0 && !HasGenuineLagrangeCandidate(orbits)) return (seed, zone.Name); } } - return Assert.Fail("fixture: no tutorial galaxy at seeds 1-64 has a zone whose planets are all rosette members."); + Assert.Fail("fixture: no tutorial galaxy at seeds 1-64 has a zone whose planets are all rosette members."); + return default; } // ZoneGenerator.GenerateZone writes OrbitData/BodyData (run-store types, AetheriaStores.RunTypes), so a