Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): restart continuations retry failed starts and respect a parent's stop #27222

Mergedjuliusmarmingemerged 1 commit intorestart-continuation-fixes/1-held-queues fromrefs/pull/27222/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 153 additions and 3 deletions (loading 3).

x
0 of 6 viewed, 6 left
59 additions and 0 deletionsapps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.tsModified
View file
@@ -2448,6 +2448,65 @@
const task = settled.subagents.find((row) => row.id === child.taskId);
assert.equal(task?.status, "cancelled");
assert.equal(task?.completionDelivery?.state, "claimed");
+​
+ // The parent's Stop committed, but the restart cut the effect that stops its children.
+ const stoppedChild = yield* seedRestartCancelledChild({
+ parentThreadId: threadId,
+ projectId,
+ parentRunId: runId,
+ rootNodeId,
+ name: "restart-parent-stopped-child",
+ completionWake: "always",
+ continuationPending: true,
+ now,
+ });
+ yield* (yield* EventSink.EventSinkV2).write({
+ commandId: CommandId.make("command:restart-declined-parent:stop"),
+ events: [
+ {
+ id: EventId.make("event:restart-declined-parent:interrupt-request"),
+ type: "turn-item.updated",
+ threadId,
+ runId,
+ nodeId: rootNodeId,
+ providerInstanceId: modelSelection.instanceId,
+ occurredAt: now,
+ payload: {
+ id: TurnItemId.make("turn-item:restart-declined-parent:interrupt-request"),
+ type: "run_interrupt_request",