Skip to content

Require Node 22.0.0 - #107

Merged
RyanSaxe merged 1 commit into
developfrom
node-floor
Oct 6, 2026
Merged

RyanSaxe merged 1 commit into
developfrom
node-floor

Conversation

@RyanSaxe

@RyanSaxe RyanSaxe commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

pair now requires Node 22.0.0 or newer.

Why

Node before 20.12.0 can spin at 100% CPU forever while a process exits (nodejs/node#47748, fixed by nodejs/node#51290 in 20.12.0). Freeing the process's environment runs a pending FinalizationRegistry cleanup that may no longer call into JavaScript, and the cleanup posts itself again. It hung CI's test (20.1.0) job: three of the six CI hangs before today ran on 20.1.0, and today that job hung again on #103 and #104. In a node:20.1.0 container, 3 of 37 full-suite runs hung under load, and gdb showed each stuck process in FreeEnvironment → NodePlatform::DrainTasks → FinalizationRegistryCleanupTask::RunInternal. A pair command talks to the hub with fetch and exits on its own, so it can hit the same bug.

Node 20 also reached its end of life on April 30, 2026, so this raises the floor to the oldest Node line that Node still supports, rather than to 20.12.0.

Changes

  • package.json and package-lock.json: engines.node is >=22.0.0. requireNode() and pair check read it from there, so no code changed.
  • .github/workflows/ci.yml: the test matrix runs Node 22.0.0, 22 and 24, and its comment names the checks both rulesets require.
  • README.md, docs/getting-started/install.md, docs/contributing/README.md and guide/setup.md: "Node 22.0.0 or newer".

Evidence

  • node --test on Node 22.0.0: 261 of 261 pass.
  • A six-line reproduction of the Node bug, a FinalizationRegistry whose target dies during exit, exits at once on 22.0.0 and spins on 20.1.0 until killed.
  • pair check on 22.0.0 prints node 22.0.0, and pair needs 22.0.0 or newer. On 20.12.0, pair refuses with pair: Node 22.0.0 or newer is required.
  • Prettier and actionlint pass on the changed files.

Before it merges

Both rulesets (develop: no force-push or deletion, and green checks, id 24093538, and main: releases only through green pull requests, id 24093537) require checks named test (20.1.0) and test (20). After this change no job has those names, so GitHub blocks this pull request, and every one after it, until both rulesets require test (22.0.0) and test (22) in their place.

#100 also changes ci.yml. It passes --test-timeout on every job except Node 20.1.0, and the two merge without a conflict. After both merge, every job gets the flag, and #100's comment about 20.1.0 needs updating.

🤖 Generated with Claude Code

@RyanSaxe
RyanSaxe marked this pull request as ready for review October 6, 2026 22:28
Node before 20.12.0 can spin at 100% CPU forever while a process exits
(nodejs/node#47748, fixed by nodejs/node#51290 in 20.12.0). It hung the
CI test job on Node 20.1.0, and a pair command, which talks to the hub
with fetch and exits on its own, can hit it too. Node 20 also reached
its end of life on April 30, 2026, so pair now requires the oldest Node
line that Node still supports.

engines.node is >=22.0.0, so requireNode() and pair check name 22.0.0.
CI tests 22.0.0, 22 and 24 in place of 20.1.0, 20 and 24, and the
README, the docs and guide/setup.md say Node 22.0.0 or newer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@RyanSaxe RyanSaxe changed the title Require Node 20.12.0 Require Node 22.0.0 Oct 6, 2026
@RyanSaxe
RyanSaxe merged commit 6066964 into develop Oct 6, 2026
18 checks passed
@RyanSaxe
RyanSaxe deleted the node-floor branch October 6, 2026 23:10
This was referenced Oct 6, 2026
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