Skip to content

fix: let Doctor repair a Git checkout install after its first update (2026.12.1) - #205804

Merged
RomneyDa merged 1 commit into
openclaw:release/2026.12.1from
fuller-stack-dev:backport/2026.11.15-doctor-git-checkout-service
Nov 26, 2026
Merged

RomneyDa merged 1 commit into
openclaw:release/2026.12.1from
fuller-stack-dev:backport/2026.11.15-doctor-git-checkout-service

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Retargeted to release/2026.12.1. That branch continues the former release/2026.11.15 branch: ae07e2709f3, the commit this port was built and tested on, is its ancestor, and none of the five files this port touches has changed on the branch since. The port merges into the current release/2026.12.1 head without conflict. Where the text below says release/2026.11.15, it means that tested commit. The cells were not rerun on the newer head.

Port of #204676 (merged to main as 04d96995063) to release/2026.11.15.

What Problem This Solves

On a Git checkout install, openclaw doctor --fix fails after the first update with "the service belongs to a different OpenClaw installation", although the Gateway service is the installation's own. openclaw update repair stops at the same refusal, and openclaw gateway status --deep reports that the service runs an older version than the CLI. release/2026.11.15 carries Git release mode (#199706) but not this fix, so every Git install that set up its service before updating to a 2026.11.15 build loses the repair path the update messages point to.

User Impact

User impact: on a Git checkout install running a 2026.11.15 release, openclaw doctor --fix and openclaw update repair run their maintenance, and gateway status stops reporting a false version drift. A service that really belongs to another installation is still refused. No configuration, state or service definition changes.

Why This Change Was Made

The branch still has the defect. Service ownership on release/2026.11.15 (ae07e2709f3) follows only a unit that names the release launcher:

  • src/daemon/service-layout.ts:171: return resolveGitReleaseEntrypointForLauncher(entrypoint) ?? entrypoint;
  • src/update/run.ts:476-486 (markForwarding) writes the checkout's forwarding marker (.git/openclaw-launcher) on the first Git release update, so the checkout's dist/index.js starts the release, while ownership still reads the checkout as the service's package root.

This is one git cherry-pick -x 04d96995063 commit. It makes service layout follow the same forwarding marker the checkout's entry follows, and keeps such a definition unchanged like a unit that names the launcher. The reasoning and design are in #204676.

Conflict. The pick conflicts in one expression, refreshDefinition in src/cli/update-cli/update-command-service-plan.ts, because this branch already has #204835 (a Git install switching back to the npm package rebinds its owned definition). The resolution keeps both intents and is the form main has: the package override stays first, and the forwarded-checkout exclusion applies only on the Git side.

refreshDefinition:
  (state.definitionMutationCapability?.kind ?? "writable") === "writable" &&
  (params.updateInstallKind === "package" ||
    (!command.programArguments.some((arg) => path.basename(arg) === GIT_RELEASE_LAUNCHER) &&
      !isForwardedServiceEntrypoint(command))),

After the pick, update-command-service-plan.ts, service-layout.ts and docs/cli/update/how-updates-run.md are byte-identical to origin/main. The hunks in git-release-paths.ts and git-release.test.ts are identical to the original commit's; those two files differ from main only by later main commits this port does not carry. Nothing else from main rides along (5 files, +176/−10). The commit keeps the original author and the (cherry picked from commit …) line.

Update behavior: the fix runs in the release that Doctor and update repair execute, so an install gets it with its next ordinary openclaw update to a release that contains it. The installed updater's code is not involved.

Evidence

Cells: Linux Docker, real systemd user Gateway from openclaw gateway install, a Git checkout installed and built at T0 = release/2026.11.15 head ae07e2709f3 (2026.11.15-beta.1), a 512 MiB agent database under 1 MiB/s Gateway-gated writes. Every update is openclaw update --yes --json (trigger api, three update.run … actor=gateway-client journal lines per cell). T and T+1 are unpublished version bumps (2026.11.15-p1115r.1/.2 in red, 2026.11.15-p1115g.1/.2 in green) of the code under test. Each cell ran once.

