Skip to content

fix: support Node 26 (ABI 147) + propagate install exit code - #81

Merged
alonchin merged 7 commits into
masterfrom
fix-#tm-3894/node-26-abi147-win32
Sep 3, 2026
Merged

alonchin merged 7 commits into
masterfrom
fix-#tm-3894/node-26-abi147-win32

Conversation

@aborovsky

@aborovsky aborovsky commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

What

Add Node.js 26 (ABI 147) support to @neuralegion/os-service, and fix a silent install-failure bug.

Changes

  • deps: nan ^2.24.0 → ^2.28.0 (Node 26 / V8 14 support) and overrides.prebuildify.node-abi ^4.24.0 → ^4.35.0 (^4.24.0 mapped Node 26 to a stale abi144; ^4.35.0 maps it to 147). --target 26.8.1 added to build:gyp / build:gyp-cross.
  • fix(install): propagate the native build exit code. scripts/install.mjs only logged the child exit code and never propagated it, so a failed Windows native build exited 0 and only surfaced later at require() time inside the service-install path. Now exits with the child's code (and non-zero on signal / spawn error). Adds an OS_SERVICE_FORCE_NATIVE_INSTALL env override so the (Windows-only) build path is exercisable on any OS, plus a mutation-checked regression test (test/e2e/install-exit-code.test.mjs).
  • ci: Node 25 + 26 added to both test matrices; the Windows leg pinned to windows-2022 (windows-latest = Server 2025 / VS 18 breaks older node-gyp VS detection); the ThinLTO-off env (npm_config_enable_thin_lto/enable_lto=false) on the Windows install step so the Node 26 source build doesn't hit LNK1117.

Verification

Local, Node 26.1.0 (macOS): full suite 8/8, install-exit-code test mutation-checked (passes with the fix, FAILS without it). The Windows abi147 prebuild was verified on windows-2022 / Node 26.8.1 by a temporary branch gate (now removed): it produced prebuilds/win32-x64/@neuralegion+os-service.abi147.node and node-gyp-build resolved that exact file for the running ABI, zero LNK1117. Full CI is 25/25 green.

Explicitly NOT in scope (DO NOT TOUCH)

  • Any ABI ≤ 141 prebuild target (existing consumers keep working)
  • The non-Windows install path (deliberately does no native work)
  • deploy.yml publish / provenance / GPR steps
  • The C++ sources

Release

The published release must carry the win32-x64 abi147 asset (human npm publish). This unblocks bright-cli's Windows Node 26 CI leg (task 3).

…BI 147)

nan gained Node 26 / V8 14 support in 2.27.0; the lockfile pinned 2.24.0,
which fails to compile on Node 26. node-abi ^4.24.0 mapped Node 26 to abi144
(a stale dev value); ^4.35.0 maps it to 147. Also adds --target 26.8.1 to
build:gyp and build:gyp-cross so the release matrix emits ABI 147.

Refs TM-3894
scripts/install.mjs logged the child exit code but never propagated it, so a
failed Windows native build exited 0 and only surfaced later at require() time
inside the service-install path. Exit with the child's code (and non-zero on
signal/spawn error). Adds an OS_SERVICE_FORCE_NATIVE_INSTALL override so the
Windows-only build path is exercisable on any OS, and a mutation-checked
regression test.

Refs TM-3894
windows-latest (Server 2025 / VS 18) breaks node-gyp VS detection on older
Node; pin the Windows test leg to windows-2022 for legacy coverage.

Refs TM-3894
deploy.yml runs only on release and the Windows prebuild cannot be built on
the macOS dev host, so this branch-push gate builds the Node 26 (abi147)
win32-x64 prebuild on windows-2022, asserts it exists and resolves for the
running ABI, and uploads it. Never publishes. Must be removed before merge.

Refs TM-3894
The test job's npm ci source-builds the native addon on Windows; Node 26's
ThinLTO config makes node-gyp emit the lld-only /opt:lldltojobs that MSVC
link.exe rejects. Set npm_config_enable_thin_lto/enable_lto=false so the
Node 26 Windows test leg builds. Refs TM-3894
@aborovsky aborovsky self-assigned this Sep 3, 2026
@aborovsky aborovsky added the Type: tooling The issues that touch on the build system, linting, test tooling label Sep 3, 2026
The Windows abi147 prebuild is verified (win32-x64/@NeuraLegion+os-service.abi147.node
resolved for the running ABI on windows-2022 / Node 26); the temporary
branch-push gate has served its purpose. deploy.yml produces the release
prebuild. Refs TM-3894
@aborovsky
aborovsky marked this pull request as ready for review September 3, 2026 11:16
The release build job source-builds the win32 abi147 prebuild on Windows,
where Node 26's ThinLTO config makes node-gyp emit the lld-only
/opt:lldltojobs that MSVC link.exe rejects. Set npm_config_enable_thin_lto/
enable_lto=false on the build job's install + prebuild steps so the
release publish does not fail on Windows. Refs TM-3894
@alonchin
alonchin merged commit 5270fd9 into master Sep 3, 2026
24 checks passed
@alonchin
alonchin deleted the fix-#tm-3894/node-26-abi147-win32 branch September 3, 2026 12:10
alonchin pushed a commit that referenced this pull request Sep 3, 2026
## What

Migrate the `deploy.yml` release **build** job off the removed
`windows-2019` runner to `windows-2022`.

## Why

GitHub **removed** the `windows-2019` GitHub-hosted runner image on
**2025-06-30** (deprecation began 2025-06-01) — see
[actions/runner-images#12045](actions/runner-images#12045).
A job that still requests `runs-on: windows-2019` is never assigned a
runner: it hangs indefinitely at `Waiting for a runner to pick up this
job...`. This is exactly what happened to the **v2.0.6** release deploy
(stuck ~1.5h with no runner), which blocks the npm publish of the Node
26 / ABI 147 build.

## Change

`deploy.yml` build job: `os: windows-2019` → `os: windows-2022` (one
line). `windows-2022` is GitHub's recommended successor and is the image
on which the Node 26 `win32-x64` abi147 prebuild was verified to build
cleanly (the LTO-off env for the Node 26 LNK1117 issue is already on
this job). No other change.

## Note

The already-cut **v2.0.6** GitHub release was created from the tag
*before* this fix, so its stuck deploy run won't retroactively recover —
a re-run of that run (or the next release) on the fixed workflow will
publish. `test.yml`'s Windows leg is already on `windows-2022` (from
#81); this was the last `windows-2019` reference in the repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: tooling The issues that touch on the build system, linting, test tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants