Dashboard › opencode › Distillation
d82a4fa9-9aa7-4bea-ac5d-7bf44f52f432["lore_tm_v1_YOTx4_Hthz2xYYNKUR4-33Tygt4WtiVyKvdai6S27SY","lore_tm_v1_pB-v4CyCewL9YWv-wPXOuZVDj2kUrRpAzo86vwVI1wQ","lore_tm_v1_fQcJMBsgqTti8_Fk2fah4qMWiRJMEtoYu_0_aBioRr4","lore_tm_v1_VErBYGPxuN7_FbpZlmGoQsyKPnNKrkLKyIfIpVikoDI"]
Date: Sep 16, 2026
/tmp/opencode/session-recovery-v7-check/packages/core/src/database/schema.gen.ts defines session_input.wake_pending as integer DEFAULT false NOT NULL and session.wake_attempts as integer DEFAULT 0 NOT NULL; session_wake_attempts_check restricts wake_attempts to 0 through 9007199254740991./tmp/opencode/session-recovery-v7-check/packages/core/src/database/schema.gen.ts creates indexes session_input_session_pending_delivery_seq_idx on (session_id,promoted_seq,delivery,admitted_seq), unique session_input_session_admitted_seq_idx on (session_id,admitted_seq), unique session_input_session_promoted_seq_idx on (session_id,promoted_seq), and session_input_wake_pending_promoted_session_idx on (wake_pending,promoted_seq,session_id)./tmp/opencode/session-recovery-v7-check/packages/core/src/database/schema.gen.ts creates unique index session_message_session_seq_idx on (session_id,seq) and indexes session_message_session_type_seq_idx on (session_id,type,seq), session_message_session_time_created_id_idx on (session_id,time_created,id), and session_message_time_created_idx on (time_created)./tmp/opencode/session-recovery-v7-check/packages/core/src/database/migration.gen.ts registers 39 migrations in order: 1. 20260127222353_familiar_lady_ursula, 2. 20260211171708_add_project_commands, 3. 20260213144116_wakeful_the_professor, 4. 20260225215848_workspace, 5. 20260227213759_add_session_workspace_id, 6. 20260228203230_blue_harpoon, 7. 20260303231226_add_workspace_fields, 8. 20260309230000_move_org_to_state, 9. 20260312043431_session_message_cursor, 10. 20260323234822_events, 11. 20260410174513_workspace-name, 12. 20260413175956_chief_energizer, 13. 20260423070820_add_icon_url_override, 14. 20260427172553_slow_nightmare, 15. 20260428004200_add_session_path, 16. 20260501142318_next_venus, 17. 20260504145000_add_sync_owner, 18. 20260507164347_add_workspace_time, 19. 20260510033149_session_usage, 20. 20260511000411_data_migration_state, 21. 20260511173437_session-metadata, 22. 20260601010001_normalize_storage_paths, 23. 20260601202201_amazing_prowler, 24. 20260602002951_lowly_union_jack, 25. 20260602182828_add_project_directories, 26. 20260603001617_session_message_projection_indexes, 27. 20260603040000_session_message_projection_order, 28. 20260603141458_session_input_inbox, 29. 20260603160727_jittery_ezekiel_stane, 30. 20260604172448_event_sourced_session_input, 31. 20260605003541_add_session_context_snapshot, 32. 20260605042240_add_context_epoch_agent, 33. 20260611035744_credential, 34. 20260611192811_lush_chimera, 35. 20260612174303_project_dir_strategy, 36. 20260622142730_simplify_session_context_epoch, 37. 20260622170816_reset_v2_session_state, 38. 20260622202450_simplify_session_input, 39. 20260914170650_session-recovery./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts verifies concurrent embedded initialization is serialized for one database path by building two Database.layerFromPath(filename) layers with { concurrency: "unbounded" }./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts runs bun ${fileURLToPath(new URL("../script/migration.ts", import.meta.url))} --check, expects exit code 0, and expects stdout to contain No schema changes, nothing to migrate; timeout is 30_000./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts verifies tracked migrations applied to an empty database create session, session_input, and session_context_epoch; confirms session_context_epoch lacks agent, replacement_seq, and revision; and expects the migration row count to equal migrations.length.event_aggregate_seq_idx, 2. event_aggregate_type_seq_idx, 3. session_input_session_admitted_seq_idx, 4. session_input_session_pending_delivery_seq_idx, 5. session_input_session_promoted_seq_idx, 6. session_message_session_seq_idx, 7. session_message_session_time_created_id_idx, 8. session_message_session_type_seq_idx./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts test “adds final recovery ownership tables to a populated predecessor” applies sessionRecoveryMigration while preserving existing rows ses_existing, msg_existing, and msg_input; verifies session_execution.id is required, session_input.wake_pending defaults to "false", session.wake_attempts defaults to "0", session_recovery.execution_id is a required primary key, assistant_message_id and recovery_error are nullable, and phase is required.session_execution with phase='invalid' fails./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts rejects a non-empty database containing table unrelated but no session table with error Database is not empty and has no session table./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts verifies contextEpochAgentMigration backfills an existing session_context_epoch row’s agent to "build"./tmp/opencode/session-recovery-v7-check/packages/core/test/database-migration.test.ts test “keeps legacy credential fields nullable” applies simplifyIntegrationCredentialsMigration and inserts both a legacy credential (id='legacy', connector_id='openai', method_id='oauth', label='Legacy', active=1) and a current credential (id='current', integration_id='anthropic', label='Current').EventTable row count and expects it to remain unchanged after ownership changes.LLMEvent.toolCall({ id: "call-fenced", name: "echo", input: { text: "must not run" } }).