Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a turn that fails to start after its session opens now fails the run #14183

Mergedjuliusmarmingemerged 2 commits intot3code/codex-turn-mapping fromrefs/pull/14183/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 181 additions and 24 deletions (loading 1).

x
0 of 2 viewed, 2 left
181 additions and 24 deletionsapps/server/src/orchestration-v2/ProviderTurnStartService.test.tsModified
View file
@@ -31,6 +31,7 @@
import * as EventSink from "./EventSink.ts";
import * as IdAllocator from "./IdAllocator.ts";
import * as ProjectionStore from "./ProjectionStore.ts";
+import { ProviderAdapterEventStreamError } from "./ProviderAdapter.ts";
import * as ProviderSessionManager from "./ProviderSessionManager.ts";
import * as ProviderTurnStart from "./ProviderTurnStartService.ts";
import * as RunExecutionService from "./RunExecutionService.ts";
@@ -155,6 +156,13 @@
readonly previousMessages?: ReadonlyArray<string>;
readonly logoutFailure?: string;
readonly openFailure?: unknown;
+ /** Opens the session, then fails loading its provider thread. */
+ readonly ensureThreadFailure?: unknown;
+ /**
+ * Resumes a thread that has a native ref: resume fails, the fresh-thread
+ * fallback succeeds, then reading history for its handoff fails.
+ */
+ readonly historyReadFailureAfterFallback?: unknown;
readonly interruptOpen?: boolean;
readonly interruptRunBeforeOpenFailure?: boolean;
readonly writeFailure?: unknown;
@@ -329,34 +337,79 @@
checkpoints: [],
updatedAt: now,
+ if ("historyReadFailureAfterFallback" in input) {
+ const nativeThreadRef = {