Dashboard › opencode › Distillation
d748b3c4-b394-4b2d-a635-0bbacb5b32e4["lore_tm_v1_odr2TrMCIgnY2hJoavO_P6F4RzuQ-lATld-IhtBvDhY","lore_tm_v1_XNkkjQ_pADHbwrmVsCuhZuSw3j-cyjZelE0mCZhIc24","lore_tm_v1_YptZljFMLGdzLSvTSULYgU12po5Rk6KwFSgkHb_m8KE","lore_tm_v1_2iybKVqm4u1l499gprO-P166YsFBiQTcDTQaI8E1JnQ","lore_tm_v1_sqJRrAFZTJAf7mvaXfKpeqwvlsV-qBJ8uB0lUjD8mJ4","lore_tm_v1_o9s5cl0276s3WCWswi9T-fUEviTITormCa725nNvjsw","lore_tm_v1_EFBi5xSXbzR6aCd2CmcuB7kiKtNp30BeczH8tisLY_g","lore_tm_v1_BaJHvpdkIV0ZNeFJWxYisYEvke2VEAdHpLvOiREAGRw","lore_tm_v1_2KpQmdPCkX6jyM1dDU7bgquYaFFOF0UUd253mywvB2Q","lore_tm_v1_kQK2OmNXizsnP-uoZeu_eX3o0j7qHT8wHm5sSB1Xrx0","lore_tm_v1_LwpGIlL2rQYZweu2omocUeYytjG4eJJlaH7rl2KmMRM","lore_tm_v1_2kTaCLVPyKPrS52aimpN99RtwFgm7Fg_6WK1VqAgqKY","lore_tm_v1_alICQy6pLR7fokBC0q6YDAWjWKicgHmuZcWfKdQOz-o","lore_tm_v1_wB4Ycq2-6US1KX0Xy2dg8gutMsOIjvMF3K2QtjWvjbk","lore_tm_v1_MWmHAKS0nFLGLX9CnyKXuq9YuQ_4w_xjWHNZCkNlUb8","lore_tm_v1_l86uoGJkNRkLQ_BWiUQz16C9lyff64I8me-X9rYxVLw","lore_tm_v1_gSZUL38xwaeuDpKWc7WMdQPJHdexkWYQm7WjjJ6v6Wk","lore_tm_v1_LyBH1M4d4H6Z330QWlEOAbP-ivzPMB1iZCfoyv_WWfQ","lore_tm_v1_9jvlJ-Fkckb5URBZdp481-Ke11j3WLTIeVtapGD-UkM","lore_tm_v1_UcaGXIctdW7qhsZnGKCE-qld7UGZQC0h-10dGic3YDI","lore_tm_v1_iYlmgj8xtB46JIdjGeMVdfhj8qkdv7y_-7I1q2yeW78","lore_tm_v1_Rm_rlgxhKWorJabViFtyCWQPbVdNHJzCsK2ywqayqAI","lore_tm_v1_eCqf2E0kgEOtrGG1judBKwR97Ql4tS4B-B24LMeAcp0","lore_tm_v1_42Z_eRsvaFpAw5DlQTdcBsh0twc2ozcJyrXxm4vnGZ0","lore_tm_v1_7l5JCl363MkpwNgDIN17I8LlhgMrP4nuOpr0vzHS75o","lore_tm_v1_9AHmmA2RnyhKrPOMqBCmN0O0Q8sLtIL7W6RSm0U3W9A","lore_tm_v1_P0gxmqPeUDxWXTIuGTUYLZvUsGzUF2pbp4rApzZkFs8","lore_tm_v1_Vr9EPAObSayIopYIp3xTsIKAawYZVJXvdB9-MsM5Lnk","lore_tm_v1_Bi9cKaFk4sn_wxh8VYd4kUY-dt6ZBqnCbbjADO76rjs","lore_tm_v1_e4IBEXD7jpTEEnf17FfXbSdw73gbns3rb5XORSo1qww","lore_tm_v1_i6j18nujbFNf9NL-Vm6U_VpOGoDdQrq1uTtQyqGFdBY"]
Date: Sep 15, 2026
2744 insertions(+) and 546 deletions(-): modified .lore.md, AGENTS.md, packages/core/schema.json, packages/core/src/database/migration.gen.ts, packages/core/src/database/migration/20260914170650_session-recovery.ts, packages/core/src/database/schema.gen.ts, packages/core/src/session.ts, packages/core/src/session/compaction.ts, packages/core/src/session/context-epoch.ts, packages/core/src/session/execution/local.ts, packages/core/src/session/input.ts, packages/core/src/session/message-updater.ts, packages/core/src/session/projector.ts, packages/core/src/session/recovery.ts, packages/core/src/session/run-coordinator.ts, packages/core/src/session/runner/index.ts, packages/core/src/session/runner/llm.ts, packages/core/src/session/runner/publish-llm-event.ts, packages/core/src/session/sql.ts, packages/core/test/database-migration.test.ts, packages/core/test/session-execution-local.test.ts, packages/core/test/session-projector.test.ts, packages/core/test/session-prompt.test.ts, packages/core/test/session-runner-recorded.test.ts, packages/core/test/session-runner-tool-events.test.ts, packages/core/test/session-runner.test.ts, and packages/schema/src/session-event.ts; deleted packages/core/src/database/migration/20260914214636_session-execution.ts and packages/core/src/database/migration/20260914222526_session-execution-phase.ts; untracked packages/core/src/session/execution/claim.ts, packages/core/src/session/recovery-id.ts, perf.data, and perf.data.old.SessionExecutionLocal cleanup and changed them to execute through session.resume(...), ensuring the "continue" claim survives the exact failure path that had previously deleted it; updates touched packages/core/src/session/input.ts and packages/core/test/session-runner.test.ts.2 pass, 95 filtered out, 0 fail, and 12 expect() calls across 1 file in 1452.00ms using Bun v1.3.14 (0d9b296a).packages/core/src/database/migration/20260914170650_session-recovery.ts adds session_input.wake_pending and creates session_execution with columns id, session_id, owner_id, nullable assistant_message_id, phase, time_created, expires_at, and nullable recovery_error; allowed phases are exactly 'ready', 'safe', 'unknown', and 'continue'.session_recovery with columns session_id, execution_id, nullable assistant_message_id, continuation_message_id, phase, wake_pending DEFAULT true, nullable recovery_error, and time_created; primary key is execution_id, with cascading foreign keys to session, session_message, and session_input.session_execution_session_idx (unique on session_id), session_execution_owner_idx (on owner_id), session_input_wake_pending_promoted_time_created_id_idx (on wake_pending, promoted_seq, time_created, id), and session_recovery_continuation_message_idx (unique on continuation_message_id)."never arms durable wake for a conflicting execution retry".packages/core/test/session-prompt.test.ts test "never arms durable wake for a conflicting execution retry" admits message messageID with prompt "Original prompt" and resume: false, retries the same ID with "Conflicting prompt" and resume: true, expects Session.PromptConflictError, verifies SessionInputTable.wake_pending remains false, and verifies wakeCalls stays [].packages/core/test/session-prompt.test.ts to strengthen durable-wake and recovery assertions.packages/core/test/session-prompt.test.ts: after session.resume(sessionID), tests call SessionRecovery.recover() and continue to expect wakeCalls to remain []; these checks appeared at lines 119 and 235, with another recovery call later at line 392."never arms durable wake for a conflicting execution retry [27.28ms]".178 pass, 1 fail, and 513 expect() calls across 5 files in 15.04s; the failing test was SessionV2.prompt > never arms durable wake for a conflicting execution retry.SessionRecovery.recover() required @opencode/v2/SessionExecution, but that service was absent from the packages/core/test/session-prompt.test.ts test environment; Effect reported Service not found: @opencode/v2/SessionExecution, defined at packages/core/src/session/execution.ts:21:38, with the recovery test implementation referenced at packages/core/test/session-prompt.test.ts:619:13.packages/core/test/session-prompt.test.ts after the missing-SessionExecution service failure.179 pass, 0 fail, and 514 expect() calls across 5 files in 14.47s using Bun v1.3.14 (0d9b296a).tsgo --noEmit completed successfully. Migration validation found no incremental schema changes and generated the full migration at /tmp/opencode-core-migration-check-iyKEQN/full/20260915183824_schema/migration.sql.$ tsgo --noEmit also completed successfully.packages/core/src/session/input.ts showed SessionInput.admit checks stored-input equivalence before requesting execution; both the normal existing-row path and publish-defect recovery path call requestWake(db, input) only when requestExecution is true, while conflicting reuse dies with SessionInput.LifecycleConflict.requestWake in packages/core/src/session/input.ts sets wake_pending: true only for the matching id and session_id while promoted_seq is null; an already-promoted row in the same session is treated as settled, while other mismatches die with LifecycleConflict.projectPrompted in packages/core/src/session/input.ts sets promoted_seq and clears wake_pending, validates replayed projections for exact compatibility, and calls settleRecoveryWake; that helper clears SessionRecoveryTable.wake_pending only for the matching session_id and continuation_message_id.packages/core/src/session/execution/local.ts showed execution claims use a random executionID and process ownerID, phase "ready", and lease expiration now + SESSION_EXECUTION_LEASE_MS; lease ownership is refreshed every leaseDuration / 3.SessionExecutionLocal claim cleanup semantics: successful drain clears the claim; interruption leaves the claim intact; non-interrupt failure clears it unless the current persisted phase is "unknown" or "continue". Recovery selection chooses the oldest pending, error-free SessionRecoveryTable row ordered by time_created then execution_id.packages/core/src/session/input.ts and packages/core/src/session/recovery.ts.input.ts and recovery.ts changes, tests passed exactly 179 pass, 0 fail, and 514 expect() calls across 5 files in 16.93s.tsgo --noEmit completed successfully again. Migration validation reported no incremental schema changes and generated the full migration at /tmp/opencode-core-migration-check-ZyKQiO/full/20260915184138_schema/migration.sql.$ tsgo --noEmit completed successfully with no errors.