Merge branch 'main' into claude/latest-commits-cb0c8f

# Conflicts:
#	tests/AcDream.App.Tests/Streaming/LandblockBuildOriginTests.cs
This commit is contained in:
Erik 2026-08-14 12:52:34 +02:00
commit 1528e5693b
2 changed files with 33 additions and 19 deletions

View file

@ -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<LandblockStreamResult.Failed>(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<LandblockStreamResult.Failed>(
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<LandblockStreamResult.Loaded>(result);
var loaded = Assert.IsType<LandblockStreamResult.Loaded>(
await DrainFirstAsync(streamer));
Assert.Equal(LandblockStreamTier.Far, loaded.Tier);
Assert.Empty(loaded.Landblock.Entities);