Dashboard › opencode › Distillation
7d5b3f19-c458-4a97-97b8-ef2eb05782ff["lore_tm_v1_bL30wXY3bqtaQSKG0jGsTXOtk71vNsCdzgp6SjMQwCg"]
Date: Sep 15, 2026
SessionExecutionLocal “never starts a second owner while the lease is live.”SessionExecutionLocal “never re-enters its own uncertain live lease.”/home/byk/Code/opencode/packages/core/test/session-execution-local.test.ts contains 5 SessionExecutionLocal lease/claim tests at lines 42-160: (1) successful resume(sessionID) clears the claim; (2) closing the scope of a running wake(sessionID) preserves its claim; (3) explicit interrupt(sessionID) clears the claim; (4) a second execution’s resume(sessionID) does not run while the first owner’s lease is live, leaving exactly 1 claim; (5) an expired lease can be taken over while fencing the stale owner, after which the replacement runs once and claims are empty; and (6) an execution whose claim phase becomes "unknown" after a simulated defect does not re-enter its own still-live lease, leaving runs === 1 and exactly 1 claim.Effect.never under firstScope, calls first.wake(sessionID), then calls second.resume(sessionID); expected results are secondRuns === 0 and claims length 1.SessionExecutionTable.expires_at to 0 for the first owner’s claim, then calls second.resume(sessionID); expected results are secondRuns === 1 and claims equals [], demonstrating takeover and stale-owner fencing.SessionExecutionTable row identified by executionID to { phase: "unknown" }, then dies with "simulated failure"; after the first defect is caught and execution.resume(sessionID) is called again, expected results are runs === 1 and exactly 1 retained claim.child with Scope.close(child, Exit.void) after a running wake(sessionID) does not delete ownership state: claims has length 1 both before and after scope closure.wake(sessionID) starts a nonterminating run, execution.interrupt(sessionID) removes the claim, producing claims === [].