diff --git a/docs/ISSUES.md b/docs/ISSUES.md index d60bfa77..c312a54e 100644 --- a/docs/ISSUES.md +++ b/docs/ISSUES.md @@ -1750,11 +1750,25 @@ session; the live gate covered the behavior. ## #351 — LandblockBuildOriginTests.FarLoad_StripsEnvCellsAndPhysics flake (Debug, load-sensitive) -**Status:** OPEN (filed 2026-08-08). Seen three times today in Debug runs -under parallel-agent load (5.4 implementer, Slice 6 corrections, dropdown -polish), each time proven pre-existing by re-running against the pristine -base commit; never reproduces in clean-room Release. An async streaming -timing assumption most likely; deflake when it next blocks a verdict. +**Status:** CLOSED 2026-08-09 (`c6bc2bf7`). NOT a flake and NOT timing — +the "load-sensitive" framing was wrong: it failed deterministically on +EVERY Debug `dotnet test` run since the test landed (`090b0354` +introduced the test and the tripwire in the same commit; the +parallel-agent-load correlation was just that Debug runs are rare — the +gate config is Release). Mechanism: the test feeds a far-tier factory +returning Near payload on purpose to prove the strip safety net, but +`LandblockStreamer.HandleJob` is documented "fail loud in Debug builds +and strip in Release" — its `Debug.Assert` fires on exactly that input, +the VSTest host translates the assert into a thrown +`DebugAssertException` (its message says so verbatim) instead of killing +the testhost, and the worker catch folds it into a `Failed` completion, +so `Assert.IsType` fails. Release compiles the assert out +(`[Conditional("DEBUG")]`) and strips — hence "never reproduces in +clean-room Release". Fix: the test now pins BOTH halves of the +config-divergent contract via `#if DEBUG` (Debug expects the loud +`Failed` carrying the assert text; Release keeps the strip assertions). +Production code unchanged; LandblockBuildOriginTests 11/11 in both +configs. ## #350 — Render-shadow ledger overflow after 2h42m: lifetime int counters in a never-reset accumulator diff --git a/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs b/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs index 9abb646a..678a5452 100644 --- a/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs +++ b/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs @@ -221,23 +221,23 @@ public sealed class LandblockBuildOriginTests origin)); streamer.Start(); - LandblockStreamResult result = await DrainFirstAsync(streamer); - #if DEBUG - // LandblockStreamer.HandleJob's near-payload check is "fail loud in - // Debug builds and strip in Release" (its own comment): the - // Debug.Assert fires on this deliberately-buggy factory, the test - // host's trace listener turns it into an exception, and the job's - // catch-all publishes it as Failed. That IS the designed Debug - // outcome — this test previously asserted the Release strip - // unconditionally and so failed on every full Debug run - // (found 2026-08-13; the campaign gates all run Release). - var failed = Assert.IsType(result); - Assert.Equal(landblockId, failed.LandblockId); + // The near-payload tripwire is config-divergent by design ("fail loud + // in Debug builds and strip in Release" — LandblockStreamer.HandleJob): + // in Debug the Debug.Assert fires and the VSTest host translates it + // into a thrown DebugAssertException, which the worker's catch folds + // into a Failed completion (#351). + var failed = Assert.IsType( + await DrainFirstAsync(streamer)); + + Assert.Contains( + "Far-tier factory returned Near payload", + failed.Error, + StringComparison.Ordinal); Assert.Equal(84ul, failed.Generation); - Assert.Contains("Far-tier factory returned Near payload", failed.Error); #else - var loaded = Assert.IsType(result); + var loaded = Assert.IsType( + await DrainFirstAsync(streamer)); Assert.Equal(LandblockStreamTier.Far, loaded.Tier); Assert.Empty(loaded.Landblock.Entities);