Dashboard › opencode › Distillation
921d0dbe-826a-40d4-845f-0a3254ef7211["lore_tm_v1_BCpA_5OVgRB4lZNxB-L6CNuhLkK8wOHZMmpGBMCqFsY","lore_tm_v1_z9pUsGYLr-YtSZClXDGOcezhkbuXUVbbJzk00a-l_08"]
Date: Sep 16, 2026
packages/core/test/session-execution-local.test.ts uses in-memory Database.layerFromPath(":memory:"), session ID SessionSchema.ID.make("ses_execution_local"), project worktree /project, and helper effects insertSession and claims.SessionExecutionLocal test suite asserts that a successful resume(sessionID) drain clears the execution claim.Scope.close(firstScope, Exit.void), one row remains in SessionExecutionTable.execution.interrupt(sessionID) clears the execution claim.resume(sessionID) must leave secondRuns at 0 and retain exactly one claim.expires_at to 0, a second owner’s resume(sessionID) must leave secondRuns at 0 and preserve the stale claim’s original id and owner_id.phase to "unknown" and dies with "simulated failure"; a subsequent resume(sessionID) must not run again, leaving runs === 1 and one claim.expires_at is 30_000; after successive TestClock.adjust("10 seconds") calls it becomes 40_000 and then 50_000.expires_at is manually set to 0, advancing TestClock by "10 seconds" must leave it at 0.wake(sessionID) is registered and the clock advances "40 seconds"; the claim expiry remains greater than 40_000, releasing the finalizer starts the successor, total runs becomes 2, and all claims are eventually cleared.SessionRunCoordinator tests include an invariant named "snapshots only active executions".SessionRunCoordinator tests include an invariant named "runs a wake registered during interruption cleanup"; the visible expectation requires runs to become 2.