Step (same cell) RED: unmodified ae07e2709f3 (cell R1) GREEN: this commit acd794e06f8 (cell G1)
Update T0 → T exit 0, 419 s, outage 12.1 s exit 0, 370 s, outage 11.8 s
gateway status --deep false drift: "CLI 2026.11.15-p1115r.1 … differs from the Gateway service's 2026.11.15-beta.1 at ~/openclaw" no drift reported
doctor --fix --non-interactive --yes exit 1 in 2.1 s: "the service belongs to a different OpenClaw installation"; nothing repaired exit 0 in 56 s: "Gateway restarted and verified after Doctor maintenance" (outage 39 s)
Update T → T+1 exit 0, 389 s, outage 7.1 s exit 0, 359 s, outage 7.3 s
No-op update exit 0 (skipped), 7.0 s exit 0 (skipped), 7.2 s
Doctor again exit 1, same refusal exit 0, 54 s
gateway restart exit 0 exit 0
update repair exit 1, same refusal, hands off to openclaw triage exit 0, "Update finalization completed with warnings" (the warning is the cell's plaintext token)
Service definition after Doctor ExecStart=… /home/appuser/openclaw/dist/index.js gateway unchanged: ExecStart=… /home/appuser/openclaw/dist/index.js gateway

In both cells the checkout's .git/openclaw-launcher names ~/.openclaw/git-install/openclaw-launcher.mjs, git-install/openclaw links to the release Doctor runs from, and after the last step the Gateway served T+1 (/readyz 200).

RED, unmodified release/2026.11.15 (ae07e2709f3), cell R1:

red-R1-replay.mp4

GREEN, this commit (acd794e06f8), cell G1:

green-G1-replay.mp4

The recordings replay each cell's own step outputs; they are not live captures.

Negative control (cell N1, same T0 → T on this commit): a copy of the checkout without the forwarding marker installs the service (node ~/other-openclaw/openclaw.mjs gateway install --force, older-binary guard waived for that one command), and its Gateway serves (2026.11.15-beta.1, MainPID=11803, /readyz 200). Doctor still refuses it: exit 1 in 2.1 s with the unchanged "belongs to a different OpenClaw installation" message, and the same Gateway keeps running. openclaw gateway install --force from the release CLI then writes ExecStart=… ~/.openclaw/git-install/openclaw-launcher.mjs gateway, and Doctor passes (exit 0, 62 s). G1 also ran these two steps at its end, but there the copy's Gateway exited (status=78/CONFIG) before Doctor ran, so Doctor took the stopped-service path; that run is not used as evidence.

Adjacent guard and published driver (cell P1): npm openclaw 2026.11.10, the current latest, with its systemd user service, updated by its own shipped updater to a pack of this commit served as the registry's latest under the unpublished version 2026.11.31: exit 0 in 175 s, outage 72 s, serving 2026.11.31 (acd794e). Then openclaw doctor --fix --non-interactive --yes with the Gateway running: exit 0 in 49 s, "Gateway restarted and verified after Doctor maintenance" (PID 4558 → 7871, outage 32 s), unit unchanged (ExecStart=… ~/um/npm/lib/node_modules/openclaw/dist/index.js gateway). An npm tree has no .git, so the new rule does not apply there.

Decisive raw lines
# RED (R1), after T0 -> T
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/7b3e8d2b-6914-4c1e-972f-440d3e220324/openclaw
--- unit
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 39531
Doctor: maintenance begin
Doctor: maintenance release
Doctor could not enter maintenance. Error: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched. Run openclaw gateway status --deep to find the Gateway installation. [...]
exit=1 ms=2065

# GREEN (G1), after T0 -> T
--- unit
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 36395
Stopped the managed Gateway for Doctor repair.
Restarted systemd service: openclaw-gateway.service
Gateway restarted and verified after Doctor maintenance.
exit=0 ms=55719
MainPID=13553

Raw step output of all four cells (R1, G1, N1, P1): this comment. The full cell directories are not attached: GitHub's attachment upload accepts media only and rejected the zip.

Checks on acd794e06f8
  • Regression tests, red/green: OPENCLAW_VITEST_RUNTIME=node node scripts/run-vitest.mjs src/infra/git-release.test.ts. With this commit's test file on the unmodified branch (ae07e2709f3), 4 of 44 fail: the three forwarding cases (expected { kind: 'foreign' }) and the other-state-directory case (expected '1.0.0' to be '3.0.0'), the same failures fix: let Doctor repair a Git checkout install after its first update #204676 recorded on main. On this commit, 44 of 44 pass. The test file is carried unchanged; I audited all of it and removed nothing.
  • Each run one at a time under Node, all pass: src/daemon/service-layout.test.ts (15), src/cli/daemon-cli/status.gather.test.ts (61), src/cli/run-main-service-installation.test.ts (8), src/commands/doctor-maintenance.{installation,service-identity,service-inspection}.test.ts (33 + 1 skipped, 4, 2), src/infra/restart-intent.test.ts (13), src/update/convert-service.test.ts (4), src/cli/update-cli/update-command-service-{maintenance,install-root,plan}.test.ts (40, 4, 41), and fix: let a Git install switch back to the npm package #204835's tests, which cover the other side of the conflict: update-command-target.git-to-package.test.ts (3) and update-command-original-service.test.ts (50). Also update-command-checkout-link-switch.test.ts (9), src/commands/doctor-gateway-services.authority.test.ts (21), src/infra/update-runner-git-release.test.ts (39), test/scripts/update-restart-module-outcome.test.ts (1).
  • test/scripts/eager-import-closure.test.ts: 23 of 23 pass with a default pnpm install. Under the hoisted install I first used, 8 cases fail with ENOENT … packages/markdown-core/node_modules/mdast-util-from-markdown; that is the install layout, not this change.
  • src/cli/update-cli/update-command-rollback.test.ts: 49 passed, 1 failed (excludes a competing config writer …, setgid mode 0o2770 on macOS). It fails the same way on the unmodified ae07e2709f3.
  • pnpm tsgo:core and pnpm tsgo:core:test: pass. node scripts/run-oxlint.mjs and oxfmt --check on the touched files: clean. git diff --check: clean.
  • Session identity ratchet (scripts/check-session-identity-ratchet.mts --base origin/release/2026.11.15 --no-merge-base): OK.
  • autoreview (Codex, branch mode against origin/release/2026.11.15): scoped-clean, no findings. It checked that the resolution keeps fix: let a Git install switch back to the npm package #204835's package override and that forwarding to another installation does not grant ownership.

Reproduce

  1. Install a Git checkout of release/2026.11.15 (pnpm install, pnpm build:runtime, pnpm add --global openclaw@link:<checkout>), set update.channel to dev, and run openclaw gateway install so the systemd user unit starts <checkout>/dist/index.js.
  2. Point the checkout's upstream main at a version bump of the same tree and run openclaw update --yes.
  3. Run openclaw doctor --fix --non-interactive --yes. Unmodified branch: exit 1, "the service belongs to a different OpenClaw installation". With this commit: exit 0, Gateway restarted and verified.

Not proven

  • macOS LaunchAgent and Windows Scheduled Task services were not run; only Linux systemd user services. Windows forwarding through a junction is not exercised.
  • A Linux container without a user bus was not run.
  • A published 2026.11.15 driver does not exist yet, so every cell here starts from local builds of this branch.
  • update-command-rollback.test.ts fails one macOS-only case locally (also on the base); CI runs it on Linux.
  • PR CI runs src/infra/git-release.test.ts under Bun, where the file skips itself (a skip that predates fix: let Doctor repair a Git checkout install after its first update #204676). Its regression cases ran under Node locally, as listed above.

…penclaw#204676)

* fix(doctor): treat a Git checkout's forwarded service as its own

A Git checkout install keeps the service that `openclaw gateway install`
wrote for the checkout's `dist/index.js`; after the first release update
the checkout's entry forwards to the release launcher. Service ownership
still read the checkout as the service's package root, while Doctor runs
from the release, so `openclaw doctor --fix` and `openclaw update repair`
refused with "the service belongs to a different OpenClaw installation"
and `gateway status` reported a false CLI/service version drift.

Service layout now follows the same forwarding marker the entry follows,
and such a definition is kept unchanged like one naming the launcher.

* fix(doctor): limit forwarded-service ownership to Git checkouts

Follow the forwarding marker only for a Git checkout or linked worktree,
resolve the tree's real path before the release guard, require the
release entry to exist, and check only the service's entrypoint when
keeping its definition. Package trees keep their own service staging.

* docs(update): say which installs keep or restage a checkout service

(cherry picked from commit 04d9699)
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes size: S labels Nov 26, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Recognize forwarded Git checkout services as belonging to their selected release while preserving their service definitions.

Example: A systemd service still starts /home/appuser/openclaw/dist/index.js after the checkout's first release update.

  • Before: Doctor refuses maintenance as a different installation, and status reports false version drift.
  • After: Doctor completes maintenance, status identifies the selected release, and ExecStart remains unchanged.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, worthwhile backport with production-path Linux evidence, distinct regression coverage, and no identified correctness defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): Readable Linux systemd terminal evidence maps the changed resolver to checkout updates, successful Doctor maintenance, corrected status, preserved ExecStart, and successful update repair on acd794e; a published v2026.11.10 driver also upgrades successfully and completes Doctor maintenance. macOS and Windows remain unexercised, and recordings could not be inspected because local preparation and browser fallback failed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: After the first Git checkout update, Doctor and update repair reject the installation's own service, while status reports false version drift.
Reason: This restores the existing maintenance contract on the release branch, and the maintainer-authored direction is already approved.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it backports a verified main fix to an affected release branch, and no actionable patch defect was found.

Reviewed head: acd794e06f86395969774a8fd3644e11db480e2a

Before merge

None.

Findings

None.

Agent review details

How this fits together

Service layout translates installed service commands into effective package identities consumed by Doctor, update repair, and Gateway status.

flowchart TD
  A[Installed service command] --> B[Checkout entry]
  B --> C[Forwarding marker]
  C --> D[Release launcher]
  D --> E[Selected release]
  F[Service layout resolver] --> C
  F --> E
  F --> G[Doctor repair and status]
Loading

Technical review

Best possible solution:

Carry the existing shared identity repair onto the release branch while retaining the package-switch override.

Do we have a high-confidence way to reproduce the issue?

The release-base resolver demonstrably leaves forwarded checkout entries pointing at the checkout, matching the supplied systemd Doctor refusal; fetched main already contains the repair, and this review ran no target code.

Is this the best way to solve the issue?

The patch fixes identity at the shared resolver used by the affected consumers, follows the existing forwarder contract, and preserves foreign-installation comparison without adding persistent state or configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f7c8162d8304; fix evidence: commit 04d96995063b, main fix timestamp 2026-11-24T14:30:39Z.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 6747b1e adds src/infra/git-release-paths.ts:55 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6747b1ec5ae3; files: src/infra/git-release-paths.ts)

