Dashboard › opencode › Distillation
e91979dc-d260-435c-841d-f2ea9aba97d8["lore_tm_v1_IdMXbEZCNhRqsJYoymlOE22WnslFPmaW5TmJibZK5qU","lore_tm_v1_EOryJVTEvNudrZg49TsKZPGIIZEnamIcOxBjs1tH22o","lore_tm_v1_fjr3Z5R6djfYBpGAnCg4vbXS7sui9XE8TPezNOkXUMA","lore_tm_v1_9W5WBwURCWAuPN840dZ6OemwQv7CYQRreTp2xPrTNTo","lore_tm_v1_PC_WCO2nQE4-9fOr6XvGKKdiYAmva0YPSgKa3NDurL4","lore_tm_v1_Nv_pnkF5xovvJwcWvodrsLaiVZ1mML7-kovtDuEP-to","lore_tm_v1_YDM_7bgyg4HGn69nWxb-KrmKReM2JRo7D3aD2CLQkeE","lore_tm_v1_CEc7j6qO-QryfdO9juaOzW-huxBeOlUGEyfWLYNVB84"]
Date: Sep 17, 2026
packages/core/test/session-run-coordinator.test.ts test ordering: 11. "runs a wake registered during interruption cleanup" — a wake issued while the first run’s interrupt cleanup waits on cleanupGate starts a second run, with runs equal to 2; 12. "finalizes interruption when cleanup dies" — cleanup dies with new Error("cleanup defect"), the interruption exit has a die cause, a wake registered during cleanup still starts the second run, coordinator.active ends empty, and runs is 2; 13. "starts a resume registered during interruption cleanup" — coordinator.run("session") during cleanup starts a successor and records forces as [false, true]; 14. "starts one follow-up when a wake races with failure" — the first joined resume fails with new Error("failed"), but the racing wake starts one follow-up and leaves runs at 2; 15. "does not cancel execution when a joined waiter is interrupted" — interrupting the second waiter does not cancel the shared execution, and runs remains 1; 16. "runs different keys concurrently" — keys "first" and "second" both start before gate is released; 17. "trampolines synchronous self-waking execution" — synchronous self-wakes complete exactly 20_000 runs without recursive stack growth.it.effect("never dispatches a provider after ownership changes", ...) at line 752 of the shown session-runner test, and the assertion expects requests to equal [].it.effect("never publishes streamed output after ownership changes", ...) at line 778.it.effect("never starts a local tool after ownership changes", ...) at line 805.it.effect("never fails interrupted tools after ownership changes", ...) at line 845.modelResolveHook, transfers execution ownership to { id: "provider-successor", owner_id: "successor", expires_at: 60_000 }, resumes resolution, and verifies no provider request was dispatched.packages/core/test/session-runner.test.ts imports Snapshot at line 26, defines "fails gracefully when a stored context snapshot cannot be decoded" at line 1060, and stores malformed snapshot data { snapshot: { invalid: { value: "bad" } } } at line 1070.packages/core/src/snapshot.ts defines Snapshot.Interface operations: capture() returns a content-addressed tree ID or undefined; files({ from, to }) lists changed project-relative paths; diff(...) produces structured File.Diff[]; preview(...) previews selective restoration without modifying the worktree; restore(...) restores selected paths and removes a selected path when absent from its source tree while leaving paths outside the map untouched; checkout(snapshot) replaces the snapshot index with the captured tree and checks out all entries while leaving files absent from the tree untouched.Snapshot.capture is enabled only for Git-backed locations when the latest "snapshots" config is not false; it captures the location-relative scope with maximumUntrackedFileBytes: 2 * 1024 * 1024, returns an ID, and converts best-effort capture failures into a warning plus undefined.path.join(global.data, "snapshot", location.project.id, Hash.fast(worktree)); scope() rejects a location outside the project with { operation: "capture", message: "Location is outside the project" }, and repository() rejects non-Git projects with { operation: "capture", message: "Project is not a Git repository" }.Snapshot.files and Snapshot.diff filter paths ignored by the source repository’s Git index. Snapshot.diff applies input.paths ?? files and forwards input.context.FSUtil.contains(worktree, absolute) and returns Path escapes the project: ${file} for escapes. preview and restore fail with "Snapshots are disabled" when disabled; preview captures only selected paths with the same 2 * 1024 * 1024 untracked-file limit.Snapshot.checkout delegates to git.tree.checkout({ repository: repo, tree: Git.TreeID.make(snapshot) }). Snapshot.noopLayer returns undefined from capture, empty arrays from files, diff, and preview, and no-op effects from restore and checkout.packages/core/test/session-runner-tool-events.test.ts defines 5 tests in order: 1. "local tool success serializes media base64 once and reconstructs from structured content" — publishes a read call for pixel.png, verifies event session.next.tool.success.1, exactly one serialized occurrence of base64 iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB, no top-level result, and reconstructed text/file content with MIME image/png; 2. "provider-executed success retains its compatibility result" — providerExecuted: true keeps result; 3. "binary failure emits no success event" — "Cannot read binary file" emits session.next.tool.failed.1 and no success event; 4. "old success event data containing result still decodes" — legacy SessionEvent.Tool.Success.data with provider: { executed: false } decodes and retains a content result; 5. "step finish records settlement without publishing step ended" — stepStart({ index: 0 }) plus stepFinish({ index: 0, reason: "stop" }) emits no session.next.step.ended.2, while publisher.stepSettlement() matches { finish: "stop" }.packages/core/test/session-runner-recorded.test.ts selects an HTTP cassette by process.env.RECORD === "true": recording uses HttpRecorderInternal.cassetteLayer("session-runner/openai-chat-streams-text", { directory: path.resolve(import.meta.dir, "fixtures/recordings"), mode: "record" }); replay uses HttpRecorder.http with the same cassette name and directory.https://api.openai.com/v1, bearer auth from OPENAI_API_KEY with "fixture" fallback, generation { maxTokens: 20, temperature: 0 }, and model "gpt-4o-mini". It uses Snapshot.noopLayer, a bound Location at AbsolutePath.make("/project"), empty SkillGuidance and ReferenceGuidance, and an empty config entry list.packages/core/test/session-runner-recorded.test.ts test "executes one recorded V2 prompt through the recorded HTTP transport" creates session ses_runner_recorded, prompts "Say hello in one short sentence." with resume: false, explicitly resumes, and expects exactly 2 context messages: the admitted user prompt and an assistant message from agent "build" with finish: "stop" and text "Hello!".session.next.prompt.admitted.1, 2. session.next.prompt.execution_requested.1, 3. session.next.prompted.1, 4. session.next.step.started.1, 5. session.next.text.started.1, 6. session.next.text.ended.1, 7. session.next.step.ended.2.packages/schema/test/event-manifest.test.ts test "owns the complete public event surface" expects EventManifest.ServerDefinitions.length === 61, EventManifest.Definitions.length === 91, EventManifest.Latest.size === 91, and EventManifest.Durable.size === 38.SessionV1.Event.Definitions order is: 1. Created, 2. Updated, 3. Deleted, 4. MessageUpdated, 5. MessageRemoved, 6. PartUpdated, 7. PartRemoved, 8. PartDelta, 9. Diff, 10. Error.packages/schema/test/event-manifest.test.ts test "uses canonical definitions for current public events" verifies: Session.Event === SessionEvent; Workspace.Event === WorkspaceEvent; latest canonical mappings for "session.next.step.ended", "todo.updated", and "project.updated"; Project.Event.Definitions contains only Project.Event.Updated; FileSystem.Event.Definitions contains only FileSystem.Event.Edited; Integration.Event.Definitions contains Updated then ConnectionUpdated; Permission.Event.Definitions contains Asked then Replied; and Reference.Event.Definitions contains only Reference.Event.Updated.EventManifest.Latest excludes "ide.installed" even though IdeEvent.Definitions contains IdeEvent.Installed; EventManifest.Definitions.slice(46, 49) is [SessionV1.Event.PartDelta, SessionV1.Event.Diff, SessionV1.Event.Error]; durable events exclude "session.next.step.ended.1"; "session.next.step.ended.2" maps to SessionEvent.Step.Ended; and "session.next.prompt.execution_requested.1" maps to SessionEvent.PromptExecutionRequested.