Visitar URL original
fix(ci): pin Node to 24.18.0 so better-sqlite3 stops aborting test wo… · Intevity/sentinel@8dc07f8 · GitHub
Skip to content

Commit 8dc07f8

Browse files
fix(ci): pin Node to 24.18.0 so better-sqlite3 stops aborting test workers
- 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>
1 parent 8371420 commit 8dc07f8

6 files changed

Lines changed: 94 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ on:
2424
- '.gitignore'
2525
- 'CHANGELOG.md'
2626

27+
28+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
29+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
30+
# environment teardown: better-sqlite3's Statement destructor calls
31+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
32+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
33+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
34+
# with them and dropping coverage below the gate — with no code change to
35+
# explain it, because a floating `'24'` pin picks up each new patch release.
36+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
37+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
38+
env:
39+
NODE_VERSION: '24.18.0'
40+
2741
concurrency:
2842
group: ci-${{ github.ref }}
2943
cancel-in-progress: true
@@ -46,7 +60,7 @@ jobs:
4660
fetch-depth: 0
4761
- uses: actions/setup-node@v4
4862
with:
49-
node-version: '24'
63+
node-version: ${{ env.NODE_VERSION }}
5064
- name: Lint commit messages (release notes are generated from them)
5165
run: node scripts/commit-lint.mjs "origin/${{ github.base_ref }}" HEAD
5266

@@ -105,7 +119,7 @@ jobs:
105119

106120
- uses: actions/setup-node@v4
107121
with:
108-
node-version: '24'
122+
node-version: ${{ env.NODE_VERSION }}
109123
cache: pnpm
110124

111125
- name: Install dependencies
@@ -302,7 +316,7 @@ jobs:
302316

303317
- uses: actions/setup-node@v4
304318
with:
305-
node-version: '24'
319+
node-version: ${{ env.NODE_VERSION }}
306320
cache: pnpm
307321

308322
- name: Install dependencies

‎.github/workflows/deploy-site.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ on:
2424
workflow_dispatch:
2525

2626
# Allow the GITHUB_TOKEN to deploy to Pages via OIDC.
27+
28+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
29+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
30+
# environment teardown: better-sqlite3's Statement destructor calls
31+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
32+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
33+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
34+
# with them and dropping coverage below the gate — with no code change to
35+
# explain it, because a floating `'24'` pin picks up each new patch release.
36+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
37+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
38+
env:
39+
NODE_VERSION: '24.18.0'
40+
2741
permissions:
2842
contents: read
2943
pages: write
@@ -50,7 +64,7 @@ jobs:
5064

5165
- uses: actions/setup-node@v4
5266
with:
53-
node-version: '24'
67+
node-version: ${{ env.NODE_VERSION }}
5468
cache: pnpm
5569

5670
- name: Install dependencies

‎.github/workflows/notarize-finalize.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ on:
3636
default: stable
3737
type: string
3838

39+
40+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
41+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
42+
# environment teardown: better-sqlite3's Statement destructor calls
43+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
44+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
45+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
46+
# with them and dropping coverage below the gate — with no code change to
47+
# explain it, because a floating `'24'` pin picks up each new patch release.
48+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
49+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
50+
env:
51+
NODE_VERSION: '24.18.0'
52+
3953
permissions:
4054
contents: write
4155

@@ -57,7 +71,7 @@ jobs:
5771
version: 10
5872
- uses: actions/setup-node@v4
5973
with:
60-
node-version: '24'
74+
node-version: ${{ env.NODE_VERSION }}
6175
cache: pnpm
6276
- name: Install dependencies
6377
run: pnpm install --frozen-lockfile

‎.github/workflows/notarize-poll.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ on:
1313
- cron: '13,43 * * * *'
1414
workflow_dispatch: {}
1515

16+
17+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
18+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
19+
# environment teardown: better-sqlite3's Statement destructor calls
20+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
21+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
22+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
23+
# with them and dropping coverage below the gate — with no code change to
24+
# explain it, because a floating `'24'` pin picks up each new patch release.
25+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
26+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
27+
env:
28+
NODE_VERSION: '24.18.0'
29+
1630
permissions:
1731
contents: write
1832

@@ -33,7 +47,7 @@ jobs:
3347
- uses: actions/checkout@v4
3448
- uses: actions/setup-node@v4
3549
with:
36-
node-version: '24'
50+
node-version: ${{ env.NODE_VERSION }}
3751
- name: Scan for a pending release and poll it once
3852
id: scan
3953
run: |

‎.github/workflows/release.yml‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ on:
2626
# A re-push of the same tag is rare but happens (e.g., draft release re-cut).
2727
# Deduplicate retries on the same tag, but never cancel a mid-flight macOS
2828
# notarize — that wastes 10x ubuntu-equivalent minutes.
29+
30+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
31+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
32+
# environment teardown: better-sqlite3's Statement destructor calls
33+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
34+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
35+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
36+
# with them and dropping coverage below the gate — with no code change to
37+
# explain it, because a floating `'24'` pin picks up each new patch release.
38+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
39+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
40+
env:
41+
NODE_VERSION: '24.18.0'
42+
2943
concurrency:
3044
group: release-${{ inputs.version || github.ref_name }}
3145
cancel-in-progress: false
@@ -53,7 +67,7 @@ jobs:
5367
fetch-tags: true
5468
- uses: actions/setup-node@v4
5569
with:
56-
node-version: '24'
70+
node-version: ${{ env.NODE_VERSION }}
5771
- name: Build notes from conventional commits
5872
id: notes
5973
env:
@@ -181,7 +195,7 @@ jobs:
181195

182196
- uses: actions/setup-node@v4
183197
with:
184-
node-version: '24'
198+
node-version: ${{ env.NODE_VERSION }}
185199
cache: pnpm
186200

187201
- name: Install Rust
@@ -513,7 +527,7 @@ jobs:
513527
- uses: actions/checkout@v4
514528
- uses: actions/setup-node@v4
515529
with:
516-
node-version: '24'
530+
node-version: ${{ env.NODE_VERSION }}
517531
- name: Download notary submission ids from the draft release
518532
run: |
519533
set -euo pipefail

‎.github/workflows/test-build.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ on:
3434
- linux
3535
- all
3636

37+
38+
# Node 24.19.0 shipped nodejs/node#63642 ("src: add cleanup hooks to
39+
# node::ObjectWrap"), which makes NAN-style ObjectWrap addons abort during
40+
# environment teardown: better-sqlite3's Statement destructor calls
41+
# RemoveEnvironmentCleanupHook after the Environment is gone, tripping
42+
# `Assertion failed: (env) != nullptr` and killing the process with SIGABRT.
43+
# In CI that surfaced as vitest workers dying mid-run, taking whole test files
44+
# with them and dropping coverage below the gate — with no code change to
45+
# explain it, because a floating `'24'` pin picks up each new patch release.
46+
# Pinned until better-sqlite3 adapts to the new hook contract; verified locally
47+
# under both versions (24.19.0: 4-6 workers killed per run; 24.18.0: none).
48+
env:
49+
NODE_VERSION: '24.18.0'
50+
3751
permissions:
3852
contents: write
3953

@@ -87,7 +101,7 @@ jobs:
87101

88102
- uses: actions/setup-node@v4
89103
with:
90-
node-version: '24'
104+
node-version: ${{ env.NODE_VERSION }}
91105
cache: pnpm
92106

93107
- name: Install Rust

0 commit comments

Comments
 (0)