From 65f11099fe3322ca013de5dfa6f42ab82e33eed3 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Thu, 30 Jul 2026 23:44:12 +0200 Subject: [PATCH] fix(orchestration): promoted queued messages keep the queued_turn intent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The turn item materialized when a queued run is promoted was emitted with inputIntent "turn_start", but the deterministic replay driver (and the recorded queued_turn fixtures) expect "queued_turn" — the mismatch stalled replay before the queued run could start, leaving run 1 waiting and run 2 queued forever in all five queued_turn fixtures. Co-Authored-By: Claude Fable 5 --- apps/server/src/orchestration-v2/Orchestrator.ts | 2 +- apps/server/src/orchestration-v2/runtimeLayer.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 14c0041d4b..5fad0cfc07 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -773,7 +773,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio createdBy: queuedMessage.createdBy, creationSource: queuedMessage.creationSource, }), - inputIntent: "turn_start", + inputIntent: "queued_turn", startedAt: now, completedAt: now, updatedAt: now, diff --git a/apps/server/src/orchestration-v2/runtimeLayer.test.ts b/apps/server/src/orchestration-v2/runtimeLayer.test.ts index a23f325888..896c40275f 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.test.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.test.ts @@ -962,7 +962,7 @@ it.layer(TestLayer)("OrchestrationV2LayerLive lifecycle", (it) => { if (promotedMessageItem.type !== "user_message") { assert.fail("promoted queue item must be a user message"); } - assert.equal(promotedMessageItem.inputIntent, "turn_start"); + assert.equal(promotedMessageItem.inputIntent, "queued_turn"); assert.isTrue( promotedMessageItem.startedAt !== null && DateTime.toEpochMillis(promotedMessageItem.startedAt) >=