From db6ea5cb66f035d791c6399491b680f705b575d0 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sun, 20 Sep 2026 23:40:09 -0700 Subject: [PATCH] test(cross-version): register the turn-completion subscribe on the wire manifest The cross-version gate asserts the structured surface's method list by name and count, so an additive method has to be declared there deliberately. Adding the entry makes the suite call it in both skew directions and stubs the host side, which is the statement the gate exists to force. --- .../structured-agent-session-host-fixture.ts | 3 +++ .../structured-agent-session-surface-manifest.ts | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/tests/e2e/cross-version-wire/structured-agent-session-host-fixture.ts b/tests/e2e/cross-version-wire/structured-agent-session-host-fixture.ts index 6cf13ecff24..465899751a2 100644 --- a/tests/e2e/cross-version-wire/structured-agent-session-host-fixture.ts +++ b/tests/e2e/cross-version-wire/structured-agent-session-host-fixture.ts @@ -78,6 +78,9 @@ export function structuredHostStub( subscriber.emit({ type: 'snapshot', sessions: [] }) return () => undefined }), + // No opening emit, unlike the status feed above: a completion is an edge, so this stream + // opens empty and a subscriber that was away has missed what passed. + subscribeTurnCompletions: vi.fn(() => () => undefined), unsubscribe: vi.fn() } } diff --git a/tests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts b/tests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts index 0bb0b43f20f..97588ae0cfb 100644 --- a/tests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts +++ b/tests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts @@ -18,6 +18,7 @@ export const THREAD = '019fd532-7c11-7a90-b6de-4e1a2c3d5f60' export const NOW = 1_800_000_000_000 export const REWIND_METHOD = 'agentSession.rewind' export const STATUS_FEED_METHOD = 'agentSession.subscribeStatus' +export const TURN_COMPLETION_FEED_METHOD = 'agentSession.subscribeTurnCompletions' let operations = 0 @@ -147,6 +148,13 @@ export const STRUCTURED_CALLS: { hostMethod: 'subscribeStatus', result: { type: 'snapshot', sessions: [] } }, + // Opens with nothing for the same reason `agentSession.subscribe` does, and unlike the status + // feed above: a completion is an edge that has already passed, not state a late subscriber + // needs. Reaching the host is the only signal that the gate opened. + { + method: TURN_COMPLETION_FEED_METHOD, + hostMethod: 'subscribeTurnCompletions' + }, // Teardown runs through the runtime's subscription registry rather than the // host, so its reply is the only signal that the gate opened. { method: 'agentSession.unsubscribe', hostMethod: null, result: { unsubscribed: true } }