Dashboardopencode-loreDatabase schema, vec0, tracing, and con…

Database schema, vec0, tracing, and conflict invariants

Category: architecture
Confidence: 1.00
ID: 01a0a657-a484-77d4-8c18-f324c1e9933f
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0IiwozJmFR9A6QyFo
Created: 2026-08-26 07:14:08
Updated: 2026-09-15 18:32:36

Content

Physical schema is authoritative for vector reads: resolveReadMode() must inspect it even in transactions; committed vec0 and the connection latch override stale or forged storage_mode metadata, and blob fallback is allowed only when base embedding columns exist. Repartition vec0 rows by exact primary key using DELETE→INSERT in one transaction; keep batch 500, 900-ID scopes, and no-op equal projects, empty scopes, or non-vec0 mode. Normalize schema_version to MIGRATIONS.length. Tool-call upserts target (project_id, session_id, call_id). A fresh db() with LORE_NO_DB_TRACING="1" returns the raw connection and never invokes withDbSpan.

Move to: