mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-06-06 23:13:50 +00:00
a274f1bc1e
Set PRAGMA busy_timeout=5000 (5 seconds) to allow SQLite to retry when the database is locked instead of failing immediately. This fixes race conditions when multiple goroutines try to write simultaneously, particularly in tests where StoreObservation spawns async cleanup goroutines. Root cause: - StoreObservation launches goroutine -> CleanupOldObservations - Multiple concurrent cleanups caused "database is locked" errors - Without busy_timeout, SQLite fails immediately on lock contention Solution: - Add 5-second busy timeout for automatic retry on lock - Standard practice for concurrent SQLite usage - Works with existing WAL mode configuration Fixes TestObservationStore_CleanupOldObservations in CI.