Opus finding
BasePlatform `PRAGMA synchronous = OFF` risks data loss on crash
mediumdata-losshigh
- backend/wonderwall/simulations/base.py:89-92
Setting `synchronous = OFF` means SQLite will not wait for OS-level fsync between commits — a process crash or power loss can silently corrupt the database file. For a simulation database this may be intentional, but it’s undocumented and applied unconditionally, including for production-style db_path values (not just `:memory:`).
Recommendation
Use `PRAGMA synchronous = NORMAL` (or default FULL) when `db_path != ':memory:'`. Document the speed-vs-durability tradeoff in code.