Dashboard › opencode › Distillation
869c24d8-efd4-424e-bc7f-54194f7d3d18["lore_tm_v1_dKJprZm75J6WWuoeSjBPs9h7I9n1i_h6f7tsRzlXrhA","lore_tm_v1_49yYdLQebelw044tSjp8orHKJ1dlMPjgM9dJVKEhOSs","lore_tm_v1_ybj_k85ko7TEN0UWdwnLhLMGmwkpAkzQhhf92PRrvFY","lore_tm_v1_E2BJj2h-KrVPYvAaWjcnHuXsAOLJg8o3wIOuB3BByEw","lore_tm_v1_77eRluIu3juGDOI8MTcLf1M8Kxl98tKdMbiud_xOkPk"]
Date: Sep 17, 2026
packages/core/src/session/input.ts:501-529 publishes each input row as SessionEvent.Prompted with sessionID, timestamp, messageID, decoded prompt, and delivery; optional commit(row) is passed as the event commit callback. A LifecycleConflict is tolerated only when find(db, id) shows stored?.promotedSeq !== undefined; otherwise the defect is rethrown.SessionInput.promoteSteers in packages/core/src/session/input.ts:531-564 selects unpromoted steer inputs for the session with admitted_seq <= cutoff, excludes rows already linked through SessionRecoveryTable.execution_id, orders by ascending SessionInputTable.admitted_seq, and publishes all selected rows.SessionInput.promoteNextQueued in packages/core/src/session/input.ts:566-592 selects the earliest unpromoted queue input not already linked to a recovery execution, ordered by ascending SessionInputTable.admitted_seq; it returns false when no row exists and otherwise publishes the row and returns true.SessionInput.promoteExact in packages/core/src/session/input.ts:594-648 requires an exact unpromoted queue row matching messageID and sessionID; absence dies with Pending recovery input not found: ${messageID}.SessionInput.promoteExact handles RecoveryConflict by running commit(row) in an immediate transaction and quarantining the recovery through SessionRecoveryTable.recovery_error = defect.reason, fenced by matching execution_id, wake_pending === true, and a null existing recovery_error. Failure to update the quarantine row dies with Recovery quarantine failed: ${defect.executionID}; non-RecoveryConflict defects are rethrown.packages/core/src/session/projector.ts:501-537 handles a revert boundary by finding the boundary message’s seq, dying with Revert boundary message not found: ${event.data.messageID} if absent, deleting later SessionMessageTable rows where seq > boundary.seq, and deleting SessionInputTable rows where either admitted_seq > boundary.seq or promoted_seq > boundary.seq.packages/core/src/session/projector.ts:531-536 clears SessionTable.revert to null and sets time_updated from event.data.timestamp.packages/core/src/session/projector.ts:542 exports node = makeGlobalNode({ name: "session-projector", layer, deps: [EventV2.node, Database.node] }).