Skip to content

fix(macos): align minimum Node.js version with runtime guard (22.12.0)#14666

Closed
sumleo wants to merge 4 commits intoopenclaw:mainfrom
sumleo:fix/macos-node-version-mismatch
Closed

fix(macos): align minimum Node.js version with runtime guard (22.12.0)#14666
sumleo wants to merge 4 commits intoopenclaw:mainfrom
sumleo:fix/macos-node-version-mismatch

Conversation

@sumleo
Copy link
Copy Markdown
Contributor

@sumleo sumleo commented Feb 12, 2026

Summary

  • macOS RuntimeLocator.swift uses minNode = RuntimeVersion(major: 22, minor: 0, patch: 0) while the actual minimum enforced by runtime-guard.ts and package.json engines field is >=22.12.0.
  • Error messages also reference >=22.0.0 instead of >=22.12.0.
  • Users with Node 22.0.0–22.11.x see the macOS message, believe they have a compatible version, then encounter a different failure from the runtime guard.

Fix

  • Update minNode to RuntimeVersion(major: 22, minor: 12, patch: 0)
  • Update error messages from >=22.0.0 to >=22.12.0

Test plan

  • Verify macOS app correctly rejects Node versions below 22.12.0
  • Verify macOS app accepts Node 22.12.0 and above
  • Verify error messages display the correct minimum version

Greptile Overview

Greptile Summary

This PR updates the macOS runtime locator to require Node.js >=22.12.0 (instead of >=22.0.0) and adjusts the user-facing error strings to match. The change makes the macOS app’s preflight check consistent with the repository’s runtime guard / engines constraints, preventing users on Node 22.0.0–22.11.x from getting a misleading “supported” message before failing later.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • The change is a straightforward constant and string update in a single macOS Swift file, and it makes the minimum Node version check consistent with the repository’s enforced runtime requirements. No behavioral changes beyond earlier rejection + corrected messaging are introduced.
  • apps/macos/Sources/OpenClaw/RuntimeLocator.swift

The macOS RuntimeLocator.swift uses minNode of 22.0.0 while the actual
minimum enforced by runtime-guard.ts and package.json engines is
22.12.0. Users with Node 22.0.0-22.11.x see the macOS error message
suggesting they have an incompatible version, install what they believe
is a compatible version, then hit a different error from the runtime
guard. Update minNode and error messages to 22.12.0.
Wrap single-line computed property bodies onto multiple lines to
satisfy the swiftformat wrapPropertyBodies rule.
@sumleo
Copy link
Copy Markdown
Contributor Author

sumleo commented Feb 12, 2026

@cpojer Could you help review this PR? Thanks!

@rmdmattingly
Copy link
Copy Markdown

CI failing (macos): SwiftFormat lint failing across many files (100/204 files require formatting).

Fix: run the repo SwiftFormat/formatting step for apps/macos (whatever CI uses), commit the formatting changes, and rerun.

@rmdmattingly
Copy link
Copy Markdown

The failing check is macos and it’s a SwiftFormat lint failure (not a TS/node failure).

Near the end of the job:

  • SwiftFormat reports many style violations (e.g. sortImports, wrapPropertyBodies, blankLinesBetweenScopes, etc.) across macOS app sources.
  • Summary: 100/204 files require formatting and the job exits non-zero.

Next steps:

  1. Run the repo SwiftFormat command locally (whatever CI uses) and commit the formatting output, OR adjust the workflow to only lint changed files if that’s the intent.
  2. Re-run CI.

I didn’t push changes because this looks like a large formatting sweep / tooling mismatch that should be owned by the PR author/maintainer.

Run swiftformat with the repo .swiftformat config to fix 100/204 files
that had pre-existing formatting violations (sortImports,
wrapPropertyBodies, blankLinesBetweenScopes, docComments, etc.).
@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 12, 2026
@ImLukeF ImLukeF self-assigned this Mar 14, 2026
@ImLukeF
Copy link
Copy Markdown
Contributor

ImLukeF commented Mar 14, 2026

Superseded by #45640.

I rebuilt this as a clean replacement PR on current main so it only carries the intended runtime-version fix and test update, without the broad SwiftFormat conflict surface from this branch.

Credit to @sumleo for the original report and fix direction here.

Replacement PR: #45640

@ImLukeF ImLukeF closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos size: XL stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants