Skip to content

fix(cli): restore dashboard Gateway start and install recovery - #202085

Merged
roboclaw-bot merged 2 commits into
openclaw:mainfrom
LiuwqGit:feat/issue-202037-dashboard-gateway-recovery
Nov 20, 2026
Merged

roboclaw-bot merged 2 commits into
openclaw:mainfrom
LiuwqGit:feat/issue-202037-dashboard-gateway-recovery

Conversation

@LiuwqGit

@LiuwqGit LiuwqGit commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI-assisted: yes

Closes #202037

What Problem This Solves

  • Fixes an issue where openclaw dashboard could never start or install the Gateway when it was stopped or absent: the command printed "Use the owning environment or supervisor to start or repair the selected Gateway." and exited 1, even with --yes or after accepting the prompt, so the documented start/install recovery never ran and the usual gateway start / gateway run hints were suppressed.
  • Related: [Bug]: openclaw dashboard can never start or install the Gateway (--yes and the start prompt are unreachable) #202037 (traced in source at main @ 59ca885). The readiness probe forwarded the dashboard's internally resolved URL as a probe override; the daemon status reader classifies any URL override as diagnostic-only, so the native service was never the recovery target and the start/install branch was unreachable.

Why This Change Was Made

  • Readiness probes the same endpoint the dashboard selected. It can start or install the native service only when that service owns the selected endpoint; explicit gateway status --url remains diagnostic-only.
  • Out of scope: gateway status --url keeps classifying explicit URL overrides as diagnostic-only (intended and already tested in status.gather.test.ts); externally supervised or non-default-identity targets remain unrecoverable from the dashboard.
  • The maintainer correction addresses the P1 endpoint-selection finding, including a caller-only port override that is absent from the installed unit.

User Impact

  • Success criteria: With the Gateway stopped or absent on a default local install, openclaw dashboard offers to start or install the background Gateway service (or does so immediately with --yes) and prints the openclaw gateway start / openclaw gateway run hints again instead of the misleading supervisor message; dashboard --json still never installs or starts a service.
  • The status-boundary regressions cover mismatched service/CLI ports and a matching service port. Dashboard tests still cover JSON mode without service recovery and re-probing a changed custom-bind endpoint.

Evidence

Maintainer correction: exact-head Linux proof

Verified commit b15f9564fc30a49ba29de63ebbafb0977bf8444a on a disposable AWS Linux VM with a real systemd user manager. Built the CLI and Control UI with pnpm build:ci-artifacts.

Scenario Observed result
Healthy foreground Gateway on 28900; installed native service on 28789 stopped Both dashboard --no-open and dashboard --yes --no-open exited successfully, printed the dashboard URL on 28900, and left the native service inactive.
Native service absent, then installed but stopped dashboard --yes --no-open installed or started the native service as appropriate and returned the real Control UI on 28789 in both cases.
Native service absent; dashboard --json Exited nonzero and left the native unit absent.

Two status-boundary cases failed on the original PR head and passed with the correction. All 86 focused tests across daemon status, dashboard, and Gateway readiness passed; formatting and git diff --check passed. Browser launch, clipboard delivery, and interactive-prompt acceptance were not part of this headless run.

Independent live Linux systemd verification (original PR head)

Tested the built CLI and Control UI from exact PR head e3df91f68298c53d8198d233c046dc2e387c230b on a disposable AWS Crabbox VM with a fresh systemd user, real loopback Gateway, and no model-provider credentials. Built with pnpm build:ci-artifacts and ran the production CLI entry point, node openclaw.mjs dashboard --yes --no-open.

Starting state Observed result
No service installed; dashboard --json Exited nonzero and left the unit absent.
No service installed; dashboard --yes --no-open Installed the real user unit, reached active, and printed Dashboard URL: http://127.0.0.1:28789/dashboard-proof/.
Installed unit explicitly stopped; dashboard --yes --no-open Printed Started systemd service: openclaw-gateway.service, reached active, and printed the same dashboard URL.

