diff --git a/tests/AcDream.App.Tests/Diagnostics/ConnectedWorldSoakRouteContractTests.cs b/tests/AcDream.App.Tests/Diagnostics/ConnectedWorldSoakRouteContractTests.cs index 76282efb..b6faeaf0 100644 --- a/tests/AcDream.App.Tests/Diagnostics/ConnectedWorldSoakRouteContractTests.cs +++ b/tests/AcDream.App.Tests/Diagnostics/ConnectedWorldSoakRouteContractTests.cs @@ -441,6 +441,43 @@ public sealed class ConnectedWorldSoakRouteContractTests Assert.Contains("$env:ACDREAM_DUMP_MOVE_TRUTH = '1'", source, StringComparison.Ordinal); } + [Fact] + public void MoveTruthGrepPatternIsBackedByALiveEmitter() + { + // #435/#437: the soak HARD-FAILS every destination when fewer than + // two fresh 'move-truth OUT' lines appear, and this env-var text + // assertion alone stayed green while the emitter was deleted — the + // script kept setting a flag nothing read. Tie BOTH ends together: + // the script must grep the pattern, and the client must still + // contain a reachable emitter producing it, gated on the option the + // script sets. Deleting either side now fails here instead of + // failing the next connected soak with a misleading message. + string script = File.ReadAllText(Path.Combine( + FindRepoRoot(), + "tools", + "run-connected-r6-soak.ps1")); + Assert.Contains("'move-truth OUT'", script, StringComparison.Ordinal); + + string emitter = File.ReadAllText(Path.Combine( + FindRepoRoot(), + "src", "AcDream.App", "Input", + "MovementTruthDiagnosticController.cs")); + Assert.Contains("move-truth OUT", emitter, StringComparison.Ordinal); + + string options = File.ReadAllText(Path.Combine( + FindRepoRoot(), "src", "AcDream.App", "RuntimeOptions.cs")); + Assert.Contains( + @"env(""ACDREAM_DUMP_MOVE_TRUTH"")", + options, + StringComparison.Ordinal); + string window = File.ReadAllText(Path.Combine( + FindRepoRoot(), "src", "AcDream.App", "Rendering", "GameWindow.cs")); + Assert.Contains( + "options.DumpMoveTruth", + window, + StringComparison.Ordinal); + } + [Fact] public void BaselineIdentityComesFromTheMeasuredBinaryRatherThanOnlyTheCheckout() {