Repository navigation
fix(update): replace unsupported Gateway service Node runtimes - #143159
Conversation
Treat unsupported recorded Node versions as a required service refresh, prefer the supported CLI runtime, and preserve existing force and ownership boundaries. Report successful Node replacement through POSIX installers without exposing incidental child output. Cover launchd/systemd definition repair and the target-engine guidance already corrected by #142322. Refs #107930
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 9, 2026, 10:58 AM ET / 14:58 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR refreshes managed Gateway services whose recorded Node executable is unsupported, missing, or non-executable, and reports successful replacement through POSIX installers. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful, bounded repair absent from the inspected main and release. No blocking patch defect was found; the previous native-service proof concern does not establish an additional merge gate for this maintainer-authored change. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway service installer converts CLI options and existing service settings into a native service definition. Its runtime selector chooses the Node executable that will run the Gateway after installation. flowchart TD
A[Gateway install or installer refresh] --> B[Read existing service]
B --> C[Check recorded Node]
C --> D[Keep supported runtime]
C --> E[Select supported replacement]
E --> F[Check service ownership]
F --> G[Install service definition]
G --> H[Report installation outcome]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +268, Docs +1, Other +8. Total +343 across 11 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep runtime repair in the shared installer, preserving supported runtimes, wrappers, service ownership, and existing settings through the canonical install plan. Do we have a high-confidence way to reproduce the issue? Yes, from source: an otherwise current loaded service pointing at an unsupported Node can return already-installed on main without runtime repair. The PR reports failing-before regression coverage; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing runtime selector and service-install plan addresses the direct install gap without changing supported private-runtime preference or provisioning Node globally. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4b9ff9dd206b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Recover missing or non-executable recorded Node paths through the existing supported-runtime selection and service install plan. Keep genuine probe failures actionable with the recorded path and a force-install hint, and recognize the missing-runtime notice in the POSIX installers. Refs #107930
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…law#143159) * fix(update): replace unsupported Gateway service Node runtimes Treat unsupported recorded Node versions as a required service refresh, prefer the supported CLI runtime, and preserve existing force and ownership boundaries. Report successful Node replacement through POSIX installers without exposing incidental child output. Cover launchd/systemd definition repair and the target-engine guidance already corrected by openclaw#142322. Refs openclaw#107930 * fix(daemon): replace missing Gateway service Node on install Recover missing or non-executable recorded Node paths through the existing supported-runtime selection and service install plan. Keep genuine probe failures actionable with the recorded path and a force-install hint, and recognize the missing-runtime notice in the POSIX installers. Refs openclaw#107930
Refs #107930
What Problem This Solves
Fixes an issue where users running
openclaw gateway installafter upgrading Node could be told the service was already installed while its recorded Node executable was unsupported. A macOS field report described Homebrew Node 26.8.1 and OpenClaw 2026.9.3 installed successfully while the LaunchAgent still referenced another tool's Node 22.23.1; forcing a reinstall recovered the Gateway.The contradictory update-preflight guidance is already repaired on this base by #142322 (thanks @SunnyShu0925). This change adds explicit coverage for Node 22.23.2, 24.15.0, 25.9.0, and 26.0.0 against the target package's engine range.
Why This Change Was Made
The shared Gateway install command now probes the recorded Node with the existing runtime classifier and treats an unsupported executable as a required refresh. Repair prefers the supported running CLI Node, retaining stable Homebrew paths, then uses the existing supported-system-node selection. The chosen runtime goes through the normal service install plan. Supported services, explicit wrappers, Bun selection, and service-definition ownership rules retain their existing behavior.
POSIX installer refreshes retain a fixed confirmation that Node was replaced after installation succeeds, while continuing to suppress incidental child output and runtime paths. Failed refreshes cannot report a successful runtime replacement.
User Impact
Missing or non-executable recorded Node binaries now trigger the same supported-runtime replacement, while genuine probe failures on an existing executable retain an actionable
openclaw gateway install --forcehint.Users can repair a stale unsupported service Node by running
openclaw gateway installfrom a supported Node without adding--force. Installer and update refreshes share that repair. Genuine probe failures and missing supported replacements produce actionable errors instead of an already-installed result.Evidence
install.shtests and 106install-cli.shtests, including success, failed refresh, output filtering, and no duplicate restart.node scripts/check-changed.mjs: passed, including production/test typechecks, lint, ratchets, unused-export scans, and runtime/security boundary guards.git diff --checkand Bash syntax checks pass.The definition fixtures use the real install plan and serializers, temporary files, a simulated obsolete Node, and the real supported CLI Node. Native service managers were not started. Windows-specific installer forwarding is outside this patch; PowerShell execution was unavailable locally. The broader preference question for an already-supported private Node in #107930 remains open. Maintainer review and landing are pending.
Compatibility evidence: this PR changes no SQLite schema, persisted user-data format, or store retention/recovery rules and introduces no service-definition format. Existing readers decode the recorded launchd/systemd definitions and the normal install plan writes their replacements. Upgrade fixtures cover unsupported, missing, and non-executable recorded Node paths with and without force, verify the Gateway entrypoint is retained, and keep supported-runtime, explicit-wrapper, genuine-probe-error, and definition-ownership controls covered. No database migration or backfill is needed.
Follow-up validation: eight missing/non-executable definition cases failed before repair and pass afterward; malformed-version and missing-notice regressions also fail before/pass after. All 173 requested owner tests, six focused installer-notice cases, and
node scripts/check-changed.mjspass. Independent follow-up autoreview is clean at P0/P1. Hosted CI is green forf8066edee26fd9208464b8863ed0e956c187ca88: https://github.com/openclaw/openclaw/actions/runs/34366200361. No rerun was needed on this head.