Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): parent hears when a grandchild's completion wakes its delegated child #28462

Closedjuliusmarmingewants to merge 6 commits intomain fromrefs/pull/28462/headopened View on GitHub

Showing 2 changed files with 154 additions and 1 deletion.

x
0 of 2 viewed, 2 left
152 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -3871,6 +3871,158 @@
+ it.effect(
+ "delivers the run a nested subagent's completion starts after the original result",
+ () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const eventSink = yield* EventSink.EventSinkV2;
+ const requests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
+ const now = yield* DateTime.now;
+ const parentThreadId = ThreadId.make("thread:nested-wake-parent");
+ const projectId = ProjectId.make("project:nested-wake");
+ const parentRunId = RunId.make("run:nested-wake-parent");
+ const rootNodeId = NodeId.make("node:nested-wake-parent");
+ yield* seedParentWithTerminalTask({
+ threadId: parentThreadId,
+ projectId,
+ runId: parentRunId,
+ rootNodeId,
+ taskId: NodeId.make("node:nested-wake-seed"),
+ deliveryState: "acknowledged",
+ now,
+ });
+ const child = yield* seedRestartCancelledChild({
+ parentThreadId,
+ projectId,
+ parentRunId,
+ rootNodeId,