PR surface

Source +77, Tests +82, Docs +7. Total +166 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 82 5 +77
Tests 1 82 0 +82
Docs 1 12 5 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 176 10 +166

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 26, 2026, 1:55 AM ET / 06:55 UTC.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Raw step output from the four Docker cells behind this PR's Evidence section, printed from each cell's own recorded files (paths are inside the containers). Exit codes for Doctor and repair are the exit= lines; the process-exit column is the shell wrapper's.

R1, red: unmodified `release/2026.11.15` `ae07e2709f3`
== cell R1  installed T0=ae07e2709f3
   target -> 24eeaa04c13
   target -> 8eb813f2d96
   step u1         process-exit=0 wall=418.7s outage=12.1s
   step roots1     process-exit=0 wall=2.1s outage=0.0s
   step doctor1    process-exit=0 wall=2.1s outage=0.0s
   step u2         process-exit=0 wall=389.1s outage=7.1s
   step noop       process-exit=0 wall=7.0s outage=0.0s
   step roots2     process-exit=0 wall=1.8s outage=0.0s
   step doctor2    process-exit=0 wall=2.2s outage=0.0s
   step restart    process-exit=0 wall=7.7s outage=6.1s
   step repair     process-exit=0 wall=14.7s outage=0.0s
-- roots1: service and links
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/7b3e8d2b-6914-4c1e-972f-440d3e220324/openclaw
--- unit
# /home/appuser/.config/systemd/user/openclaw-gateway.service
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 39531
--- MainPID
MainPID=10392
NRestarts=1
ActiveState=active
--- status
   installationDrift: "CLI 2026.11.15-p1115r.1 at /home/appuser/.openclaw/git-install/releases/7b3e8d2b-6914-4c1e-972f-440d3e220324/openclaw differs from the Gateway service's 2026.11.15-beta.1 at /home/appuser/openclaw. Run `openclaw update` or use the CLI from /home/appuser/openclaw. Run `openclaw doctor --fix` or `openclaw gateway install --force` from the active CLI."
