| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The import ordering in this file drifted from the prettier-plugin-organize-imports output. The CI check job runs lint, typecheck and test but not format, so the drift was not caught and it blocks the pre-commit hook.
The optimization helpers asked V8 to optimize a function with %OptimizeFunctionOnNextCall without first marking it via %PrepareFunctionForOptimization. V8 used to ignore the missing marker, but since V8 14.6 (Node 26) the mismatch is a fatal CHECK failure that aborts the process with exit code 133. Analysis mode is unaffected because --no-opt discards the optimization request before the check runs, so this only shows up in walltime mode and in uninstrumented runs under the runner's node shim, which still harvests --allow-natives-syntax. Both natives calls have to stay inline in the exported helpers: a shared helper that only touches `fn` inside an eval string looks like it ignores its parameter, and the bundler drops the argument at the call site. Refs COD-3391
Add Node 26 to the CI matrix, ship a prebuild for its ABI (147) and move the pinned toolchain onto it. SUPPORTED_NODE_MAJORS mirrors the build-native-addon targets, so it gains 26 as well. .nvmrc pins 26.8.1 rather than 26.8.0: the 26.8.0 release reports its own version as 26.8.0-alpha.0.0.0, and node-gyp derives the headers URL from process.version, so building the native addon 404s on that release. Fixes COD-3391
Merging this PR will regress 22 benchmarks⚠️ Unknown Walltime execution environment detected⚠️ Different runtime environments detected
⚡ 26 improved benchmarks Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent. Comparing cod-3391-support-nodejs-v26 (b414596) with main (9338d9a) |
Sorry, something went wrong.
Greptile SummaryAdds Node.js 26 support across the development toolchain, compatibility CI, native prebuild targets, and supported-version reporting.
Confidence Score: 5/5The PR appears safe to merge, with Node 26 support consistently represented in CI, native prebuild targets, runtime support reporting, and V8 optimization handling. The changed optimization sequence satisfies the newer V8 requirement, its abort-prone behavior is covered in spawned-process tests, and the Node 26 support declarations remain aligned with native build targets and CI coverage. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Node 26 toolchain] --> B[CI compatibility matrix]
A --> C[Native addon build]
C --> D[ABI 147 prebuild]
D --> E[Core native binding]
F[Benchmark callback] --> G[Prepare for optimization]
G --> H[Warm-up calls]
H --> I[Optimize on next call]
I --> J[Measured benchmark execution]
Reviews (1): Last reviewed commit: "feat: support Node 26" | Re-trigger Greptile |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adds Node 26 to the CI matrix, ships a prebuild for its ABI (147), and moves the pinned toolchain onto it.
.nvmrc pins 26.8.1, not 26.8.0
The 26.8.0 release reports its own version as 26.8.0-alpha.0.0.0 — an upstream packaging slip, since the official binary tarball says the same thing. node-gyp derives the headers URL from process.version, so compiling the native addon against it 404s:
That fires during plain pnpm install, because a package with a binding.gyp and no install script gets an implicit node-gyp rebuild. 26.8.1, released a day later, reports a clean 26.8.1 and has the same ABI, so pinning it is the whole fix.
The CI matrix entry is "26", which floats to the latest 26.x and so was never affected.
V8 14.6 turns a tolerated natives mismatch into a fatal abort
optimizeFunction / optimizeFunctionSync requested %OptimizeFunctionOnNextCall(fn) without first marking the function via %PrepareFunctionForOptimization(fn). V8 used to ignore the missing marker; as of V8 14.6 it is a fatal CHECK:
The process dies with exit 133. This is mode-dependent, which is why it is easy to miss: analysis mode passes --no-opt, which discards the optimization request before the check runs. So simulation is fine and walltime aborts — as does any uninstrumented run under the runner's node shim, which still harvests --allow-natives-syntax.
Unlike the version-string issue this is a real V8 change, and it reproduces on 26.8.1.
Worth a careful look at one detail: both natives calls have to stay inline in the exported helpers. My first attempt factored the new call into a shared helper, and rollup silently dropped the argument at the call site (prepareForOptimization()), because fn is only ever referenced inside an eval string. That produced a different fatal CHECK (IsJSFunction(args[0])). There is a comment on the code saying so.
The new test in packages/core/tests/optimization.integ.test.ts spawns a child with --allow-natives-syntax against the built package, since an aborting process cannot be observed from an in-process assertion. It was verified to fail on both bug variants before the fix.
Prebuild and supported-version list
build-native-addon gains --target 26.0.0 for ABI 147. SUPPORTED_NODE_MAJORS mirrors those targets by its own doc comment, so it gains 26 too — otherwise every Node 26 user gets an "unsupported version" annotation. nodeVersion.integ.test.ts asserted that 26 warns, so its cases move accordingly.
Verification
Run against real 22.22.2 / 24.19.0 / 26.8.1 toolchains, sequentially: install --frozen-lockfile, build, lint, typecheck, test, 17/17 bench scripts, and a shim replay using the runner's actual node.sh to confirm the injected V8 flags survive (the no-shim control does report missing flags, so the check is not vacuous). All three core test suites pass on 26.8.1.
The install step was re-run with lifecycle scripts explicitly enabled, since that is what exercises the implicit node-gyp rebuild — the path that produced the 404 above.
Two pre-existing items, unchanged here: benchmark.js-plugin/tests/index.integ.test.ts fails identically on all three versions when the repo is checked out as a git worktree (benchmark URIs pick up the worktree directory name), and packages/core/src/native_core/linux_perf/utils.h calls raw v8::String::Utf8Value in a --no-napi prebuild. The latter only bites when one working tree is reused across majors, because Node 24 does not export the 2-arg constructor; each CI job builds against its own Node, so CI is unaffected.
The first commit is an unrelated prettier ordering fix. The check job runs lint, typecheck and test but not format, so the drift went unnoticed and blocked the pre-commit hook.
Fixes COD-3391