Dashboard › opencode-lore › SQLite reader lifetime and bounded shut…
01a0a0ec-61ae-7402-84cf-73299bd256d6Every ReaderConnection must be closed during worker shutdown: a long-lived read mark prevents WAL truncation and previously produced a 5.4 GB WAL. Cleanup must inspect the SQLite singleton directly rather than calling db(), which would open a database while closing or invalidating caches. Set busy_timeout=0, attempt wal_checkpoint(TRUNCATE) best-effort, then close and clear connection/path and vector state. Never let shutdown wait behind a reader; a missed checkpoint is recoverable on reopen.