Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): parent is woken when a delegated child's background command run ends #21813

Closedkoushikxd(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/21813/headopened View on GitHub

Showing 2 changed files with 167 additions and 8 deletions.

x
0 of 2 viewed, 2 left
151 additions and 1 deletionapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -19,7 +19,9 @@
TurnItemId,
} from "@t3tools/contracts";
import * as DateTime from "effect/DateTime";
+import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
+import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
import * as Stream from "effect/Stream";
​
@@ -40,6 +42,7 @@
import * as Orchestrator from "./Orchestrator.ts";
import { continueRestartedRun } from "./RestartContinuation.ts";
import * as RuntimeLayer from "./runtimeLayer.ts";
+import * as ThreadCommandExecutor from "./ThreadCommandExecutor.ts";
import * as ProviderTurnStartServiceTestkit from "./ProviderTurnStartService.testkit.ts";
import type * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter";
import * as ProviderContinuationRequests from "@t3tools/provider-core/server/ProviderContinuationRequests";
@@ -1137,7 +1140,10 @@
return { taskId, childThreadId, childRunId };
-it.layer(Layer.merge(layerTest, ProviderContinuationRequests.layer))(
+// Shares the orchestrator's thread locks so a test can hold one.
+const layerFollowupTest = Layer.merge(layerTest, ThreadCommandExecutor.layer);
+​
+it.layer(Layer.merge(layerFollowupTest, ProviderContinuationRequests.layer))(
"subagent follow-ups",