mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Opening each local message-board handle created a separate SQLite pool for the same database. ## What changed - Cache one shared pool per canonical database path within the process, using weak references so the last handle can release it. - Serialize pool initialization with deletion and corruption recovery. Close and evict the cached pool before replacing a corrupt database, and block new handles until deletion tombstones are saved. ## Testing Enable library unit tests and add coverage for concurrent handles sharing a pool, releasing it after the last handle drops, and creating a new pool on reopen. GitOrigin-RevId: 4d4a5c9ea9f063733df85a2ac120d51099736520