In both recovery cases, an independent HTTP request returned the actual OpenClaw Control UI document; a follow-up dashboard --json returned ok: true, port 28789, and a one-time browser pairing URL (not included here). --no-open was intentional: interactive prompting and browser launch/pairing were not exercised. The VM lease was released after verification.

Contributor's original Linux verification

  • Real environment tested: Linux (EL8) with the real systemd user manager and live port probes; the worktree CLI sources were executed directly (tsx) against the machine's real service discovery and ports — no mocks in the evidence path.
  • Exact steps or commands run after this patch:
    # Real gatherDaemonStatus comparison, pre-fix call shape vs fixed call shape
    # (profile-isolated unit absent, port 18790 free):
    OPENCLAW_PROFILE=evid202037 OPENCLAW_GATEWAY_PORT=18790 DASHBOARD_PROBE_PORT=18790 \
      node --import ./scripts/tsx.mjs evidence-composition.mts
    # Real dashboard command, before (origin/main) and after (this patch), no TTY:
    OPENCLAW_PROFILE=evid202037 OPENCLAW_GATEWAY_PORT=18790 \
      node --import ./scripts/tsx.mjs evidence-dashboard-driver.mts
    # Regression tests (RED on main, GREEN with this patch) via validate.sh:
    #   src/commands/gateway-readiness.test.ts, src/commands/dashboard.test.ts
  • Evidence after fix:
    {
      "before": {
        "callShape": "old: rpc:{url:<dashboard-resolved wsUrl>}",
        "serviceTargetRole": "diagnostic-only",
        "gatewayLooksStopped": true,
        "nativeServiceTargetsGateway": false,
        "canStartService": false,
        "recoveryBranchReachable": false
      },
      "after": {
        "callShape": "fixed: rpc:{}",
        "serviceTargetRole": "target",
        "gatewayLooksStopped": true,
        "nativeServiceTargetsGateway": true,
        "canStartService": true,
        "shouldInstall": true,
        "recoveryBranchReachable": true
      }
    }
  • Observed result after fix: The real dashboard command (no TTY, no --yes) in the same environment now prints Gateway is not running. followed by Run "openclaw gateway start" to start a managed gateway. and Run "openclaw gateway run" for a foreground gateway., and the install/start recovery branch is reachable (canStartService: true, shouldInstall: true). On main @ 73a53a5 the identical run printed Use the owning environment or supervisor to start or repair the selected Gateway. (exit 1) with the recovery branch unreachable.
  • Before evidence: main @ 73a53a5, same environment and driver: Gateway is not running. / Run "openclaw gateway status --deep" for details. / Use the owning environment or supervisor to start or repair the selected Gateway. — exactly the reported symptom, including the suppressed gateway start / gateway run hints.
  • Scope of the original proof (L2): The Linux driver established the hints and recovery decision, not service installation, startup, or dashboard delivery; those are covered for --yes by the independent Linux verification above. A separate Windows reproduction reported successful install and dashboard delivery on the second invocation, but did not test this exact head.

The dashboard readiness probe forwarded its own resolved URL as a probe
override, so the daemon status reader classified the native service as
diagnostic-only and the documented start/install recovery never ran.

Fixes openclaw#202037
@clawsweeper

clawsweeper Bot commented Nov 19, 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 commands Command implementations size: XS labels Nov 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Restore dashboard start/install recovery while restricting native-service recovery to the selected Gateway endpoint.

Example: Run openclaw dashboard --yes --no-open with the local service absent on port 28789.

  • Before: The command exits with supervisor guidance without installing the Gateway.
  • After: The command installs and starts the native service and returns the dashboard URL on port 28789.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with relevant production proof and no actionable findings; broad exact-head CI remains unexecuted.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Exact-head built-CLI Linux verification exercises real systemd installation and startup through dashboard --yes, confirms the served Control UI, preserves a different selected Gateway, and proves JSON performs no recovery; browser launch and interactive acceptance are outside the recorded headless scenario.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Dashboard cannot perform its documented recovery when the local Gateway is stopped or absent.
Reason: Restores an existing documented contract, with explicit maintainer adoption of the endpoint correction and no new user-facing policy.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR fixes documented dashboard recovery, resolves the prior endpoint-selection finding, and has relevant exact-head live proof; required CI awaits workflow approval.

Priority: P0
Reviewed head: b15f9564fc30a49ba29de63ebbafb0977bf8444a

Before merge

  • Await maintainer action - Approve the exact-head GitHub Actions runs marked action_required so required CI can execute.

Findings

None.

Agent review details

How this fits together

Dashboard resolves its configured endpoint, asks daemon status whether that endpoint is ready and locally recoverable, and invokes existing service lifecycle operations before delivering the Control UI URL.

flowchart TD
  A[Dashboard command] --> B[Resolve configured endpoint]
  B --> C[Gather daemon status]
  D[Native service metadata] --> C
  C --> E[Readiness and ownership decision]
  E --> F[Existing install or start operation]
  F --> C
  E --> G[Control UI handoff]
Loading

Technical review

Best possible solution:

Land the endpoint-preserving recovery fix once the required exact-head checks pass.

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

Current-main source deterministically classifies dashboard's internal URL as diagnostic-only and exits before recovery; supplied Linux and Windows evidence corroborates the failure, while this read-only review ran no target code.

Is this the best way to solve the issue?

The patch repairs classification in the existing status owner, preserves the selected endpoint and explicit-URL transport policy, and reuses existing lifecycle operations without adding persistent state or public options.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8ebcc3bb311c.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • haruai: Raw commit c2301d8 adds src/commands/dashboard.ts:111 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c2301d8e53e1; files: src/commands/dashboard.ts)

PR surface

Source +35, Tests +35. Total +70 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 47 12 +35
Tests 3 42 7 +35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 89 19 +70

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.

Root-cause cluster

Relationship: same_root_cause
Canonical: #202037
Summary: This PR addresses the dashboard recovery classification failure tracked by the open issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P0: The required UX override applies: documented first-run dashboard recovery fails before installation or startup, leaving users dependent on separate terminal recovery commands.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-19T22:31:43.091Z sha e3df91f :: needs real behavior proof before merge. :: [P1] Preserve the dashboard-selected endpoint during readiness probing

Reviewed November 20, 2026, 3:53 PM ET / 20:53 UTC (Revision 2).

@sallyom sallyom self-assigned this Nov 20, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Thanks for the recovery fix. We’re taking the P1 endpoint-selection fix as a maintainer edit on this PR, so there’s no need to duplicate that work.

Probe the dashboard-selected endpoint and recover the native service only when it owns that endpoint.

Co-authored-by: sallyom <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S and removed size: XS labels Nov 20, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 20, 2026
@roboclaw-bot
roboclaw-bot merged commit ed8f4e6 into openclaw:main Nov 20, 2026
139 of 144 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

