From c5d88b38f6542ece57141bcfe262b0f452bece78 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:18:00 -0700 Subject: [PATCH] fix(tests): type the escape-inference helper from the snapshot row The helper declared a hand-written structural shape for its baseline, but the snapshot payload's fields are optional, so TS2345 rejected every call site. --- ...rver-interrupt-inference-escape-navigation.test.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/agent-hooks/server-interrupt-inference-escape-navigation.test.ts b/src/main/agent-hooks/server-interrupt-inference-escape-navigation.test.ts index aa343969cf8..f594fadde18 100644 --- a/src/main/agent-hooks/server-interrupt-inference-escape-navigation.test.ts +++ b/src/main/agent-hooks/server-interrupt-inference-escape-navigation.test.ts @@ -52,14 +52,13 @@ function ingestWorking( return server.getStatusSnapshot()[0]! } +// Why: take the snapshot row type itself rather than a hand-written structural +// shape - the payload's fields are optional, so a narrower literal type does not +// accept it and typecheck fails (tests are excluded from the mobile tsconfig but +// not from this one). function inferEscape( server: AgentHookServer, - baseline: { - receivedAt: number - stateStartedAt: number - prompt: string - agentType: string | undefined - } + baseline: ReturnType[0] ) { return server.inferInterrupt({ paneKey: PANE,