From 0de6bc9c96798dd714bbfaa128436ddfb8250de2 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 10 May 2026 08:09:53 +0200 Subject: [PATCH] fix(A.5 T13-T16): canonical LB id in Tick_DrainingPromoted test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 19b4465's new ToPromote test pre-loaded an LB with a non- canonical id (low 16 bits 0x0FFF instead of 0xFFFF). The new canonicalization in AddEntitiesToExistingLandblock then key-missed and parked the entity in the pending bucket instead of merging — assertion failed. Use canonical id 0x3232FFFFu directly. The test now exercises the intended hot-path (merge into existing LB), not the cold pending-bucket fallback (which is exercised by GpuWorldStateTwoTierTests). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Streaming/StreamingControllerTwoTierTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/AcDream.Core.Tests/Streaming/StreamingControllerTwoTierTests.cs b/tests/AcDream.Core.Tests/Streaming/StreamingControllerTwoTierTests.cs index 4774ac2..2b86b6a 100644 --- a/tests/AcDream.Core.Tests/Streaming/StreamingControllerTwoTierTests.cs +++ b/tests/AcDream.Core.Tests/Streaming/StreamingControllerTwoTierTests.cs @@ -92,7 +92,9 @@ public class StreamingControllerTwoTierTests var state = new GpuWorldState(); // Pre-load a far-tier-style LB record (terrain only, no entities). - uint lbId = 0x32320FFFu; + // Id must be in canonical form (low 16 bits = 0xFFFF) since + // AddEntitiesToExistingLandblock canonicalizes incoming ids. + uint lbId = 0x3232FFFFu; var lb = new LoadedLandblock(lbId, Heightmap: null!, Entities: System.Array.Empty()); state.AddLandblock(lb); Assert.Empty(state.Entities);