Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): recover Codex sessions after signal exits #10874

Closedkhaneliman(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/10874/headopened View on GitHub

Showing 2 changed files with 220 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
220 additions and 1 deletionapps/server/src/provider/Layers/CodexCollabRuntime.integration.test.tsModified
View file
@@ -17,13 +17,16 @@
import { type ProviderApprovalDecision, type ProviderEvent, ThreadId } from "@t3tools/contracts";
import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
+import * as Exit from "effect/Exit";
import * as Fiber from "effect/Fiber";
+import * as Ref from "effect/Ref";
import * as Schema from "effect/Schema";
+import * as Scope from "effect/Scope";
import * as Stream from "effect/Stream";
import { assert, describe } from "vite-plus/test";
​
import wireFixture from "../testFixtures/codexMultiAgentWire.json" with { type: "json" };
-import { makeCodexSessionRuntime } from "./CodexSessionRuntime.ts";
+import { CodexResumeCursorSchema, makeCodexSessionRuntime } from "./CodexSessionRuntime.ts";
import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
​
const ROOT = wireFixture.rootThreadId;
@@ -37,6 +40,46 @@
}),
),
);
+const decodeResumeCursor = Schema.decodeUnknownEffect(CodexResumeCursorSchema);
+const decodeResumeRequest = Schema.decodeUnknownEffect(
+ Schema.fromJsonString(
+ Schema.Struct({
+ params: Schema.Struct({ threadId: Schema.String, excludeTurns: Schema.Boolean }),
+ }),
+ ),