fix(server): sqlite v13 on Bun+Node, Daytona toolchain, and v0.18.15 version backfill - #3563
Merged
Conversation
…sqlite3 v13 The v13 convergence (#3561) broke three things this fixes: 1. better-sqlite3 v13's N-API binding hard-panics Bun (NAPI FATAL ERROR: Error::New napi_get_last_error_info) - and bun test loads it via opencode-db's top-level import, killing the whole server suite. The Daytona worker runtime also ships openwork-server as a bun-compiled binary, so the panic would hit production sandboxes at runtime. opencode-db now selects its driver lazily at call time: bun:sqlite under Bun, better-sqlite3 under Node/Electron. 2. v13 under Node rejects ?N numbered parameters bound positionally (RangeError: Too many parameter values were provided) - bun:sqlite accepts them, so bun-driven CI could never catch it. All statements now use anonymous ? placeholders, verified on both drivers. 3. The Daytona snapshot image build compiles better-sqlite3 from source (pnpm's implicit node-gyp build for packages with a binding.gyp) and node:22-bookworm-slim has no toolchain: "gyp ERR! Could not find any Python installation". Add python3/make/g++ to the builder stage. Verified locally: bun test apps/server green (panic reproduced on unpatched dev), node smoke of every statement shape against v13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (3168c5b120988bb5e1e8daa15653eba65cb0382c). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
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.
One PR to bring dev fully level for v0.18.16. Combines the sqlite runtime fixes with the v0.18.15 version backfill (#3562 closed in favor of this).
Commit 1 — sqlite v13 fixes (the regressions #3561 introduced)
NAPI FATAL ERROR: Error::New napi_get_last_error_info);bun testdied suite-wide, and the Daytona worker runtime ships openwork-server as a bun-compiled binary, so runtime sandboxes would crash too.opencode-dbnow picks its driver lazily at call time:bun:sqliteunder Bun,better-sqlite3under Node/Electron (same API surface; the test fixture already used bun:sqlite).?Nnumbered params bound positionally (RangeError: Too many parameter values were provided); bun:sqlite accepts them, so tests stayed green while the desktop/Node path would break. All statements normalized to anonymous?, verified against both drivers.node:22-bookworm-slim(no toolchain):gyp ERR! Could not find any Python installation. Builder stage now installspython3 make g++.Commit 2 — v0.18.15 version backfill
The bump commit the v0.18.15 tag was cut from (tag-ruleset admin bypass): apps/app, apps/desktop, apps/server package.json + regenerated
ee/apps/den-api/src/generated/desktop-versions.ts. Merging keeps dev's version math correct for the next release.Verification
bun testin apps/server: 625 pass (panic reproduced on unpatched dev with the same suite)bun test src/opencode-db.test.ts: 5/5, availability-skip removedupdateAfter merge, v0.18.16 gets tagged from dev and the release publishes end-to-end.
🤖 Generated with Claude Code