-- roots2: service and links
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/a292e7c4-ad4a-4844-8a4f-226340f6c5cc/openclaw
--- unit
# /home/appuser/.config/systemd/user/openclaw-gateway.service
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 39531
--- MainPID
MainPID=10392
NRestarts=1
ActiveState=active
--- status
   installationDrift: "CLI 2026.11.15-p1115r.2 at /home/appuser/.openclaw/git-install/releases/a292e7c4-ad4a-4844-8a4f-226340f6c5cc/openclaw differs from the Gateway service's 2026.11.15-beta.1 at /home/appuser/openclaw. Run `openclaw update` or use the CLI from /home/appuser/openclaw. Run `openclaw doctor --fix` or `openclaw gateway install --force` from the active CLI."
-- doctor1
   Doctor: maintenance begin
   Doctor: maintenance release
   Doctor could not enter maintenance. Error: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched. Run openclaw gateway status --deep to find the Gateway installation. If an operator-owned launcher override points there, update or remove that override; reinstalling alone will not fix it. Inspect systemd overrides with systemctl cat (-
   exit=1 ms=2065
   MainPID=10392
   NRestarts=1
   ActiveState=active
-- doctor2
   Doctor: maintenance begin
   Doctor: maintenance release
   Doctor could not enter maintenance. Error: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched. Run openclaw gateway status --deep to find the Gateway installation. If an operator-owned launcher override points there, update or remove that override; reinstalling alone will not fix it. Inspect systemd overrides with systemctl cat (-
   exit=1 ms=2210
   MainPID=10392
   NRestarts=1
   ActiveState=active
-- restart
   Restarted systemd service: openclaw-gateway.service
   exit=0
-- repair
   [update finalize] finalize:preflight: completed
   [update finalize] finalize:targetConfigValidation: completed
   Doctor could not enter maintenance. Error: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched. Run openclaw gateway status --deep to find the Gateway installation. If an operator-owned launcher override points there, update or remove that override; reinstalling alone will not fix it. Inspect systemd overrides with systemctl cat (-
   Gateway: verified serving after update failure.
   Next step:
   exit=1
u1: status succeeded trigger api 2026.11.15-beta.1 -> 2026.11.15-p1115r.1
u2: status succeeded trigger api 2026.11.15-p1115r.1 -> 2026.11.15-p1115r.2
noop: status skipped trigger api 2026.11.15-p1115r.2 -> None
G1, green: this commit `acd794e06f8`
== cell G1  installed T0=ae07e2709f3
   target -> 8d6119f8e47
   target -> ac48c545d6c
   step u1         process-exit=0 wall=369.8s outage=11.8s
   step roots1     process-exit=0 wall=1.6s outage=0.0s
   step doctor1    process-exit=0 wall=55.7s outage=39.1s
   step u2         process-exit=0 wall=358.9s outage=7.3s
   step noop       process-exit=0 wall=7.2s outage=0.0s
   step roots2     process-exit=0 wall=1.6s outage=0.0s
   step doctor2    process-exit=0 wall=53.9s outage=36.1s
   step restart    process-exit=0 wall=23.3s outage=6.8s
   step repair     process-exit=0 wall=75.8s outage=49.9s
-- roots1: service and links
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/b4460049-66d9-4a5b-849b-5cc642c0e0e2/openclaw
--- unit
# /home/appuser/.config/systemd/user/openclaw-gateway.service
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 36395
--- MainPID
MainPID=10021
NRestarts=1
ActiveState=active
--- status
   installationDrift: absent
-- roots2: service and links
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/25a3628c-95df-48d2-b69a-30de4a8abcda/openclaw
--- unit
# /home/appuser/.config/systemd/user/openclaw-gateway.service
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 36395
--- MainPID
MainPID=13553
NRestarts=0
ActiveState=active
--- status
   installationDrift: absent
-- doctor1
   Doctor: maintenance begin
   Doctor: maintenance begin (10s elapsed)
   Doctor: Startup channel maintenance
   Doctor: maintenance ready
   Doctor: maintenance finish
   Doctor: maintenance finish (10s elapsed)
   Doctor: maintenance release
   Doctor stopped it because its repairs write state that the running Gateway also writes, and restores it after repairs settle. If forcibly terminated: Keep the Gateway stopped until Doctor (PID 11366) and its repair children have exited. Resolve any storage or cleanup failure, then run `openclaw doctor --fix` to finish and verify repairs. After repair succeeds, run `openclaw gateway status --dee
   Restarted systemd service: openclaw-gateway.service
   Gateway restarted and verified after Doctor maintenance.
   exit=0 ms=55719
   MainPID=13553
   NRestarts=0
   ActiveState=active
-- doctor2
   Doctor: maintenance begin
   Doctor: maintenance begin (10s elapsed)
   Doctor: Startup channel maintenance
   Doctor: maintenance ready
   Doctor: maintenance finish
   Doctor: maintenance finish (9s elapsed)
   Doctor: maintenance release
   Doctor stopped it because its repairs write state that the running Gateway also writes, and restores it after repairs settle. If forcibly terminated: Keep the Gateway stopped until Doctor (PID 22755) and its repair children have exited. Resolve any storage or cleanup failure, then run `openclaw doctor --fix` to finish and verify repairs. After repair succeeds, run `openclaw gateway status --dee
   Restarted systemd service: openclaw-gateway.service
   Gateway restarted and verified after Doctor maintenance.
   exit=0 ms=53922
   MainPID=24761
   NRestarts=0
   ActiveState=active
-- restart
   Restarted systemd service: openclaw-gateway.service
   exit=0
-- repair
   Doctor: maintenance begin
   Doctor: Startup channel maintenance
   Doctor: maintenance ready
   Doctor: maintenance finish
   Doctor: maintenance release
   [update finalize] warning:finalize:doctor:0: completed: Automation Memory Dreaming Promotion (b9477d03-0275-4f84-9fee-f750040bdce9): inference account was not migrated: No model is configured. Choose one in Settings → Models, send `/model <provider/model>` in chat, or run `openclaw models set <provider/model>`. Inspect available accounts with openclaw models auth list --agent main, then expli
   [update finalize] warning:finalize:doctor:1: completed: core/doctor/security: WARNING: openclaw.json contains plaintext secret-bearing config fields.
   Gateway restarted and verified after Doctor maintenance.
   [update finalize] finalize:targetConfigConvergence: completed
   [update finalize] warning:finalize:plugins:0: completed: WARNING: openclaw.json contains plaintext secret-bearing config fields.
   [update finalize] finalize:completionCache: completed
   Restarted systemd service: openclaw-gateway.service
   Update finalization completed with warnings.
   exit=0
u1: status succeeded trigger api 2026.11.15-beta.1 -> 2026.11.15-p1115g.1
u2: status succeeded trigger api 2026.11.15-p1115g.1 -> 2026.11.15-p1115g.2
noop: status skipped trigger api 2026.11.15-p1115g.2 -> None
N1, negative control on `acd794e06f8`
== cell N1  installed T0=ae07e2709f3
   target -> 8d6119f8e47
   step u1         process-exit=0 wall=405.5s outage=12.6s
   step roots1     process-exit=0 wall=1.7s outage=0.0s
   step foreign    process-exit=0 wall=28.2s outage=7.3s
   step reinstall  process-exit=0 wall=85.3s outage=49.3s
-- roots1: service and links
--- marker
/home/appuser/.openclaw/git-install/openclaw-launcher.mjs
--- slot
/home/appuser/.openclaw/git-install/releases/dc133056-ae0e-4075-a00f-e86b769e03cb/openclaw
--- unit
# /home/appuser/.config/systemd/user/openclaw-gateway.service
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/openclaw/dist/index.js gateway --port 39115
--- MainPID
MainPID=10320
NRestarts=1
ActiveState=active
--- status
   installationDrift: absent
-- foreign
   Doctor: maintenance begin
   Doctor: maintenance release
   Doctor could not enter maintenance. Error: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched. Run openclaw gateway status --deep to find the Gateway installation. If an operator-owned launcher override points there, update or remove that override; reinstalling alone will not fix it. Inspect systemd overrides with systemctl cat (-
   install-exit=0
   ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/other-openclaw/dist/index.js gateway --port 39115
   --- before doctor
   MainPID=11803
   NRestarts=0
   ActiveState=active
   exit=1 ms=2108
   MainPID=11803
   NRestarts=0
   ActiveState=active
-- reinstall
   Doctor: Startup channel maintenance
   Doctor: maintenance ready
   Doctor: maintenance finish
   Doctor: maintenance finish (10s elapsed)
   Doctor: maintenance release
   install-exit=0
   ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/.openclaw/git-install/openclaw-launcher.mjs gateway --port 39115
   Doctor stopped it because its repairs write state that the running Gateway also writes, and restores it after repairs settle. If forcibly terminated: Keep the Gateway stopped until Doctor (PID 12825) and its repair children have exited. Resolve any storage or cleanup failure, then run `openclaw doctor --fix` to finish and verify repairs. After repair succeeds, run `openclaw gateway status --dee
   Restarted systemd service: openclaw-gateway.service
   Gateway restarted and verified after Doctor maintenance.
   exit=0 ms=62057
   MainPID=15054
   NRestarts=0
   ActiveState=active
u1: status succeeded trigger api 2026.11.15-beta.1 -> 2026.11.15-p1115g.1
P1, adjacent guard: npm 2026.11.10 updated by its own updater to a pack of `acd794e06f8` (2026.11.31, unpublished), then Doctor
Update target: 2026.11.31
Update safety checks ran in the candidate updater (2026.11.31).
Phases: requested (14.33s) → staging (16ms) → validating (29.44s) → activating (62.06s) → restarting (3.79s) → verifying (15.5s)
Gateway downtime: 72.95s.
u1-H exit 0
$ systemctl --user show -p MainPID,NRestarts,ActiveState openclaw-gateway.service
MainPID=4558
NRestarts=0
ActiveState=active
$ systemctl --user cat openclaw-gateway.service | grep ExecStart
ExecStart=/usr/local/bin/node --max-old-space-size=8017 /home/appuser/um/npm/lib/node_modules/openclaw/dist/index.js gateway --port 45593
$ openclaw --version
OpenClaw 2026.11.31 (acd794e)
$ s=1795675070042396196; openclaw doctor --fix --non-interactive --yes; echo doctor-exit=0 ms=1795675070042
Restarted systemd service: openclaw-gateway.service
Gateway restarted and verified after Doctor maintenance.
doctor-exit=0 ms=49118
$ systemctl --user show -p MainPID,NRestarts,ActiveState openclaw-gateway.service
MainPID=7871
NRestarts=0
ActiveState=active

@fuller-stack-dev fuller-stack-dev changed the title fix: let Doctor repair a Git checkout install after its first update (2026.11.15) fix: let Doctor repair a Git checkout install after its first update (2026.12.1) Nov 26, 2026
@fuller-stack-dev
fuller-stack-dev changed the base branch from release/2026.11.15 to release/2026.12.1 November 26, 2026 07:18
@RomneyDa
RomneyDa merged commit 0d1f92e into openclaw:release/2026.12.1 Nov 26, 2026
161 of 163 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the backport/2026.11.15-doctor-git-checkout-service branch November 26, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants