test: tie the soak's move-truth grep to a live emitter — both ends now break together
The r6 soak hard-fails without 'move-truth OUT' lines, yet the only automated guard was a text assertion that the SCRIPT sets the env var — it stayed green while #435 part 2 deleted the emitter, and the breakage would have surfaced as a misleading connected-gate failure. The new contract test asserts all four links of the chain in one place: the script greps the pattern, MovementTruthDiagnosticController still emits it, RuntimeOptions still parses the flag, and GameWindow still wires it through. Deleting any link fails here, at build time, with the reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
35454a9f58
commit
1360b71684
1 changed files with 37 additions and 0 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue