Dashboard › opencode › Distillation
ee8df776-f0a9-4416-8c4b-8c6005744ac4["lore_tm_v1_5Yumgw8D_5GmfF20Q4Wktb9d4BmujulBnryysyADvFs","lore_tm_v1_1Ex8lHD6jeOax1hHGuKFJtFaBZnLMN742Q7AElV7T1A","lore_tm_v1_U3EVXJO7BGm_4INdHU2HLsnOfytvHr-UX5xbij02t0A","lore_tm_v1_qsw5y1mud7pkScKo5uNGeHbHO9tje7c90qX4rYlW_KM","lore_tm_v1_7irsjnBy4Lo4kXK6vjQ-Q2NSt-3SZGCrfZE3lhKCmg8","lore_tm_v1_v356WjQFGfMkYaHJmEjxDnP9HDmiv_S8dEZhsP2aEmk","lore_tm_v1_3KYzCe7G-v_VIPZDNij64S9n4Vzl0qohl5JiB9oJeuE","lore_tm_v1_AtkSvybIBnqPuQvZj3gS4Nhn7nObDZwBkT8ADgNEQ7w","lore_tm_v1_mOYE0sEFIOBqfR8KuP3WdS1KumJ1ZhZrXaPQJyOCV6g","lore_tm_v1_VKmn5PTx6VnETxF052klWMKvzDpz4T1Cm_9MZTLdgEU","lore_tm_v1_2VrG49zuaj_Anm3k3Hv3ocBkbBBrcpzGKMNbEeinKF0","lore_tm_v1_zUi1as8WTECqxFMduLMNI2s79l81mIEDLUSBf_y0Zmc","lore_tm_v1_DomessfrMC8Xv0bxiidYVTLz6SgCsRfpeqh1g0oPvU0","lore_tm_v1_zUlCSIS-3JEqshExpGWgkqEYSqUa-wz3XTO_NHdd-xs","lore_tm_v1_hwFEjEiEyj3PfDldUr5k57ONI9-iNyl1dBFuUIZiNN4","lore_tm_v1_0SwI8GWG3YUt2cHCuIxaiyim0uf-mIfOrXeSLe9kZ7A","lore_tm_v1_kZ3QRV7PiZHqMdjROm69yVMI4taYWCI8UwBFB-zABCU"]
Date: Sep 15, 2026
/home/byk/Code/opencode and fix the parent-audit liveness gap: when an ordinary prompt wake coalesces with a pending recovery wake, SessionRunner promotes only the exact synthetic recovery continuation and can consume the sole advisory wake, stranding the normal prompt; ordinary prompts also need crash-safe redrive without waking resume:false inputs.wake_pending boolean to the session_input projected read model/schema, defaulting to false for replay and backward compatibility.SessionInput.admit with an execution-request/resume boolean owned at the admission boundary; a new admission requesting resume must atomically set wake_pending=true through the same PromptAdmitted EventV2 transaction commit, without changing the durable event schema solely for this flag.session_input.wake_pending=true before advisory wake is invoked.Session.prompt to pass input.resume !== false into SessionInput.admit, then invoke advisory wake only after durable wake intent exists.session_input.wake_pending when the exact row is promoted, while keeping all Prompted paths and replay/projector lifecycle behavior consistent.SessionRecovery.recover first wake exact session_recovery.wake_pending rows, then use a deterministic bounded query over only session_input.wake_pending=true AND promoted_seq IS NULL, waking distinct Sessions.packages/core/src/database/migration/20260914170650_session-recovery.ts and generated schema artifacts consistently; because session_input predates the feature, the migration must add wake_pending compatibly as NOT NULL DEFAULT false, with no event-replay break, followed by migration check.resume:false never sets durable wake and startup does not wake it; 2. normal resume sets durable wake before advisory delivery and restart redrives it; 3. exact retry with true can promote a prior false intent without permitting conflicts; 4. promotion clears intent atomically; 5. recovery plus normal wake in the same Session schedules recovery first and then the normal successor, while recovery drain promotes only continue.--printConsoleTrace, bun typecheck from packages/core, and migration check; the full Core suite should not run unless needed.packages/core.SessionInput.admit in packages/core/src/session/input.ts:41; its existing exact-retry path at lines 51-52 returns find(db, input.id) immediately, while a new admission publishes SessionEvent.PromptAdmitted without a commit callback.Session.prompt in packages/core/src/session.ts:360-386; it calls SessionInput.admit at line 368 and currently calls execution.wake(admitted.sessionID) at line 382 when input.resume !== false.SessionInput.projectAdmitted inserts session_input rows in packages/core/src/session/input.ts:83-116, and SessionInput.projectPrompted currently updates only { promoted_seq: input.promotedSeq } at lines 118-168.packages/core/src/session/input.ts: promoteSteers at lines 250-272, promoteNextQueued at lines 274-295, and promoteExact at lines 297-319; all publish SessionEvent.Prompted through the shared publish helper at lines 216-248.SessionInputTable in packages/core/src/session/sql.ts:141-167 currently has id, session_id, prompt, delivery, admitted_seq, promoted_seq, and time_created, but no wake_pending column.SessionRecoveryTable.wake_pending already exists in packages/core/src/session/sql.ts:185 as integer({ mode: "boolean" }).notNull().default(true).packages/core/src/database/migration/20260914170650_session-recovery.ts currently creates session_execution and session_recovery, with session_recovery.wake_pending integer DEFAULT true NOT NULL, but does not alter session_input.packages/core/src/session/projector.ts: SessionEvent.Prompted calls SessionInput.projectPrompted at lines 357-369, and SessionEvent.PromptAdmitted calls SessionInput.projectAdmitted at lines 371-382.EventV2.PublishOptions.commit in packages/core/src/event.ts:118-124 is a local operational projection committed atomically with a new durable event and is not replayed or serialized; event publication invokes the commit callback at packages/core/src/event.ts:323.packages/core/test/session-prompt.test.ts:272-290 verifies an exact retry changing from resume:false to resume:true invokes advisory wake, but does not yet verify durable wake_pending state before that wake.