Repository navigation
fix(node): broken Node service suggests repairing the Gateway - #129545
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 2:49 PM ET / 18:49 UTC. ClawSweeper reviewWhat this changesThe PR derives Node and Gateway repair commands from the service being acted on, preserving active profile or container formatting. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof is added - 3 items remain No blocking code findings: this is the shared-owner fix for the confirmed Node guidance defect. It needs inspectable after-fix terminal or JSON output before merge; likely related people: Shakker (high confidence). Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherNode and Gateway CLI lifecycle commands delegate service checks and recovery guidance to a shared lifecycle owner. That owner emits formatted install or restart commands in human and JSON responses. flowchart LR
A[Node or Gateway command] --> B[Service adapter]
B --> C[Shared lifecycle owner]
C --> D{Service needs repair}
D --> E[Command formatter]
E --> F[Terminal or JSON guidance]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +36. Total +34 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single service-identity-derived command path and attach redacted after-fix Node and Gateway lifecycle output before merging. Do we have a high-confidence way to reproduce the issue? Yes—current main passes Is this the best way to solve the issue? Yes—the shared lifecycle owner already owns the service identity and command construction, so deriving guidance there fixes Node and preserves Gateway without a Node-specific workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f18aeabf3d3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
da6cb3f to
32f18a8
Compare
|
The PR body now contains actual built-CLI and native-systemd proof at @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…aw#129545) * fix(node): target node service in repair commands * fix(node): recommend reinstalling stale service definitions
What Problem This Solves
The shared service-start code told operators to repair the Gateway when the broken installed service was a Node host. The earlier version of this PR changed the running-service hint to
node restart, but native testing showed that restart does not rebuild a stale Node service definition: it retains the missing executable and can leave the service failed.Both stopped and already-running Node services now recommend
openclaw node install --forcewhen their installed definition needs repair. Gateway keeps its existing recovery commands.Why This Change Was Made
The fix stays in the shared lifecycle message owner. It derives the service command through the existing profile/container-aware formatter and selects restart only when the caller supplies the repair callback that can rebuild the definition. Node has no such callback; Gateway does. Redundant hint temporaries are removed, and structured install hints retain
kind=install. No service lifecycle behavior, profile selection, or ownership guard changes.Source at
32f18a840e4c1ddfff77639154d50790756ffef3:Combined delta against
18c801daa1165f0bb7f30576b52f6642ff023233: production +8/-8, net 0; tests +91/-48, net +43. Only the lifecycle owner and its existing test file change.Verification
install --forcebut receivedrestart. Tests now use an actually missing executable, without supplying the artificialexpectedPortthat the real Node caller never passes.pnpm build: passed. Actual native-service proof and an independent source-blind operator validation both passed. The runtime contains the production bytes in the published head; the final subsequent source edit only clarified a test title.The native proof used Blacksmith Testbox, a dedicated disposable OS account with its canonical HOME/state and systemd user manager, and a credential-free environment. A task-owned executable was started by a real native unit and then deleted while its process remained running. No operator services were used. This proves the missing-executable recovery path; it is not provider, Gateway connectivity, or package-publication proof.
Native CLI and service evidence
Redacted excerpts from the captured native runs; isolated paths/PIDs are replaced and unrelated output fields are omitted.
openclawwas invoked through the supplied built CLI executable. The old and new commands were exercised on the candidate's unchanged lifecycle implementation, not on a separately built historical binary.The earlier proposed command did not repair the definition:
The independent operator then followed the new hint exactly, replacing only the executable spelling with the supplied built CLI path:
The JSON start also had no repair warning afterward. Native PID, process start time, loaded
ExecStart, and the on-disk unit were checked independently of CLI success. Before repair, human/JSON starts preserved the original process and definition. Gateway human/JSON starts still recommendedopenclaw gateway restartand retained their original process/definition; Gateway repair was not executed. Profile and container formatting were checked separately and together, with container context winning.A wrapper unexpectedly synchronized the source checkout despite
--no-sync, so independent validation paused. The production source hash still matched the built candidate, and all dist mtimes preceded that sync. Validation resumed against a separate copied runtime mounted read-only. Its 11,793-file dist digest matched before copying, after copying, and after validation:f05c8768990097e5c7b2e05855850d678b67c4102824879cee2001e4ea79b42e. No pre-sync aggregate digest is claimed.Cleanup passed: both disposable services, the test accounts, canonical state, runtime copies, and mounts were removed. The Testbox was stopped and its provider status independently read back as
completed.Explicit Scope / Follow-up
Node named-profile service support and actionable ownership refusal remains a separate follow-up. The actual
openclaw --profile work node install --force --jsoncommand is rejected by the existing guard:The Node adapter supplies the fixed Node service identity itself; unsetting the caller's selector does not remove it. Existing history and the native install-identity contract do not establish named-profile Node service support. This PR does not weaken that guard or discard profile context. Default native repair is proved; profile command formatting is proved; named-profile installation and actual container dispatch are not claimed.
Provenance
The stopped-service Gateway install hint was added in 3b1a020ebaec, authored and committed by @steipete on 2026-05-02; GitHub returned no associated PR. The running-service Gateway restart warning was added by #110583, commit
fab3cdf1d8e2e716e006d6840ba34bcb1d347c4a, authored by @steipete and merged by @steipete on 2026-07-18. This PR is also authored by @steipete. Provenance was verified through live commit patches/PR metadata because local blame stops at a shallow-history boundary.The latest ClawSweeper request for current-base focused proof and actual operator output is addressed above. Exact-head hosted CI and the final maintainer landing decision remain required; this body does not claim that the PR is merged.