From 4510a62c4f0708aeb615b78a2adbe2c985637a40 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 25 Sep 2026 03:17:38 +0200 Subject: [PATCH] Cut 12.2 Soul fix batch 2, S7: author Tracking through Build, not by patching after Fire TheHudEstimateIsTheCommitPrice used to fire each shot, then reach into Zone.PendingShots and overwrite the frozen Tracking field after the fact. Build now takes a `tracking` parameter (default 100000, matching the old fixed value) alongside Precision and Accuracy, so this test authors Tracking = 6 up front like every other frozen shooter stat, with no post-hoc patch loop. Manually verified M15 (Commit applies PSpread twice) still fails this test (empirical 0.070 vs forecast 0.126) after the rewrite. Co-Authored-By: Claude Opus 5.5 --- .../FireControlCut12Tests.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/FireControlCut12Tests.cs b/tests/Aetheria.Shared.Tests/FireControlCut12Tests.cs index 29090e85c..829dd0304 100644 --- a/tests/Aetheria.Shared.Tests/FireControlCut12Tests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlCut12Tests.cs @@ -1052,10 +1052,15 @@ public sealed class FireControlCut12Tests : IDisposable // a target jinked off its fire-time projection so pDeviation is strictly less than 1) and checks the // EMPIRICAL hit fraction over the real Commit path against the HUD's own forecast, with a tolerance sized // from the sample (3 sigma of a Bernoulli(p, n)). + // S7 fix batch (Hands, 2026-09-25): Tracking is now authored through Build's own `tracking` parameter (one + // authoring path for every frozen shooter stat, matching Precision/Accuracy) instead of patching + // PendingShot.Tracking after every Fire -- the operator's own rule (2026-09-22) is that a fixture should + // author its state up front, not reach into a frozen field post hoc. An authored Tracking of 6 against this + // 5x7 hull and jink gives pDeviation ~= .33, strictly between 0 and 1, with no patching. [Fact] public void TheHudEstimateIsTheCommitPrice() { - var e = Build(TestSettings(), SolidShape(5, 7), precision: .5f, velocity: 40, spread: 6f); // 2.5s flight, commits at 2.0s + var e = Build(TestSettings(), SolidShape(5, 7), precision: .5f, velocity: 40, spread: 6f, tracking: 6f); // 2.5s flight, commits at 2.0s var origin = e.Target.Position; const int shots = 800; @@ -1065,16 +1070,8 @@ public sealed class FireControlCut12Tests : IDisposable e.Target.Position = origin; // reset before each Fire so every shot freezes the same FireTargetPosition var shotId = FireControl.Fire(e.Weapon, e.WeaponItem, e.Shooter); e.Zone.Update(.001f); - // The fixture's own Targeting system freezes Tracking = 100000 (full-strength isolation, Build's - // own convention) -- against that, a jink small enough to keep the target on this 5x7 hull barely - // registers (pDeviation ~= .99996). Lower the frozen Tracking after the fact, the same way - // CommitProbabilityIsTheExactProductOfItsFourFactors overrides a frozen field, so the jink below - // produces a pDeviation strictly between 0 and 1. var index = e.Zone.PendingShots.FindIndex(s => s.ShotId == shotId); - var shot = e.Zone.PendingShots[index]; - shot.Tracking = 6f; - e.Zone.PendingShots[index] = shot; - pendingSnapshots.Add(shot); + pendingSnapshots.Add(e.Zone.PendingShots[index]); } // One jink, after every shot is queued, before any of them commit -- pDeviation < 1 for all of them,