Harden SQLite connection defaults with WAL and busy timeout

This commit is contained in:
2026-04-10 19:24:21 +02:00
parent 1dfc17f4f5
commit 9b4cd17e3b
3 changed files with 68 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
- Issue: `get_db` opens a fresh `aiosqlite` connection per request without explicit database pragmas such as `busy_timeout` or WAL mode.
- Propose: Configure SQLite connections in `open_db` with safe defaults (e.g. WAL, busy timeout, journal mode) and consider a centralized request-scoped access wrapper to keep connection setup consistent.
- Test: Confirm `open_db` applies the expected pragmas and add simulated concurrency tests that surface lock / timeout failures.
- Status: completed
5. Separate startup settings from runtime configuration mutation
- Goal: Keep startup configuration immutable after bootstrap and handle runtime overrides through a dedicated manager.