Skip to content

test(db): preserve driver contracts across Node and Bun - #16149

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/15306-bun-driver-test-1010
Oct 10, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/15306-bun-driver-test-1010

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

The SQLite regression fixture expected the better-sqlite3 constructor to run under Bun, although the production factory deliberately excludes Node drivers there. The Linux and Windows Bun jobs therefore failed the network-report assertion before this change.

Make the existing case assert each runtime's contract: Node still enables network exclusion during construction and restores the caller setting after a thrown constructor; Bun requests only bun:sqlite, never constructs the Node addon, and preserves the caller setting. Production code and existing skip conditions are unchanged.

Validation

On release source 7510677f2f8f5317f1947284dab650d01333915d, using the official Bun 1.4.2 binary (revision 744846f84) and Node 24.21.0:

Original fixture, Bun: 16 pass, 1 fail (undefined !== true)
Original fixture, Node: 29 pass, 0 fail
Updated fixture, Bun: 17 pass, 0 fail
Updated fixture, Node: 29 pass, 0 fail
Four related files, Bun: 29 pass, 0 fail, 0 skip
Four related files, Node: 37 pass, 0 fail, 4 existing skips
Mutation controls: 3 regressions detected, each with an assertion failure

The mutation controls remove network exclusion, remove restoration, and allow the Node addon under Bun. Each uses the same frozen fixture in a disposable copy. Prettier, focused ESLint, file-size, test discovery and changelog checks pass. The independent review found no SPEC or Standards blockers.

Core and dashboard typechecks, cyclomatic complexity and cognitive complexity all pass on the frozen two-file snapshot. Local runtime testing was on Linux. Hosted Bun compatibility also passed on Linux and Windows, each with 25 passing tests and zero failures on Bun 1.4.2. This addresses one failure within #15306 and does not certify the full release pipeline.

Refs #15306

@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit 1fd4ad7 into release/v3.8.52 Oct 10, 2026
41 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant