Skip to content

Centralize SQLite infrastructure and migrations - #796

Merged
itsDNNS merged 1 commit into
mainfrom
refactor/sqlite-infrastructure
Aug 15, 2026
Merged

Centralize SQLite infrastructure and migrations#796
itsDNNS merged 1 commit into
mainfrom
refactor/sqlite-infrastructure

Conversation

@itsDNNS

@itsDNNS itsDNNS commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • centralize SQLite connection policy and explicit read/write transaction ownership
  • add atomic bulk writes and migrate core plus module storage callers to the shared contract
  • introduce ordered, shape-aware migrations for fresh, current, legacy, hybrid, and unknown database shapes
  • harden backup and restore with consistent copies, staged integrity checks, atomic publication, and WAL/SHM cleanup
  • enforce ownership boundaries with focused policy, transaction, migration, restore, and static contract tests

Validation

  • python -m pytest tests/ -q --tb=short --ignore=tests/e2e — 3797 passed, 2 skipped
  • Chromium E2E, isolated file batches — 531 passed with exact 531-test denominator
  • focused migration, storage, backup, and ownership tests — 92 passed
  • 5,000-event bulk benchmark — one commit, one executemany, 0.027s wall time, 513 KiB peak memory
  • python -m compileall -q app tests
  • git diff HEAD^ HEAD --check

Compatibility

Existing storage method signatures and the connect_sqlite compatibility seam remain unchanged. The migration registry is additive, the existing UTC migration remains separate, and no dependency, retention, synchronous-policy, or user-facing schema change is included.

@itsDNNS
itsDNNS force-pushed the refactor/sqlite-infrastructure branch from a57c91d to 1f1a153 Compare August 15, 2026 17:03
@itsDNNS
itsDNNS merged commit 227d490 into main Aug 15, 2026
19 checks passed
@itsDNNS
itsDNNS deleted the refactor/sqlite-infrastructure branch August 15, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant