fix(diag): bind stationary samples to route checkpoints

Free-running sleeps could label a sample as the old scene exactly when automation began the next teleport. Give every route stop an explicit post-input liveness dwell and post-checkpoint hold, then capture process and frame facts only after its named canonical barrier.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-24 12:54:57 +02:00
parent e797e7482a
commit 2c874b0977
4 changed files with 62 additions and 31 deletions

View file

@ -236,15 +236,24 @@ public sealed class ConnectedR6SoakContractTests
// records can masquerade as retained memory in the return gate.
// The script previously slept only 12s despite the comment already
// citing the 25s deadline.
string source = File.ReadAllText(Path.Combine(
string script = File.ReadAllText(Path.Combine(
FindRepoRoot(),
"tools",
"run-connected-r6-soak.ps1"));
string route = File.ReadAllText(Path.Combine(
FindRepoRoot(),
"tools",
"connected-r6-soak.route.txt"));
AssertAppearsInOrder(
source,
"LiveEntityLivenessController's authoritative absence deadline is 25",
"Start-Sleep -Seconds 26");
script,
"LiveEntityLivenessController's 25-second authoritative absence",
"$checkpointPattern =",
"Wait-ForLogPattern $process $stdoutLog $checkpointPattern",
"$stationaryProfiles = Get-FrameProfiles $stdoutLog",
"Capture-Sample $process $destination.Name 'stationary'");
Assert.Equal(9, CountOccurrences(route, "sleep 27000"));
Assert.Equal(9, CountOccurrences(route, "sleep 3000"));
}
[Fact]