Dashboard › opencode › Distillation
5224ce36-ca51-4e76-a8a5-262331956cff["lore_tm_v1_azLL1BTsDEAJ64HNe6JKKrkWSieqNB9yQqXpot2QrHE","lore_tm_v1__5spyWLJHHEVHOJhYggGCu_iqWPM8xGz3ZXLtc0t7Dc","lore_tm_v1_uCB1RMvgLcEDm4FQPyo_S6Iz6u1mgMx0aT1-Yt-dKx4"]
Date: Sep 17, 2026
SessionExecutionLocal lease invariant: “never starts a second owner while the lease is live”; the corresponding test expects only 1 claim after a second execution instance attempts to wake the same session.SessionExecutionLocal lease invariant: “never overwrites an expired lease”; the corresponding test verifies the stale claim retains its original id and owner_id.SessionExecutionLocal lease invariant: “never re-enters its own uncertain live lease”; the test injects Effect.die("simulated failure") while handling the lease.SessionExecutionLocal heartbeat invariant: “never revives an expired claim on heartbeat”; the test advances TestClock by "10 seconds" before checking behavior.SessionExecutionLocal test setup uses SessionSchema.ID.make("ses_execution_local"), project version "test", SessionExecutionLocal.make(...), and explicit child-scope cleanup via Scope.close(child, Exit.void).packages/core/test/session-run-coordinator.test.ts, 7 in packages/core/test/session-prompt.test.ts, 38 in packages/core/test/session-projector.test.ts, and 40 in packages/core/test/session-runner.test.ts.packages/core/test/session-run-coordinator.test.ts matching tests, in line order: 1. line 31, "joins a wake-started execution without forcing a successor"; 2. line 141, "coalesces wakes received during active execution"; 3. line 209, "does nothing when interrupted while idle"; 4. line 218, "interrupts active execution and clears its pending wake"; 5. line 247, "runs a wake registered during interruption cleanup"; 6. line 285, "finalizes interruption when cleanup dies"; 7. line 332, "starts a resume registered during interruption cleanup"; 8. line 368, "joins concurrent interruption behind one cleanup barrier"; 9. line 423, "starts one follow-up when a wake races with failure"; 10. line 453, "does not cancel execution when a joined waiter is interrupted".packages/core/test/session-prompt.test.ts matching tests, in line order: 1. line 147, "delegates execution continuation through SessionExecution"; 2. line 159, "delegates process-local interruption through SessionExecution"; 3. line 171, "delegates interruption without requiring a recorded Session"; 4. line 310, "wakes execution when an exact prompt retry recovers a committed message"; 5. line 330, "never wakes execution when retrying an already promoted prompt"; 6. line 374, "durably records execution intent before advisory wake"; 7. line 514, "never arms durable wake for a conflicting execution retry".packages/core/test/session-projector.test.ts matching tests, in line order: 1. line 68, "atomically reconciles one abandoned execution into one continuation"; 2. line 222, "never continues a Step that durably failed before owner loss"; 3. line 325, "records a recovery continuation without forging an assistant identity"; 4. line 361, "recovers each abandoned execution once across repeated startup scans"; 5. line 407, "never recovers a live execution lease"; 6. line 445, "never recovers an execution superseded by a newer assistant"; 7. line 607, "recovers assistant-less continuation at its current assistant boundary"; 8. line 658, "redrives a durable recovery wake after admission"; 9. line 709, "quarantines a malformed recovery row without blocking a valid wake"; 10. line 763, "quarantines a full batch of poison recovery rows before redriving valid work"; 11. line 828, "fairly redrives recovery and ordinary work beyond a full bounded batch"; 12. line 964, "resets ordinary wake retry debt after fresh prompt promotion"; 13. line 1013, "rejects invalid persisted wake attempt counters"; 14. line 1114, "never wakes work settled between selection and redrive CAS"; 15. line 1197, "quarantines a continuation that belongs to another Session"; 16. line 1247, "redrives durable ordinary input execution intent after a lost advisory wake"; 17. line 1289, "redrives ordinary input without recovering a claim that crashed before promotion"; 18. line 1417, "redrives one existing recovery after its replacement claim crashes before promotion"; 19. line 1472, "never recovers a pre-promotion claim when input commits at the recovery boundary"; 20. line 1539, "rejects a recovered assistant from another Session"; 21. line 1586, "rejects a recovery execution identity owned by another Session"; 22. line 1638, "quarantines an execution claim blocked by a conflicting recovery identity"; 23. line 1687, "quarantines a recovery wake behind a newer assistant"; 24. line 1802, "never promotes a recovery superseded before scanner validation"; 25. line 1866, "never quarantines an exact recovery conflict after ownership transfer"; 26. line 1955, "quarantines an assistant-less recovery superseded before scanner validation"; 27. line 2013, "never promotes a quarantined recovery continuation as an ordinary steer"; 28. line 2069, "quarantines a malformed claim without blocking a valid claim"; 29. line 2121, "never recovers an expired cancellation claim"; 30. line 2172, "clears an expired durably cancelled claim"; 31. line 2220, "never quarantines cancellation after recovery ownership expires"; 32. line 2272, "never quarantines cancellation after recovery ownership transfers"; 33. line 2324, "never quarantines projection failure after recovery ownership expires"; 34. line 2389, "never quarantines projection failure after recovery ownership transfers"; 35. line 2458, "quarantines failed execution conversion before scanning later claims"; 36. line 2526, "rotates maximum wake attempt counters before issuing wakes"; 37. line 2601, "bounds each deterministic recovery scan"; 38. line 2799, "rolls back claim renewal when Context Epoch advance fails".packages/core/test/session-runner.test.ts matching tests, in line order: 1. line 619, "redrives only the synthetic recovery continuation"; 2. line 715, "redrives an ordinary prompt after its advisory wake is lost"; 3. line 845, "never fails interrupted tools after ownership changes"; 4. line 1034, "interrupts a source Location runner after a Session moves"; 5. line 1542, "recovers the continuation committed with Compaction.Ended"; 6. line 1686, "persists a second context overflow after one recovery"; 7. line 1709, "recovers once from a raw context overflow failure"; 8. line 1737, "publishes the original overflow when recovery summarization fails"; 9. line 1757, "interrupts overflow recovery while the summary provider is running"; 10. line 1819, "projects reasoning and tool events without executing or continuing tools"; 11. line 1917, "continues with reloaded history after durably settling one local tool call"; 12. line 1975, "never commits continuation before unresolved hosted tools are reconciled"; 13. line 2055, "keeps a running assistant recoverable when Step failure publication defects"; 14. line 2238, "recovers the continuation committed with a settled tool step"; 15. line 2303, "reloads a model switch before a tool-driven continuation turn"; 16. line 2460, "starts recorded local tools eagerly and awaits settlement before continuing"; 17. line 2691, "promotes queued input after continuation ends"; 18. line 2738, "preserves durable queued input for a later wake after interruption"; 19. line 2781, "preserves durable steering input for a later resume after interruption"; 20. line 2867, "promotes queued input after steering continuation ends"; 21. line 2966, "coalesces multiple active steering prompts into one continuation turn"; 22. line 3035, "durably fails local tools left running by a prior process before continuing"; 23. line 3095, "durably fails hosted tools left running by a prior process before continuing inline"; 24. line 3155, "durably fails pending tool input left by a prior process before continuing"; 25. line 3392, "durably settles local tool failures before continuing"; 26. line 3438, "returns unexpected local tool defects to the model and continues"; 27. line 3486, "returns policy-blocked tools to the model and continues"; 28. line 3535, "interrupts runner continuation when permission approval is declined"; 29. line 3591, "retains the claim after user decline until runner finalizers finish"; 30. line 3649, "returns permission corrections to the model and continues"; 31. line 3698, "interrupts runner continuation when a question is dismissed"; 32. line 3845, "durably fails blocked local tools when a provider turn is interrupted"; 33. line 3906, "settles cancellation when interrupted tool publication defects"; 34. line 3952, "settles cancellation after Step failure while a local tool is active"; 35. line 4016, "settles cancellation when Step start notification is interrupted"; 36. line 4070, "retains the claim after Step interruption until runner finalizers finish"; 37. line 4135, "interrupts a blocked provider turn without local tool execution"; 38. line 4158, "durably fails blocked local tools when interrupted while awaiting settlement"; 39. line 4339, "does not recover context overflow after durable assistant output"; 40. line 4385, "does not continue automatically after a provider error follows a local tool call".session-runner cancellation/interruption tests use prompts "Interrupt blocked tool", "Interrupt publication failure", "Cancel failed Step", "Interrupt provider", and "Interrupt tool settlement". One blocked-tool case emits LLMEvent.toolCall({ id: "call-forbidden", name: "echo", input: { text: "forbidden" } }).finalizerStarted, releaseFinalizer, and stepCommitted; while a finalizer is blocked, a retained execution claim is expected to match { phase: "unknown" }."settles cancellation when Step start notification is interrupted" test, the run fiber is awaited and db.select().from(SessionExecutionTable).all() is expected to equal [], verifying cancellation removes the durable execution claim after settlement.