- Move integrity check before migrations/seeds to avoid writing to a
corrupted database (makes corruption worse)
- Fix buffer swap-before-commit hazard: entries are now only removed from
the buffer after the transaction succeeds
- Add try-catch to timer-triggered flush to prevent uncaught exceptions
from crashing the process
- Log warning in close() catch instead of silently swallowing errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>