Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(orchestrator): report terminal runs after wait timeout #11574

Mergedsaphid(GitHub profile, opens in a new tab)merged 1 commit intot3code/codex-turn-mapping fromrefs/pull/11574/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 85 additions and 1 deletion.

x
0 of 2 viewed, 2 left
81 additions and 0 deletionsapps/server/src/orchestration-v2/ThreadManagementService.test.tsModified
View file
@@ -4,14 +4,19 @@
MessageId,
NodeId,
type OrchestrationV2Command,
+ type OrchestrationV2Run,
type OrchestrationV2ThreadProjection,
ProjectId,
ProviderInstanceId,
RunId,
ThreadId,
} from "@t3tools/contracts";
+import * as Deferred from "effect/Deferred";
+import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
+import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
+import * as TestClock from "effect/testing/TestClock";
​
import { LegacyV1ThreadImporter, LegacyV1ThreadImportError } from "./LegacyV1ThreadImporter.ts";
import { OrchestratorProjectionError, OrchestratorV2 } from "./Orchestrator.ts";
@@ -348,3 +353,79 @@
expect(error).toMatchObject({ threadId, cause: importError });
}).pipe(Effect.provide(testLayer));
});
+​
+for (const scenario of [
+ { finalStatus: "completed" as const, timedOut: false },
+ { finalStatus: "failed" as const, timedOut: false },
+ { finalStatus: "cancelled" as const, timedOut: false },