fix(ci): pin Node to 24.18.0 so better-sqlite3 stops aborting test workers - #58
Merged
Conversation
woodenconsulting
force-pushed
the
fix/ci-worker-crashes
branch
from
August 19, 2026 17:35
7fad85a to
8dc07f8
Compare
…rkers - pin every workflow's Node to 24.18.0 through a single NODE_VERSION constant, replacing the floating '24' that silently moved to 24.19.0 - Node 24.19.0 shipped nodejs/node#63642, which makes better-sqlite3's Statement destructor call RemoveEnvironmentCleanupHook after the environment is gone; the resulting assertion killed vitest workers with SIGABRT, dropped whole test files from the run, and failed the coverage gate with no code change to explain it Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
woodenconsulting
force-pushed
the
fix/ci-worker-crashes
branch
from
August 19, 2026 17:40
8dc07f8 to
6f7a266
Compare
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.
What was broken
CI has been failing on
mainsince the runner image moved from 20260720 to 20260810, with no code change to explain it. Three to six vitest workers die mid-run, taking their whole test files with them, so coverage lands ~1-2 points under the gate. Reproduced on an unmodified-main PR, so it was never caused by a feature branch.Root cause
The floating
node-version: '24'pin moved from 24.18.0 to 24.19.0. That release shipped nodejs/node#63642 ("src: add cleanup hooks to node::ObjectWrap"), which changes the contract for NAN-style ObjectWrap addons. better-sqlite3 is one, and itsStatementdestructor now callsRemoveEnvironmentCleanupHookafter the Environment is already gone:The process dies with SIGABRT. Tinypool reports only
Worker exited unexpectedly, which is why this looked like flakiness rather than a crash.How it was confirmed
Reproduced in a container matching the runner (Ubuntu, non-root, 4 CPUs, pnpm 10.34.5), then isolated by changing one variable:
Ruled out along the way: OOM (cgroup
oom_kill 0, peak 1.75 GB against a 16 GB limit), the runner's kernel log (no OOM or segfault entries), teardown timeouts (still failed at 60s), and anykillcall in our own code (there are none in the test suite).The fix
Pin Node to 24.18.0 across all six workflows through a single
NODE_VERSIONconstant, so the version can't drift again one workflow at a time. Revisit when better-sqlite3 adapts to the new hook contract.Note on the shipped daemon
build-sidecar.mjstargetsnode24for the packaged binary, which is the same floating major. If pkg's Node 24 base moves past 24.19.0, the shipped daemon could hit this abort at shutdown. Worth a follow-up; out of scope here.🤖 Generated with Claude Code