Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(orchestrator): surface provider turn interrupt failures in the thread #4621

Closedm-de-graaff(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/4621/headopened View on GitHub

Showing 2 changed files with 85 additions and 2 deletions.

x
0 of 2 viewed, 2 left
69 additions and 1 deletionapps/server/src/orchestration/Layers/ProviderCommandReactor.test.tsModified
View file
@@ -231,7 +231,7 @@
turnId: asTurnId("turn-1"),
}),
- const interruptTurn = vi.fn((_: unknown) => Effect.void);
+ const interruptTurn = vi.fn<ProviderServiceShape["interruptTurn"]>(() => Effect.void);
const respondToRequest = vi.fn<ProviderServiceShape["respondToRequest"]>(() => Effect.void);
const respondToUserInput = vi.fn<ProviderServiceShape["respondToUserInput"]>(() => Effect.void);
const stopSession = vi.fn((input: unknown) =>
@@ -1758,6 +1758,74 @@
+ effectIt.effect(
+ "appends an interrupt failure activity when the provider rejects the interrupt",
+ () =>
+ Effect.gen(function* () {
+ const harness = yield* Effect.promise(() => createHarness());
+ const now = "2026-01-01T00:00:00.000Z";
+ harness.interruptTurn.mockImplementation(() =>
+ Effect.fail(
+ new ProviderAdapterRequestError({
+ provider: "codex",
+ method: "turn/interrupt",
+ detail: "expected active turn id turn-2 but found turn-1",
+ }),
+ ),
+ );
+​