From 5462e08ac1256c30a2d1b0f07b4ca1a8b9995f2e Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 6 Jun 2026 22:13:24 -0400 Subject: [PATCH] docs(core): clarify turn rebuild promotion --- packages/core/src/session/runner/run-turn.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/session/runner/run-turn.ts b/packages/core/src/session/runner/run-turn.ts index 6a0c6c35b8f..ea35b2efb8b 100644 --- a/packages/core/src/session/runner/run-turn.ts +++ b/packages/core/src/session/runner/run-turn.ts @@ -96,8 +96,10 @@ export const make = Effect.gen(function* () { /** * Promotes admitted input and builds one coherent immutable request snapshot. * - * Rebuild transitions before promotion preserve the requested delivery; - * transitions after promotion clear it so queued input cannot be promoted twice. + * If initialization becomes stale before input is promoted, the rebuilt + * attempt must still perform that promotion. Once promotion has completed, + * later rebuilds read it from durable history instead of promoting again; + * repeating a queue promotion could open the next queued prompt too early. */ const prepareTurn = Effect.fn("SessionRunner.prepareTurn")(function* ( sessionID: SessionSchema.ID,