fix: add WAL checkpointing to prevent query failures
Root cause: WAL file grew to 498MB (main db was 113MB) without ever
being checkpointed back to main database. Large WAL files cause FTS5
queries to fail with generic SQLite errors.
Changes:
- Add PRAGMA wal_checkpoint(TRUNCATE) after full sync
- Add PRAGMA wal_checkpoint(PASSIVE) after incremental sync
- Add integrity check on startup that auto-deletes corrupt db
- Store db path for potential auto-recovery
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>