Repository navigation
fix(db): preserve readonly and existing-file semantics in node:sqlite fallback - #8724
Merged
diegosouzapw merged 4 commits intoJul 27, 2026
Conversation
diegosouzapw
added a commit
that referenced
this pull request
Jul 28, 2026
…e lost credits Aggregates every pending changelog.d fragment into the [3.8.49] section and regenerates the contributors table from the reconciled bullets. Three fixes this surfaced: - The [3.8.49] section had no `### 📝 Maintenance` heading, so the aggregator's findIndex matched the first one in the file — inside [3.8.47] — and would have filed 92 maintenance bullets under the wrong release. Added the heading to the living section; [3.8.47] stays at its original 234 bullets. - 46 bullets carried no PR/issue reference. Fragments may keep the number only in the filename (`<N>-slug.md`), which the aggregator does not copy into the bullet, so the link and the credit were dropped on aggregation. Restored, scoped strictly to the [3.8.49] range. - 9 external contributors lost their attribution that way and are credited again: @MisileLab (#8566), @MumuTW (#8619), @epsilonode (#8724), @hppsc1215 (#8835), @sumanxg (#8837, #8856), @TitoTFP (#8838), @HouMinXi (#8842, #8845). Contributors table: 84 → 155 entries, no one removed. 42 i18n mirrors synced. check:changelog-integrity green — no base bullet lost.
Merged
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
… fallback (diegosouzapw#8724) * fix(db): preserve node sqlite open semantics * test(db): keep node sqlite coverage off Bun * chore(changelog): number native sqlite fallback * test(db): register node sqlite tests only under Node
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… fallback (diegosouzapw#8724) * fix(db): preserve node sqlite open semantics * test(db): keep node sqlite coverage off Bun * chore(changelog): number native sqlite fallback * test(db): register node sqlite tests only under Node
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…e lost credits Aggregates every pending changelog.d fragment into the [3.8.49] section and regenerates the contributors table from the reconciled bullets. Three fixes this surfaced: - The [3.8.49] section had no `### 📝 Maintenance` heading, so the aggregator's findIndex matched the first one in the file — inside [3.8.47] — and would have filed 92 maintenance bullets under the wrong release. Added the heading to the living section; [3.8.47] stays at its original 234 bullets. - 46 bullets carried no PR/issue reference. Fragments may keep the number only in the filename (`<N>-slug.md`), which the aggregator does not copy into the bullet, so the link and the credit were dropped on aggregation. Restored, scoped strictly to the [3.8.49] range. - 9 external contributors lost their attribution that way and are credited again: @MisileLab (diegosouzapw#8566), @MumuTW (diegosouzapw#8619), @epsilonode (diegosouzapw#8724), @hppsc1215 (diegosouzapw#8835), @sumanxg (diegosouzapw#8837, diegosouzapw#8856), @TitoTFP (diegosouzapw#8838), @HouMinXi (diegosouzapw#8842, diegosouzapw#8845). Contributors table: 84 → 155 entries, no one removed. 42 i18n mirrors synced. check:changelog-integrity green — no base bullet lost.
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.
PR 1 of issue #8707 (staged native SQLite baseline)
OmniRoute prefers
better-sqlite3, then falls back to Node's built-innode:sqlitewhen the native addon cannot load. That fallback openedDatabaseSync(filePath)without preserving supported adapter open semantics.This PR addresses the fallback safety gap implicated by:
Specifically,
readonlywas not translated to Node'sreadOnlyoption, andfileMustExisthad no Node equivalent, so a missing persistent path could be created rather than rejected.What This PR Establishes
better-sqlite3remains the preferred driver when available.node:sqlitefallback can create, reopen, and query a writable temporary database.readonly + fileMustExistpath creates no database, WAL, or SHM artifacts.bun:sqliteremains preferred under Bun.The test seam only makes
better-sqlite3unavailable. It does not mock or replacenode:sqlite, patch the global module loader, or expose a public test-only API.Runtime-Specific Tests
Bun does not expose
node:sqlite, so Node-only fallback tests are registered only under Node. Bun still runs the shared driver-factory checks; Node still runs the full fallback suite. This avoids reporting no-op Node tests as Bun passes.Validation
check:any-budget:t11,check:tracked-artifacts, andcheck:changelog-integrity.Fork CI is diagnostic-only for this branch. This PR does not claim a green full suite, build, coverage, quality-gate, or Sonar result.
Related Issues And Boundaries
This PR does not close:
It reduces one avoidable unsafe fallback transition. It does not claim to repair Electron packaging, persisted packaged startup, permissions failures, or sql.js memory behavior.
It also excludes native backup changes, transaction changes, vector loading, dependency changes, runtime repair, and any driver-preference change.
Follow-up Stack
After this PR merges, PR 2 can prove native backup and transaction parity: immediate acquisition, nested savepoints, commit/rollback behavior, contention, and old-runtime degradation, while retaining
better-sqlite3preference.Only after PR 2 merges should PR 3 address trusted
sqlite-veclifecycle and two-cycle persisted Windows Electron package proof. Each PR requires its own evidence and a fresh branch from the current release line.