From 0de396197b6c414dad824c3b0fce4bb3bdd78782 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 26 Sep 2026 17:22:13 +0200 Subject: [PATCH] test(performance): validate the journey gate after the probe completes Codex follow-up on #1698: the gate state returned by release() cannot see a reload or recovery navigation that happens before the first card. Re-read the live state once the renderer probe has finished and validate that instead, so an iteration spanning an extra navigation is rejected. Co-Authored-By: Claude Fable 5.1 --- .../src/journeys/launch-journey-app.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/electron-backend-e2e/src/journeys/launch-journey-app.ts b/apps/electron-backend-e2e/src/journeys/launch-journey-app.ts index b3cdf762c..93eb52f1e 100644 --- a/apps/electron-backend-e2e/src/journeys/launch-journey-app.ts +++ b/apps/electron-backend-e2e/src/journeys/launch-journey-app.ts @@ -152,7 +152,7 @@ export async function measureLaunchJourney( sentinelMethod: probeOptions.sentinelMethod, stateKey: JOURNEY_MAIN_IPC_STATE_KEY, }); - const gate = await readJourneyRendererGate( + await readJourneyRendererGate( electronApp, JOURNEY_RENDERER_GATE_KEY, 'release' @@ -172,7 +172,17 @@ export async function measureLaunchJourney( probeOptions.stateKey, timeoutMs ); - assertJourneyRendererGate(gate, renderer.installed.epochMs); + // Re-read after the probe finished: a reload or recovery + // navigation during startup shows up as a pass-through load + // only in the live state, and such an iteration is invalid. + const gate = assertJourneyRendererGate( + await readJourneyRendererGate( + electronApp, + JOURNEY_RENDERER_GATE_KEY, + 'read' + ), + renderer.installed.epochMs + ); const ipc = await readJourneyMainIpcCapture( electronApp, JOURNEY_MAIN_IPC_STATE_KEY,