From c6bc2bf7ebfefba57694f3411673af2079fe4a8c Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 9 Aug 2026 20:00:42 +0200 Subject: [PATCH 1/2] =?UTF-8?q?test(streaming):=20fix=20#351=20=E2=80=94?= =?UTF-8?q?=20the=20Debug-only=20FarLoad=20strip-test=20failure=20was=20th?= =?UTF-8?q?e=20deliberate=20near-payload=20Debug.Assert,=20not=20a=20flake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test feeds a far-tier factory returning Near payload on purpose to prove the strip safety net. LandblockStreamer.HandleJob is documented "fail loud in Debug builds and strip in Release": the Debug.Assert fires on exactly that input, the VSTest host translates it into a thrown DebugAssertException, and the worker catch folds it into a Failed completion — deterministic on every Debug run since the test and the tripwire landed in the same commit (090b0354). Release compiles the assert out ([Conditional("DEBUG")]), so the strip runs and the test passed there, which is why the Release gate never saw it. 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 Debug AND Release. Co-Authored-By: Claude Fable 5 --- .../Streaming/LandblockBuildOriginTests.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs b/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs index 1de0a773..678a5452 100644 --- a/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs +++ b/tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs @@ -221,6 +221,21 @@ public sealed class LandblockBuildOriginTests origin)); streamer.Start(); +#if DEBUG + // 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); +#else var loaded = Assert.IsType( await DrainFirstAsync(streamer)); @@ -229,6 +244,7 @@ public sealed class LandblockBuildOriginTests Assert.Same(PhysicsDatBundle.Empty, loaded.Landblock.PhysicsDats); Assert.Null(loaded.Build.EnvCells); Assert.Equal(origin, loaded.Build.Origin); +#endif } [Fact] From 852cdda784752dc6b37ff6a23930e2ca1647d254 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 9 Aug 2026 20:01:04 +0200 Subject: [PATCH 2/2] =?UTF-8?q?docs(issues):=20close=20#351=20with=20the?= =?UTF-8?q?=20verified=20root=20cause=20=E2=80=94=20deterministic=20Debug.?= =?UTF-8?q?Assert=20translation,=20not=20a=20flake=20(fixed=20in=20c6bc2bf?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- docs/ISSUES.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/ISSUES.md b/docs/ISSUES.md index 0b16933b..37b08e99 100644 --- a/docs/ISSUES.md +++ b/docs/ISSUES.md @@ -117,11 +117,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