Dashboard › opencode › Distillation
37eaffc9-b6d0-4bfc-8f2c-bd3458f6749b["lore_tm_v1_9vhgOGSFnAEfAaTnMHxnOnjyW2gUz7_qwaGO2n5uTV0","lore_tm_v1_A0lcWQiyJdRQ2arSJ9OHfyYNX2Ete8c8H9qGhFc6aaA","lore_tm_v1_jkSvqlKF_M_Mbc7gSAU7sv8BkZVwRaSBToDWf6d4G2g","lore_tm_v1_9uwy8naOVK-Cu9cM_o1M43RDJwpwg-pGbiY1t4tGOlg","lore_tm_v1_yZtXvfTS9iLR5b8LwUyr7rHlPuzdTlzLvCQzE-eJ3W8","lore_tm_v1_j0F6WYJua2VrQO598FiRDmC26pJYdLKdlwf9g6aZlUU","lore_tm_v1_WMILPgRjnD0VfiEvsdrCcrkNZEupZnCzzFHv6nerbZo","lore_tm_v1_ytDSS910Y8bgH_SVGr0OxZdwO3K4UudJzNBt_vB7KUs","lore_tm_v1_um3bKapdKCfvFpn7qGvKBOSjT5QS7v-5809VJtdiW9A","lore_tm_v1_zAnB1iSvCXG0U-shZnoUYCoaOhG3X0clRCkCQiSwL7k","lore_tm_v1_k4ezM-tgOusWVlQcO_BmZp_EEjKQ_pK0-_397weEQEQ","lore_tm_v1_CwrUj3ROnX3Ian3ONqV3qhjRymFulvz8ArFJ0sR4si0","lore_tm_v1_gx6ptkfQrnKdVA_naXrTgD-THNxPVIkyiq-jxP2CItM","lore_tm_v1_80l2eD4pp_3IeLBt2wMqOhafsHtAVNqyBQ6eBhE3mFQ","lore_tm_v1_ZowLDqhCZtPbuh5Tc6kUxXaeavtQL8NGeg6EVKoxQAM","lore_tm_v1_AtfpKFsodj2F1tEf4k2pnc7Grn0d--ltl_9E5yU8hbg","lore_tm_v1_TBdsgydSERi1xvC_MS3IIuOOvhPbzSpfkelFCFw5CvI","lore_tm_v1_qR-3CxPhmN2ZT6zIc5dXVoR8JjsvH7TaCjSfMl6U0O8","lore_tm_v1_y_2LNubHxeh7fECIGGyHVOAP-fDqTAaV1KHRxX5KOLM","lore_tm_v1_D-cqLMPw2VceXdICt7h9XXAbDkDpTFQFKD8BwcL4Vhw","lore_tm_v1_hMbjgfaVVfH1sP9eMyJdj2NZMYyuqkMrwVZUsdCYlgc","lore_tm_v1_lUWGQkPVrRRP_Zr8CtI92rvVGE8yj1_5cJjzzQ8zNUc","lore_tm_v1_BHH4vk39dFLEAHsotvaDwPt6wP7mXG_AfqLZ9mtXcRk","lore_tm_v1_cHWGGaum8hX5JYITiWg-QlVZrNd72d-eREas-OydqSI","lore_tm_v1_JXywW6FeUmzlgiXBOejfdvxV_XZ4043HwKvWs96oG1k","lore_tm_v1_dvLU91pNIP9LzpdUd2_vulaGeBBwdh10Fh8w0OifzX0","lore_tm_v1_sbhd7Cz_ntiNb50RZ5oKoEX-iI4LRk3dDh4xNdYKQeU","lore_tm_v1_vZ5UhGXzm0jBXV2QX_aVUWHrpVPofPIUULF5vXkZ7p4","lore_tm_v1_ioAEu3j9IPGvFbYnHE5_p8bSRIUBTOTURi73IIBmxj8","lore_tm_v1_PvsAWaEYSxAcO-408wSHQiaJfykIaY6dweHKCAxre6g","lore_tm_v1_-J6TCPmHZXDSUqWD87wT0bZZNz0Yz6vBHbsBRTF0a9M","lore_tm_v1_nqqIwI6aPxGnVDRu9P5dJHhWE4Tz1tBjFc4Md1pyKms","lore_tm_v1_vOEnZ3Re0aB_HnF2LsEAL7cBQbhq8O931LV0xXvgxJQ","lore_tm_v1_TDktw9yTNh2m7su-XFfXbJHF2fsC4uwB3IX8nuJ7vtk","lore_tm_v1_aee6f82Kbp-GSqpYticJHai31VtcNo6ZMUArb9jK5rU","lore_tm_v1_9QrhLTZfOwGKWzsdAYw8jAu8PPz86HPP0eUgGKvgwvE","lore_tm_v1_Gw8o1b_xPZX7sGNdcQT5GiE8XmmbffIPWTTVGk6hOMk","lore_tm_v1_hzuEzfDA9es60WQhdumLb-p_6q1mfHKExoNRI5hzMnc"]
Date: Sep 15, 2026
/home/byk/Code/opencode/packages/core/src/event.ts: remove() transactionally deletes EventSequenceTable then EventTable; claim() updates owner_id; readAfter(aggregateID, after) reads events where seq > after ordered ascending and decodes them; subscribeDurable() begins with a sliding PubSub wake channel of capacity 1./home/byk/Code/opencode/packages/core/src/session.ts: events() exposes events.durable({ aggregateID: input.sessionID, after: input.after }); history() calls EventV2.readAggregate() with manifest: SessionDurable; prompt() admits input through SessionInput.admit() and calls execution.wake(admitted.sessionID) unless input.resume === false.SessionEvent.Step.Interrupted in /home/byk/Code/opencode/packages/schema/src/session-event.ts at lines 196, 205, 484, and 517.20260914170650_session-recovery creates session_recovery with composite primary key (session_id, assistant_message_id) and a unique continuation_message_id; 20260914214636_session-execution creates session_execution, adds execution_id to session_recovery, and adds unique/session-owner indexes; 20260914222526_session-execution-phase adds required text column phase to session_execution. All three were registered in packages/core/src/database/migration.gen.ts./home/byk/Code/opencode/packages/core/package.json identifies @opencode-ai/core version 1.18.30; scripts include "test": "bun test --only-failures" and "typecheck": "tsgo --noEmit"; exports include "./session/runner": "./src/session/runner/index.ts" and wildcard "./*": "./src/*.ts"./home/byk/Code/opencode/packages/core/src/session/execution/claim.ts: claim fencing matches session_id, execution id, owner_id, and requires expires_at > now; update() extends expiry to now + SESSION_EXECUTION_LEASE_MS; clear() deletes only a still-valid matching claim; both die with SessionExecutionClaim.Lost if no row is returned; transaction() uses an immediate database transaction and renews before running the supplied effect./home/byk/Code/opencode/packages/core/src/database/migration.ts: apply() rejects a nonempty database lacking a session table; fresh databases apply schema.gen.ts and mark every TypeScript migration complete; applyOnly() seeds the new migration journal from __drizzle_migrations, supports both named entries and timestamp-prefix matching, and applies each incomplete migration transactionally..lore.md, AGENTS.md, packages/core/schema.json, migration/schema files, session execution/recovery/projector/runner files, and related tests; untracked files were packages/core/src/session/execution/claim.ts, packages/core/src/session/recovery-id.ts, perf.data, and perf.data.old.packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts, updated packages/core/src/database/migration.gen.ts and packages/core/src/database/migration/20260914170650_session-recovery.ts, and restored/updated packages/core/src/database/migration/20260914214636_session-execution.ts plus packages/core/src/database/migration/20260914222526_session-execution-phase.ts.packages/core.effect-smol source under .opencode/references/effect-smol and nearby repository code, rather than relying on older Effect v2/v3 examples or memory.Effect.gen(function* () { ... }) for multi-step workflows; Effect.fn("Name") or Effect.fnUntraced(...) for named effects; Effect Schema, branded IDs, and Schema.TaggedErrorClass for domain modeling; explicit layers; no any, non-null assertions, unchecked casts, or obsolete APIs; testEffect(...) for Effect services and it.live(...) for live platform behavior; use scoped fixtures/finalizers.PRAGMA table_info(...) in packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts, 20260410174513_workspace-name.ts, and 20260511173437_session-metadata.ts.packages/core/src/session/projector.ts and packages/core/src/session/runner/llm.ts as part of recovery/fencing integration.packages/core/src/session/recovery.ts: scans SessionExecutionTable; discards a claim when its non-null assistant_message_id is not the latest assistant message; publishes SessionEvent.Step.Recovered with generated recovery/continuation IDs, prompt "continue", delivery "queue", and restart-specific error text; commit conditionally deletes the unchanged execution row by id, session_id, phase, and assistant-message identity; duplicate recovery is detected through SessionRecoveryTable; successful recovery calls execution.wake(claim.session_id).packages/core/src/session/execution.ts service contract: active, resume(sessionID), wake(sessionID), and interrupt(sessionID); noopLayer supplies no-op compatibility implementations for callers needing only durable session recording.packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts.packages/core/test/database-migration.test.ts for upgrading populated recovery ownership tables to the final schema.ses_existing, msg_existing, and msg_input; verifies session_execution.id is required; session_input.wake_pending defaults to false; session_recovery.execution_id is required and primary-keyed; assistant_message_id is nullable; phase is required; recovery_error is nullable; and inserting invalid execution phase "invalid" fails.packages/core/test/database-migration.test.ts again after reviewing the populated-upgrade assertions.packages/core/test/session-projector.test.ts.SessionProjector > atomically reconciles one abandoned execution into one continuation; totals were 185 pass, 1 fail, 533 expect() calls across 186 tests in 7 files. Failure was SessionInput.LifecycleConflict for ID msg_recovery_continue_execution at packages/core/src/session/input.ts:141, reached through SessionInput.projectAdmitted in packages/core/src/session/projector.ts:414.SessionMessageTable, triggering the lifecycle-conflict guard in SessionInput.admit.packages/core/src/session/projector.ts after the duplicate continuation-message lifecycle conflict.expect() calls across 7 files in 15.32 seconds.tsgo --noEmit completed successfully.tsgo --noEmit completed successfully.packages/core/script/migration.ts: --check verifies no incremental schema migration is pending, schema.gen.ts matches a regenerated full schema, and migration.gen.ts matches sorted TypeScript migration files; stale-state errors instruct running bun script/migration.ts from packages/core; Drizzle commands explicitly use .cwd(path.join(root, "packages/core"))./tmp/opencode-core-migration-check-kktghk/full/20260915200156_schema/migration.sql.