Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): idle delegated tasks when recovery holds follow-ups #36529

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/36529/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 97 additions and 1 deletion.

x
0 of 2 viewed, 2 left
93 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -48,6 +48,7 @@
import { CodexProviderCapabilitiesV2 } from "./Adapters/CodexAdapterV2.ts";
import * as EventSink from "./EventSink.ts";
import * as Orchestrator from "./Orchestrator.ts";
+import * as ProviderRuntimeRecovery from "./ProviderRuntimeRecoveryService.ts";
import { continueRestartedRun } from "./RestartContinuation.ts";
import * as RuntimeLayer from "./runtimeLayer.ts";
import * as ThreadCommandExecutor from "./ThreadCommandExecutor.ts";
@@ -4856,6 +4857,98 @@
+ it.effect("holding a follow-up during runtime recovery makes its parent task idle", () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const sink = yield* EventSink.EventSinkV2;
+ const now = yield* DateTime.now;
+ const threadId = ThreadId.make("thread:held-followup-parent");
+ const projectId = ProjectId.make("project:held-followup");
+ const runId = RunId.make("run:held-followup-parent");
+ const rootNodeId = NodeId.make("node:held-followup-parent");
+ yield* seedParentWithTerminalTask({
+ threadId,
+ projectId,
+ runId,
+ rootNodeId,
+ taskId: NodeId.make("node:held-followup-seed"),
+ deliveryState: "delivered",
+ now,