Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): retire unresponsive shared Codex app-servers #25123

Mergedjuliusmarmingemerged 15 commits intomain fromrefs/pull/25123/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 174 additions and 0 deletions (loading 5).

x
0 of 6 viewed, 6 left
174 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -1235,6 +1235,7 @@
runtimePolicy: CODEX_TEST_RUNTIME_POLICY,
initializeRequests: () => initializeRequests,
+ runtime,
events: runtime.events,
@@ -1531,6 +1532,179 @@
+​
+ // The no-op notification lands right after the request is written, so the
+ // test advances the clock only once the app-server is known to be silent.
+ const requestWritten: CodexReplay.CodexAppServerReplayEntry = {
+ type: "emit_inbound",
+ label: "request-written",
+ frame: { method: "t3/test/requestWritten", params: {} },
+ };
+ const awaitRequestWritten =
+ (written: Deferred.Deferred<void>) =>
+ (
+ entry: Parameters<
+ NonNullable<CodexReplay.CodexAppServerReplayDriver["beforeEmitInbound"]>
+ >[0],
+ ) =>
+ entry.label === "request-written" ? Deferred.succeed(written, undefined) : Effect.void;
+ const UNANSWERED_REQUEST_BUDGET = "5 minutes";