Dashboard › opencode-lore › vec0 detection, repair, temporal marker…
01a0a078-b9af-74e4-93c9-7cae64fea671Repair vec0 indexes savepoint-atomically per table: preserve compatible siblings and recreate only missing or malformed tables; configured-width changes still rebuild all fixed-width indexes. Physical recognized DDL, not vec.dimension or configuration, determines the common width. Ignore repairable missing/malformed siblings, reject healthy-table width disagreement, recognize shipped legacy temporal layouts, and remember that vec tables alone do not establish vec0 while blob columns remain authoritative. Whenever temporal_vec is created or recreated, reset temporal_rechunk.done, cursor, and max_rowid together; otherwise stale max_rowid excludes newer messages. Prove vec0 KNN once on the writable main connection. Query-only readers should require only vec_version(), because writable temporary-table smoke tests falsely fail there with readonly database.