Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): narrow delegated recovery reads to delivery records #29435

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

Showing 4 changed files with 194 additions and 14 deletions (loading 1).

x
0 of 4 viewed, 4 left
71 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -25,6 +25,7 @@
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
import * as Stream from "effect/Stream";
+import * as Tracer from "effect/Tracer";
​
import * as CheckpointStore from "../checkpointing/CheckpointStore.ts";
import * as ServerConfig from "../config.ts";
@@ -1346,6 +1347,76 @@
it.layer(Layer.merge(layerTest, ProviderContinuationRequests.layer))(
"subagent follow-ups",
(it) => {
+ it.effect("recovers a reserved delivery without loading conversation history", () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const sink = yield* EventSink.EventSinkV2;
+ const requests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
+ const now = yield* DateTime.now;
+ const threadId = ThreadId.make("thread:bounded-delivery-recovery");
+ const runId = RunId.make("run:bounded-delivery-recovery");
+ const taskId = NodeId.make("task:bounded-delivery-recovery");
+ yield* seedParentWithTerminalTask({
+ threadId,
+ runId,
+ taskId,
+ projectId: ProjectId.make("project:bounded-delivery-recovery"),
+ rootNodeId: NodeId.make("node:bounded-delivery-recovery"),
+ deliveryState: "claimed",
+ deliveryTaskIds: [taskId],