Fixes
- Reject duplicate primary opens while the first open is pending. A second open of the primary database arriving before the first open's
#retryOpen settled used to queue another #retryOpen on the same file object; the racing retries overwrote file.accessHandle/waHandles, permanently leaking the losing handle set's runtime open-handle counts (unreclaimable, since the leaking owner is alive) and racing two WAL replays over the same shared buffers. An existing unopened primary file with retryResult === null can only mean an open in flight, so jOpen now rejects the duplicate with SQLITE_CANTOPEN before anything is allocated.
Testing
- New browser regression test drives
jOpen directly through the pending window and verifies the duplicate is rejected and openHandleCount returns to 0 after closing the surviving connection.
- Published after the full verification gate: prettier check, typecheck, 21 Playwright browser tests, build.
Install
npm install memory-write-ahead-vfs@0.1.2