## Problem 14 `sqlite3.connect()` sites open database connections without applying the canonical `WRITE_CONNECTION_PRAGMA_STATEMENTS` (WAL mode, busy_timeout=30s, foreign_keys=ON, cache_size=128MiB, mmap=1GiB, synchronous=NORMAL). Severe sites (read-write on main archive, all pragmas missing): - `write_gateway.py:120` — dead code (never instantiated) but would be severe if wired - `reset.py:44,62,145` — 3 sites in the reset command - `blob_gc.py:141` — GC operations - `sampling_db.py:163,274` — schema sampling - `corpus.py:229` — validation with conditional writes - `sqlite_vec_runtime.py:24` — vector ops, missing 7 of 9 pragmas - `daemon/cli.py:39` — FTS startup check Impact: SQLITE_BUSY on lock conflict (no busy_timeout), no FK enforcement, no WAL crash recovery, severely degraded I/O performance. ## Acceptance criteria - [ ] All production connection sites route through `connection_profile.py` factories - [ ] `write_gateway.py` connection site is either wired or deleted - [ ] `reset.py` uses `connection_context()` or `open_connection()` - [ ] CI linter rejects bare `sqlite3.connect()` in production code (allow in tests) - [ ] 3 sites using WRITE profile for read-only ops use read profile instead Ref: deep audit 4b, C4. Ref #771, #772.
Activity
fix: connection profiles, identity ledger, tags M2M wiring (#780, #775,
Sinity commentedon May 4, 2026
Resolved by PR #788. All 14 connection sites routed through connection_profile.py factories, verify_connection_sites.py linter created.
fix: connection profiles, identity ledger, tags M2M wiring (#780, #775,