Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): drain queued native child continuations #21461

Mergedjuliusmarmingemerged 27 commits intomain fromrefs/pull/21461/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 191 additions and 2 deletions.

x
0 of 2 viewed, 2 left
177 additions and 1 deletionapps/server/src/orchestration-v2/RunExecutionService.test.tsModified
View file
@@ -1924,6 +1924,89 @@
+it.effect("drains queued child output after the root loses provider-thread ownership", () =>
+ Effect.gen(function* () {
+ const childEvents: Array<string> = [];
+ yield* runBackgroundItemScenario(
+ "queued-child-output",
+ (ids) => {
+ const childProviderThreadId = ProviderThreadId.make(
+ "provider-thread:queued-child-output:child",
+ );
+ const snapshot = (child: boolean, pendingBackgroundWork: boolean) => ({
+ type: "provider_thread.updated" as const,
+ driver,
+ providerThread: {
+ id: child ? childProviderThreadId : ids.providerThreadId,
+ driver,
+ providerInstanceId: ProviderInstanceId.make("codex"),
+ providerSessionId: null,
+ appThreadId: child ? ids.childThreadId : ids.threadId,
+ ownerNodeId: null,
+ nativeThreadRef: null,
+ nativeConversationHeadRef: null,
+ status: "idle",
+ firstRunOrdinal: 1,
+ lastRunOrdinal: 1,
+ handoffIds: [],
+ forkedFrom: null,