Dashboard › opencode › Distillation
d30ad7ad-9de8-451b-81ba-13cc2308fe26["lore_tm_v1_ldahZHP8Sfpuc6vQB7VE0evBwvq1iSNvcyCi6ce8FlI","lore_tm_v1_ke8Qg4GKiEGaZchiq2DPE1-_ua9cvCeEORThVvbnha4","lore_tm_v1_yitZbROXc-YB4Kr1N59IJAmn4sB-a6hEaKv_VfcYvk8","lore_tm_v1_EDgLq3i3337ekHLln_I-yDbryB9fJOeSP1WdZ4on7Q8","lore_tm_v1_ieXfVlvtXEZKw9b6DR-jaifgAE72v9XEc7ve6s5LLi8","lore_tm_v1_HfuX_m8z3OO7CakBmaZxfyskUqzp9K_y9haPzIiQEsc","lore_tm_v1_jTEuWFoqu-SQxMQCWszDkKft1vcXj7hHW4TirSxjujs","lore_tm_v1_Df-v3cmt4POzPU_PnnKaM-7hlsBeO_Qol0cMM_4cexY","lore_tm_v1_hDH2D5jKAzNeIehZuEvSvg86QZhBJVIImdxpHGwV9F0","lore_tm_v1_gk2czhs_5QnGxwgoojxHtSDGLEqQr-safyUrXkbh550","lore_tm_v1_b4N-J9vwsB2FR6UTkPqdKASPP4-JZABpEiCB_adlVpc"]
Date: Sep 15, 2026
packages/core/test/session-prompt.test.ts:514-553, reusing messageID with a different prompt and resume: true must return Session.PromptConflictError, leave wake_pending: false, record 0 SessionEvent.PromptExecutionRequested events before and after projection replay, and produce no advisory wake during the retry or recovery.packages/core/test/session-prompt.test.ts:330-371, retrying the promoted messageID with resume: true must leave it at promoted_seq: 1 and wake_pending: false, leave a separate pending prompt at promoted_seq: null and wake_pending: false, and produce no wakeCalls.packages/core/src/session/input.ts:54-59 showed exact retries first pass equivalent(existing, input); non-equivalent retries die with SessionInput.LifecycleConflict before requestExecution(...) can run, while equivalent retries request execution only when input.requestExecution is true.SessionInput.requestExecution in packages/core/src/session/input.ts:103-152 validates both message existence and sessionID; it returns false when promoted_seq is non-null, returns true when wake_pending is already set, otherwise publishes SessionEvent.PromptExecutionRequested using deterministic event ID evt_prompt_execution_${input.id} and returns the result of executionPending(...).SessionInput.executionPending in packages/core/src/session/input.ts:154-170 defines pending execution as row.promotedSeq === null && row.wakePending; a missing row or mismatched sessionID dies with SessionInput.LifecycleConflict.packages/core/src/session.ts:360-386 resolves the prompt, defaults delivery to "steer", maps resume !== false to requestExecution, converts SessionInput.LifecycleConflict into PromptConflictError, independently rechecks SessionInput.equivalent(admission.admitted, expected), and invokes execution.wake(...) only when admission.shouldWake is true.packages/core/test/session-prompt.test.ts:310-327 requires an exact retry of an unpromoted committed prompt with resume: true to return the original recorded message and call advisory wake once with [sessionID].packages/core/test/session-prompt.test.ts:374-405 requires execution intent to be durable before advisory wake: a new executing prompt stores wake_pending: true and promoted_seq: null, calls wake once, preserves those values through replaySessionProjection(), and causes recover() to wake the session once.packages/core/test/session-prompt.test.ts:408-437 replays a version-1 PromptAdmitted event with no requestExecution; projection must treat it as admit-only, producing wake_pending: false, promoted_seq: null, and no recovery wake.packages/core/test/session-prompt.test.ts:440-486 starts with an admit-only prompt, submits two concurrent resume: true retries using concurrency: "unbounded", expects wake_pending: true, exactly 1 durable PromptExecutionRequested event, two immediate wake calls [sessionID, sessionID], stable state through two projection replays, and one wake from recovery.packages/core/test/session-prompt.test.ts includes: different prompt under the same ID β Session.PromptConflictError, no transcript messages, and admittedCount of 1 (:489-511); different delivery under the same ID β Session.PromptConflictError (:556-578); two concurrent exact admit-only retries β equal returned messages, no transcript messages, admittedCount of 1, and exactly 1 PromptAdmitted event (:581-598).packages/core/test/session-prompt.test.ts:601-622 runs two SessionInput.promoteSteers(...) calls with concurrency: "unbounded" and requires exactly 1 Prompted event, promotedSeq: 1, and one user transcript message { id: messageID, type: "user", text: "Promote once" }.SessionInput.projectPrompted in packages/core/src/session/input.ts:232-285 atomically sets promoted_seq and clears wake_pending; it validates projection equivalence, tolerates an already-identically-promoted row, inserts a missing historical row with both admitted_seq and promoted_seq set to the promoted sequence, and calls settleRecoveryWake(...).settleRecoveryWake in packages/core/src/session/input.ts:287-302 clears SessionRecoveryTable.wake_pending only where session_id, continuation_message_id, and current wake_pending: true all match.SessionInput.equivalent in packages/core/src/session/input.ts:325-348 requires identical delivery, sessionID, and JSON-serialized encoded prompt; projection matching additionally requires equal epoch-millisecond timeCreated.packages/core/src/session/input.ts is ordered and constrained: promoteSteers(...) selects unpromoted "steer" inputs with admitted_seq <= cutoff, ordered ascending; promoteNextQueued(...) selects the first unpromoted "queue" input by ascending admitted_seq; promoteExact(...) requires the exact unpromoted queued message or dies with Pending recovery input not found: ${messageID}.packages/core/src/event.ts:369-437 showed durable publication commits through commitDurableEvent(...); when newly committed it attaches { aggregateID, seq, version }, notifies listeners with isolation enabled, and returns the durable event. Listener failures for durable notifications are logged by observe(...) unless interrupted, while non-isolated notifications remain fail-fast.EventV2.publish(...) in packages/core/src/event.ts:419-437 uses options.id when supplied, otherwise ID.create(), carries optional metadata and location, and passes options.commit into publishEvent(...); local commit hooks on non-durable definitions die with InvalidDurableEventError and message "Local commit hooks require a durable event".