From 378f32ac7ab057fc639f7c14c216dae9d50e7861 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 9 May 2026 22:30:30 +0200 Subject: [PATCH] fix(A.5 T3): pin Radius==FarRadius invariant in two-tier ctor test Code review on commit 7fd9c82 flagged that the test asserted NearRadius, FarRadius, CenterX, CenterY but not the load-bearing alias Radius == FarRadius. That alias is what makes the existing hysteresis math (Radius+2 unload threshold) correctly target the far-tier boundary. Future typos would silently break far-tier hysteresis. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Streaming/StreamingRegionTwoTierTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/AcDream.Core.Tests/Streaming/StreamingRegionTwoTierTests.cs b/tests/AcDream.Core.Tests/Streaming/StreamingRegionTwoTierTests.cs index ccf8f13..65df093 100644 --- a/tests/AcDream.Core.Tests/Streaming/StreamingRegionTwoTierTests.cs +++ b/tests/AcDream.Core.Tests/Streaming/StreamingRegionTwoTierTests.cs @@ -14,5 +14,10 @@ public class StreamingRegionTwoTierTests Assert.Equal(12, region.FarRadius); Assert.Equal(100, region.CenterX); Assert.Equal(100, region.CenterY); + // Radius (used by existing single-radius hysteresis math) must alias to + // FarRadius — the outer ring drives "everything currently loaded" bookkeeping. + // If a future change mistakenly aliases Radius to NearRadius, hysteresis + // becomes (NearRadius+2) for the far-tier unload, which is wrong. + Assert.Equal(region.FarRadius, region.Radius); } }