Repository navigation
test runtime: tests reaching a read-only SQLite open run on Node (orca #48, slice 3) - #51
Merged
nachumi-a2zoperations merged 1 commit intoNov 15, 2026
Conversation
…#48, slice 3) Same root cause as slice 1 (PR 49), reached through other product modules: Bun's macOS SQLite refuses a read-only open of a closed WAL database ("unable to open database file"); Node opens it. The import scan routes a test to Node only when it imports a module in SQLITE_MODULES, and these modules were not there: - src/main/sqlite/row-cache/keyed-json-row-cache: the read-only opener itself (KeyedJsonRowCache, line 137). - src/main/runtime/push/notifications/mobile-notification-dismissal-store and runtime-mobile-notification-controller: the dismissal store reads through KeyedJsonRowCache; the notification IPC tests import the controller. - src/main/persistence/profile-state/profile-state-database: opens the profile state read-only (lines 89, 156). Red before (each passes on Node, fails on Bun every run): ipc/notifications-subject-retirement, ipc/notifications-external- acknowledgement, push mobile-notification-dismissal-store and -read-failure, tests/e2e/helpers/persisted-profile-state. Reach: 16 tests move to Node: the 5 above and 11 that import the same modules (they passed on Bun only because they never re-read a closed file). All run on Node as production does. No product code changes. Test: vitest-node-runtime-files.test.mjs gets a slice 3 case for the five files; red first (5 of 5 on Bun), green now. Evidence: the 16 moved tests + the routing test through the normal runner: 98 passed, 0 failed (1 skipped). Refs #48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #48 (slice 3: the remaining tests that reach SQLite through product code and run on Bun; 5 red files). #48 stays open for the rest.
Root cause
The same as slice 1 (PR 49): Bun's macOS SQLite refuses a read-only open of a closed WAL database ("unable to open database file"); Node opens it. The import scan (
vitest-sqlite-runtime-scan.mjs) routes a test to Node only when it imports a module listed inSQLITE_MODULES, and these read-only openers were not listed:src/main/sqlite/row-cache/keyed-json-row-cacheKeyedJsonRowCache, line 137)src/main/runtime/push/notifications/mobile-notification-dismissal-storeKeyedJsonRowCachesrc/main/runtime/push/notifications/runtime-mobile-notification-controllersrc/main/persistence/profile-state/profile-state-databaseThe red files this fixes (each passed on Node and failed on Bun every run)
src/main/ipc/notifications-subject-retirement.test.tssrc/main/ipc/notifications-external-acknowledgement.test.tssrc/main/runtime/push/notifications/mobile-notification-dismissal-store.test.tssrc/main/runtime/push/notifications/mobile-notification-dismissal-read-failure.test.tstests/e2e/helpers/persisted-profile-state.unit.test.tsReach
16 tests move to Node: the 5 above, and 11 more that import the same modules. Those passed on Bun only because they never re-read a closed file. All of them now run on Node, as production does. Product code is unchanged.
Tests
vitest-node-runtime-files.test.mjsgets a slice 3 case for the five files. Red first (all 5 on Bun), green now.check-changed: 13/13.