Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): notify parents after delegated background runs #23542

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/23542/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 153 additions and 12 deletions.

x
0 of 2 viewed, 2 left
132 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -1404,6 +1404,138 @@
+ it.effect("delivers the run a background command's wake 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:background-wake-parent");
+ const projectId = ProjectId.make("project:background-wake");
+ const parentRunId = RunId.make("run:background-wake-parent");
+ const rootNodeId = NodeId.make("node:background-wake-parent");
+ yield* seedParentWithTerminalTask({
+ threadId: parentThreadId,
+ projectId,
+ runId: parentRunId,
+ rootNodeId,
+ taskId: NodeId.make("node:background-wake-seed"),
+ deliveryState: "acknowledged",
+ now,
+ });
+ const child = yield* seedRestartCancelledChild({
+ parentThreadId,
+ projectId,
+ parentRunId,
+ rootNodeId,
+ name: "background-wake-child",
+ completionWake: "always",