Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): one silent provider no longer stalls every thread #16790

Closedvoltcrash(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/16790/headopened View on GitHub

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

x
0 of 6 viewed, 6 left
203 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -2285,6 +2285,209 @@
}).pipe(Effect.scoped, Effect.provide(Layer.merge(IdAllocator.layer, NodeServices.layer))),
+ it.effect("stops a turn Codex starts after its turn/start was abandoned", () =>
+ Effect.gen(function* () {
+ const nativeThreadId = "abandoned-start-thread";
+ const nativeTurnId = "abandoned-start-turn";
+ const prompt = "Run a command.";
+ const preamble = codexReplayPreamble({ nativeThreadId, nativeTurnId, prompt });
+ const transcript = makeCodexReplayTranscript({
+ scenario: "abandoned-turn-start",
+ entries: [
+ // Codex never answers turn/start, then starts the turn anyway.
+ ...preamble.slice(0, -2),
+ {
+ type: "emit_inbound",
+ label: "turn/started",
+ afterMs: 1000,
+ frame: {
+ method: "turn/started",
+ params: {
+ threadId: nativeThreadId,
+ turn: makeCodexReplayTurn({ id: nativeTurnId, status: "inProgress" }),
+ },
+ },
+ },
+ {
+ type: "expect_outbound",
+ label: "turn/interrupt",