Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): app-server stdout keeps draining while notification handlers wait #28711

Closedjuliusmarmingewants to merge 9 commits intomain fromrefs/pull/28711/headopened View on GitHub

Showing 3 changed files with 91 additions and 33 deletions.

x
0 of 3 viewed, 3 left
9 additions and 4 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -4764,15 +4764,20 @@
+ // Holding item/completed in its handler means the earlier delta was already handled
+ // and its flush timer started, so one clock step shows the streaming update.
+ let completedCount = 0;
const harness = yield* makeCodexReplayHarness(
transcript,
undefined,
undefined,
undefined,
- (entry) => {
- const gate = streamed
- ? gates.find((gate) => entry.label === `item/completed/${gate.id}`)
- : undefined;
+ undefined,
+ undefined,
+ undefined,
+ (method) => {
+ const gate =
+ streamed && method === "item/completed" ? gates[completedCount++] : undefined;
return gate === undefined
? Effect.void
: Deferred.succeed(gate.ready, undefined).pipe(
53 additions and 0 deletionspackages/effect-codex-app-server/src/protocol.test.tsModified
View file
@@ -464,6 +464,59 @@