vincentkoc added a commit that referenced this pull request Nov 20, 2026
…202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (#202694)
  fix: restore Skills discovery recovery checks (#202747)
  fix(database): report disabled memory after a port (#202630)
  test(ui): settle live event imports before cursor assertions (#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (#201570)
  chore(ui): refresh control ui locales (#202744)
  fix: show saved child results when idle delivery expires (#202732)
  perf(state): adopt producer-owned read commands (#202731)
  fix(cli): restore dashboard Gateway start and install recovery (#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...
vincentkoc added a commit that referenced this pull request Nov 21, 2026
)

* feat(gateway): add restricted writer transport and steer discovery

* refactor(gateway): retain publication owner across writer expansion

* feat: prepare restricted connections for Session Share steering

OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6

* fix(gateway): distinguish disabled publication purposes at handshake

* Publish openclaw/cool-shrimp

OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba

* merge: bring main into the steering transport branch and regenerate the config baseline

* Merge remote-tracking branch 'origin/main' into land/steer-transport-202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (#202694)
  fix: restore Skills discovery recovery checks (#202747)
  fix(database): report disabled memory after a port (#202630)
  test(ui): settle live event imports before cursor assertions (#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (#201570)
  chore(ui): refresh control ui locales (#202744)
  fix: show saved child results when idle delivery expires (#202732)
  perf(state): adopt producer-owned read commands (#202731)
  fix(cli): restore dashboard Gateway start and install recovery (#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate protocol output

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
…law#202085)

* fix(cli): restore dashboard Gateway start and install recovery

The dashboard readiness probe forwarded its own resolved URL as a probe
override, so the daemon status reader classified the native service as
diagnostic-only and the documented start/install recovery never ran.

Fixes openclaw#202037

* fix(cli): keep dashboard recovery on the selected Gateway

Probe the dashboard-selected endpoint and recover the native service only when it owns that endpoint.

Co-authored-by: sallyom <[email protected]>

---------

Co-authored-by: sallyom <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
…claw#202654)

* feat(gateway): add restricted writer transport and steer discovery

* refactor(gateway): retain publication owner across writer expansion

* feat: prepare restricted connections for Session Share steering

OpenClaw-Publication: d030c287-b7c5-8326-aa7e-a2b07b373ac6

* fix(gateway): distinguish disabled publication purposes at handshake

* Publish openclaw/cool-shrimp

OpenClaw-Publication: 096bcc30-6af3-892d-a6b9-456f24a4f5ba

* merge: bring main into the steering transport branch and regenerate the config baseline

* Merge remote-tracking branch 'origin/main' into land/steer-transport-202654

* origin/main: (34 commits)
  fix(ui): restore Skills first-visit asset limits (openclaw#202694)
  fix: restore Skills discovery recovery checks (openclaw#202747)
  fix(database): report disabled memory after a port (openclaw#202630)
  test(ui): settle live event imports before cursor assertions (openclaw#202752)
  fix: keep installed plugins in the Featured list instead of hiding them
  fix: keep PostgreSQL transcript and health totals numeric (openclaw#202629)
  fix(ui): show only SKILL.md in plugin skill previews
  fix: preserve the running installation when an agent updates its Gateway (openclaw#201570)
  chore(ui): refresh control ui locales (openclaw#202744)
  fix: show saved child results when idle delivery expires (openclaw#202732)
  perf(state): adopt producer-owned read commands (openclaw#202731)
  fix(cli): restore dashboard Gateway start and install recovery (openclaw#202085)
  fix: make plugin catalog artwork easier to recognize
  fix: restore queued compaction writer-fence coverage (openclaw#202709)
  fix(ui): remove resting chrome from Customize settings gears
  chore(ui): refresh control ui locales (openclaw#202734)
  fix: distinguish a recovered gateway from its failed update checks
  fix(ui): keep known plugin details visible while loading
  fix(cli): connect through gateway.remote.edgeAuth without a Gateway token
  fix: make the Plugins catalog clear when disconnected
  ...

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate the config baseline

* merge: bring main into the steering transport branch and regenerate protocol output

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 23, 2026
* fix(cli): restore dashboard Gateway start and install recovery

The dashboard readiness probe forwarded its own resolved URL as a probe
override, so the daemon status reader classified the native service as
diagnostic-only and the documented start/install recovery never ran.

Fixes #202037

* fix(cli): keep dashboard recovery on the selected Gateway

Probe the dashboard-selected endpoint and recover the native service only when it owns that endpoint.

Co-authored-by: sallyom <[email protected]>

---------

Co-authored-by: sallyom <[email protected]>
(cherry picked from commit ed8f4e6)
Co-authored-by: RomneyDa <[email protected]>
Backport companions: no same-path followups; 39bcc3c Session Share steering is unrelated:
(cherry picked from commit edd51367bf05689d9ca4a3ff038d40b3789ea1a1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw dashboard can never start or install the Gateway (--yes and the start prompt are unreachable)

3 participants