Skip to content

ci(release): pin release + publish jobs to Node 22#207

Merged
efenocchi merged 1 commit into
mainfrom
fix/release-node22
May 26, 2026
Merged

ci(release): pin release + publish jobs to Node 22#207
efenocchi merged 1 commit into
mainfrom
fix/release-node22

Conversation

@efenocchi
Copy link
Copy Markdown
Collaborator

@efenocchi efenocchi commented May 26, 2026

Why

The Release workflow failed on the merge commit of #206 (run 26430516153). Main is intact (the failure was before the 2-commit release pair landed) but v0.7.55 was never tagged or published.

Root cause

Node Outcome
ci.yaml (passed) 22 prebuild ABI match → install clean → ensure-tree-sitter no-op
release.yaml (failed) 24.12 prebuild ABI mismatch → fall-back compile → fail (binding.gyp does not request C++20 Node 24 requires) → tree-sitter (optional dep) dropped from node_modules → tsc later fails with Cannot find module 'tree-sitter'

The ensure-tree-sitter.mjs postinstall heal added by #206 prints WARNING: tree-sitter bindings still unavailable and exits 0 (non-fatal by design), so the failure surfaces downstream in tsc instead of at install time.

Fix

Pin release.yaml's release job and its publish job to node-version: 22, matching ci.yaml. package.json engines is >=22.0.0 so this is within the supported range; bundles produced by Node 22 stay forward-compatible with end-user Node 24 runtimes.

Follow-up (not in this PR)

  • publish-smoke-test.yaml is also pinned to 24.12 but is workflow_dispatch only, so it does not affect the automatic release pipeline. Will align as part of the next follow-up.
  • ci.yaml should grow a Node version matrix (e.g. [22, 24]) so this class of cross-Node-major install regression fails on the PR rather than on the post-merge Release run. Separate PR.
  • ensure-tree-sitter.mjs should exit non-zero when its heal fails AND CI=true, turning the silent warning into a red light. Same follow-up PR.

Test plan

  • Merge → Release workflow runs on Node 22 → no tree-sitter ABI / build failure
  • v0.7.55 (or next patch) gets tagged + published to npm + ClawHub
  • publish-smoke-test dry-run can still be invoked manually (no auto-run change in this PR)

Summary by CodeRabbit

  • Chores
    • Updated build environment configuration for release and publish processes.

Review Change Stack

The Release workflow failed after PR #206 merged. tree-sitter@0.21.x ships
a linux-x64 prebuild whose ABI no longer matches Node 24, and its
binding.gyp does not request the C++20 standard Node 24's V8 headers now
require. Under Node 24.12 (what release.yaml was pinned to) npm install
falls back to a from-source compile that fails, and because tree-sitter
is now in optionalDependencies it gets silently dropped from
node_modules. The ensure-tree-sitter.mjs postinstall heal logs
"bindings still unavailable" and exits 0 (non-fatal by design); the
following tsc step then fails with
  Cannot find module 'tree-sitter' or its corresponding type declarations.

CI did not catch this because ci.yaml runs on Node 22, where the
prebuild matches and the heal short-circuits cleanly. Aligning the
release job (and the publish job that follows it) to the same Node
version closes the immediate drift.

package.json engines is ">=22.0.0", so this is within the supported
range. Bundles produced by Node 22 stay forward-compatible with
end-user Node 24 runtimes — only the build host needs the matching ABI.

Detection gap separately: ci.yaml should grow a Node version matrix so
this class of regression fails on the PR instead of on main. Follow-up
PR.

publish-smoke-test.yaml is also pinned to 24.12 but is workflow_dispatch
only, so it does not affect the automatic release pipeline. Same
follow-up will align it.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9cb7334b-4f9c-45ba-a992-9b21e6977a3a

📥 Commits

Reviewing files that changed from the base of the PR and between 1732489 and d3518a0.

📒 Files selected for processing (1)
  • .github/workflows/release.yaml

📝 Walkthrough

Walkthrough

This pull request updates the GitHub Actions release workflow to pin Node.js version 22 for both the release and publish jobs, replacing the previous pinned version 24.12. The change aligns Node.js versions across CI builds, release job rebuilds, and publish-time installs.

Changes

Node.js Version Pin Update

Layer / File(s) Summary
Pin Node.js to version 22 in release and publish jobs
.github/workflows/release.yaml
Release job and publish job actions/setup-node steps updated from Node.js 24.12 to version 22, with comments describing ABI/build compatibility alignment.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through CI with glee,
Node twenty-two's the version key,
From twenty-four, a hop back down,
Release and publish align in town!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: pinning Node.js to version 22 in the release and publish jobs.
Description check ✅ Passed The description is comprehensive, explaining the root cause, fix, and follow-ups. However, the test plan section is incomplete with unchecked boxes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-node22

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

No src/*.ts files changed in this PR.

Generated for commit b618557.

@efenocchi efenocchi merged commit ba3040e into main May 26, 2026
5 checks passed
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