Skip to content

fix(doctor): consolidate Gateway service config panels into a single note (#80287) - #78688

Merged
steipete merged 3 commits into
openclaw:mainfrom
YB0y:fix/doctor-triple-gateway-runtime-panel
May 11, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
YB0y:fix/doctor-triple-gateway-runtime-panel

Conversation

@YB0y

@YB0y YB0y commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: openclaw doctor emits three consecutive ◇ Gateway service config panels for one condition. Panel 1 is the source-checkout warning (with an openclaw gateway install --force CTA). Panel 2 is the aggregated audit-issue bullets, which already restate the entrypoint mismatch as X -> Y. Panel 3 is the post-decline --force hint, which duplicates Panel 1's CTA verbatim.
  • Why it matters: two separable defects in one run. The duplicate --force CTA in Panel 1 + Panel 3 invites "did the first one not take?", and the entrypoint mismatch is reported twice (Panel 1's source-checkout prose + Panel 2's X -> Y bullet). Doctor output is also what users paste into issues / Discord; three panels under one heading make the snippet harder to triage. Reproduces 100% on v2026.5.7 and current origin/main whenever auditGatewayServiceConfig returns a non-empty issue list together with serviceLayout.entrypointSourceCheckout = true.
  • What changed: in src/commands/doctor-gateway-services.ts, defer the source-checkout warning until after the audit, fold it into the audit-bullet emit so a single note(..., "Gateway service config") is produced per pass, and gate the warning on audit.issues.every((issue) => issue.code !== gatewayEntrypointMismatch) so the same entrypoint mismatch is not reported twice. Suppress the post-decline --force hint when the source-checkout warning already emitted that same advice (otherwise keep it so users without a source checkout still see how to replace the service definition).
  • What did NOT change (scope boundary): summarizeGatewayServiceLayout, the audit module's wording, the existing post-decline behavior when there is no source checkout (Panel 3 still fires in that case), the four secondary conditional notes at :391-394, :494-497, :501, :506-509 (only the three primary emit sites consolidate), the Gateway runtime warning path, and the entrypoint-mismatch detection / repair flow.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Triple Gateway service config panel emission with duplicate openclaw gateway install --force CTAs and doubly-reported entrypoint mismatch in openclaw doctor. See [Bug]: openclaw doctor emits 3+ ◇ Gateway service config panels in one run with duplicate --force CTAs (reproduces on v2026.5.7) #80287.
  • Real environment tested: Ubuntu 24.04 (Linux 6.8.0-110-generic). System Node /usr/bin/node reports v20.20.2, version-manager Node ~/.nvm/versions/node/v22.22.2/bin/node is on PATH. The host has a source checkout at /home/orin/Gittensor/Ycom/openclaw (.git, src/, extensions/, dist/, package.json) so summarizeGatewayServiceLayout reports entrypointSourceCheckout = true. The current daemon was last installed from a different cwd, so the audit surfaces a non-empty issue set including gatewayEntrypointMismatch. OpenClaw source checkout at this branch tip rebased onto upstream f298999597.
  • Exact steps or command run after this patch:
    1. pnpm install --frozen-lockfile
    2. pnpm build
    3. pnpm openclaw doctor --non-interactive
  • Evidence after fix (terminal capture, redacted to the relevant panel section):
$ pnpm openclaw doctor --non-interactive

…
◇  Gateway service config ─────────────────────────────────────────────────╮
│                                                                          │
│  - Gateway service PATH includes version managers or package managers;   │
│    recommend a minimal PATH.                                             │
│  - Gateway service uses Node from a version manager; …                   │
│  - Gateway service entrypoint does not match the current install.        │
│    (/home/orin/Gittensor/Test/openclaw/dist/index.js -> …)               │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
…

(One consolidated Gateway service config panel — was three before this patch. The source-checkout warning is gated out because the audit's entrypoint-mismatch bullet already covers the same condition; the post-decline --force hint is the only remaining occurrence of openclaw gateway install --force and only fires when the user actually declines.)

  • Observed result after fix: a single ◇ Gateway service config panel is emitted in the bug-trigger configuration. The entrypoint mismatch is reported exactly once (as the audit bullet). The openclaw gateway install --force advice does not appear twice in the same run. When the user accepts the repair prompt (default --non-interactive flow), no post-decline hint fires.
  • What was not tested:
    • The decline branch path with confirmRuntimeRepair returning false interactively (covered by an existing unit test that asserts the post-decline --force hint fires when the source-checkout warning would not have been emitted).
    • Windows / macOS source-checkout layouts (only Linux reproduced on this host; the layout signal entrypointSourceCheckout is platform-agnostic in summarizeGatewayServiceLayout).
    • External / systemd-active service-repair policy paths (already covered by existing tests; this PR only refactors the three primary emit sites).

Root Cause (if applicable)

  • Root cause: maybeRepairGatewayServiceConfig had three independent note(..., "Gateway service config") emit sites for one condition: a pre-audit source-checkout warning, a post-audit aggregated bullet list, and a post-decline --force reminder. The first and third repeated the same openclaw gateway install --force remediation, and the first warning's prose described the same entrypoint mismatch that the second panel listed as X -> Y.
  • Missing detection / guardrail: there was no test asserting "exactly one Gateway service config note when source-checkout layout coincides with audit findings". Existing tests covered each emit site in isolation (and the post-decline hint in non-interactive flow) but never the bug-shape combination.
  • Contributing context (if known): the source-checkout warning was added before the audit's gatewayEntrypointMismatch issue code existed, so its prose did not anticipate the audit later restating the same mismatch. The post-decline hint was layered on top later as a generic actionable footer without considering whether the source-checkout warning already provided the same CTA.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/commands/doctor-gateway-services.test.ts (one new it(...) case at the bottom of the maybeRepairGatewayServiceConfig describe block).
  • Scenario the test should lock in: source-checkout layout (real fs scaffold with .git, src/, extensions/, dist/, package.json) plus setupGatewayEntrypointRepairScenario (current entrypoint inside the source checkout, install entrypoint elsewhere), default-accept prompter. After runRepair, exactly one note(..., "Gateway service config") is emitted; that note contains the audit bullet "Gateway service entrypoint does not match the current install"; it does not contain "resolves to a source checkout" (gated out by the entrypoint-mismatch presence); and it does not contain openclaw gateway install --force (the post-decline hint never fires when the user accepts).
  • Why this is the smallest reliable guardrail: the bug is purely about which note(...) calls fire and what they contain. Mocking the audit and command surface and asserting the exact emit pattern is sufficient; a seam or e2e test would add scaffolding without catching anything the unit cannot.
  • Existing test that already covers this (if any): None. The existing warns when the gateway service entrypoint resolves to a source checkout test covers source-checkout + empty audit (one panel by construction); the existing skips entrypoint rewrite in non-interactive fix mode test covers entrypoint mismatch + decline path with no source checkout (so Panel 3 fires there). Neither exercises the source-checkout + non-empty audit combination that produces the bug.
  • If no new test is added, why not: N/A (added).

User-visible / Behavior Changes

In the reported configuration (entrypoint inside a source checkout + non-empty audit including entrypoint mismatch):

  • Before: three ◇ Gateway service config panels — Panel 1 source-checkout warning with --force CTA, Panel 2 audit bullets restating the mismatch, Panel 3 post-decline --force hint.
  • After: one consolidated ◇ Gateway service config panel containing only the audit bullets. The source-checkout warning is suppressed (the audit's gatewayEntrypointMismatch bullet already states the actionable condition). The post-decline --force hint is suppressed when the source-checkout warning would have emitted, otherwise it still fires.

When there is a source checkout but no audit findings, the source-checkout warning still emits as a single panel (existing test warns when the gateway service entrypoint resolves to a source checkout continues to pass).

When there is no source checkout, the audit-bullets panel and the post-decline --force hint emit independently as before — unchanged.

Diagram (if applicable)

Bug-trigger configuration (source-checkout entrypoint + non-empty audit incl. entrypoint mismatch):

Before:
openclaw doctor
  └── Gateway service config (Panel 1 — "resolves to a source checkout. Run …--force.")
  └── Gateway service config (Panel 2 — audit bullets, including "entrypoint does not match (X -> Y)")
  └── Gateway service config (Panel 3 — "Run `openclaw gateway install --force` when …")  ← duplicates Panel 1's CTA

After (user accepts):
openclaw doctor
  └── Gateway service config (audit bullets only — single panel)

After (user declines):
openclaw doctor
  └── Gateway service config (audit bullets)
  └── Gateway service config (`--force` hint)  ← only emit of this advice, no duplicate

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • If any Yes, explain risk + mitigation: N/A — the change is a wording / dedup adjustment in a diagnostics output path.

Repro + Verification

Environment

  • OS: Ubuntu 24.04 (Linux 6.8.0-110-generic)
  • Runtime/container: Node v22.22.2 via nvm; OpenClaw source checkout at ~/Gittensor/Ycom/openclaw rebased onto upstream f298999597
  • Model/provider: N/A — pure doctor diagnostic emit-path
  • Integration/channel (if any): N/A
  • Relevant config (redacted): default-shape config with a single claude-cli auth profile; daemon was previously installed from a different cwd, so the audit surfaces non-empty issues including gatewayEntrypointMismatch

Steps

  1. From a source checkout where the gateway service entrypoint resolves to that checkout (so summarizeGatewayServiceLayout reports entrypointSourceCheckout = true), and the audit returns non-empty findings (e.g., the install resolves a different entrypoint than the running service).
  2. pnpm install --frozen-lockfile && pnpm build.
  3. pnpm openclaw doctor --non-interactive.

Expected

  • Exactly one ◇ Gateway service config panel listing the audit findings, including Gateway service entrypoint does not match the current install. (X -> Y).
  • No standalone Gateway service config panel saying "resolves to a source checkout".
  • No openclaw gateway install --force advice repeated within the same run when the user accepts the repair.

Actual (after this patch — matches expected)

  • One consolidated Gateway service config panel; no duplicate --force CTA; entrypoint mismatch reported once.

Evidence

  • Failing test/log before + passing after — without the source change, the new regression test fails (Panel 1 still emits, asserting not.toContain("resolves to a source checkout") fails).
  • Trace/log snippets
  • Screenshot/recording — fenced terminal capture from pnpm openclaw doctor --non-interactive is in the Real-behavior-proof section above.
  • Perf numbers (if relevant) — N/A.

Human Verification (required)

  • Verified scenarios:
    • Source checkout + non-empty audit (with entrypoint mismatch) + accept → 1 Gateway service config panel (audit bullets only).
    • Source checkout + empty audit → 1 Gateway service config panel (source-checkout warning, unchanged).
    • No source checkout + non-empty audit + decline → 2 Gateway service config notes (audit bullets, then --force hint), unchanged from prior behavior.
    • pnpm test src/commands/doctor-gateway-services.test.ts → 26/26 pass on Node 22.22.2.
    • pnpm exec oxfmt --check --threads=1 src/commands/doctor-gateway-services.ts src/commands/doctor-gateway-services.test.ts → clean.
  • Edge cases checked:
    • Bun-runtime path — untouched (this PR only changes Gateway service config emit sites; the Gateway runtime path is unaffected).
    • External / systemd-active service-repair policies — untouched; their conditional notes still emit independently.
    • audit.issues.length === 0 with source-checkout — single Panel 1 emit preserved.
  • What you did not verify:
    • Windows / macOS source-checkout layouts (no host available locally; the layout signal is platform-agnostic in summarizeGatewayServiceLayout).
    • Interactive prompter decline flow on a real shell — covered by the existing non-interactive decline test in this file.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A.

Risks and Mitigations

  • Risk: when a source-checkout layout is present but the audit happens to NOT include gatewayEntrypointMismatch (e.g., the only finding is a port mismatch), the source-checkout warning is now emitted as part of the consolidated panel rather than as its own panel. The user-visible content is the same; the panel count drops from two to one.
    • Mitigation: this is the intended consolidation. The existing warns when the gateway service entrypoint resolves to a source checkout test (audit empty) still passes — that path is unchanged. The new path (audit non-empty without mismatch) correctly merges both messages into one panel.
  • Risk: the post-decline --force hint no longer fires when a source-checkout warning was emitted in the same pass. A user who declined the repair could miss the explicit "run openclaw gateway install --force" reminder if they skim past the consolidated panel.
    • Mitigation: the consolidated panel itself still contains the openclaw gateway install --force text (inherited from the source-checkout warning), so the actionable advice is still visible in the same run — just not repeated in a second panel. The decline path without a source-checkout warning is unchanged: Panel 3 still fires there, preserving the actionable hint for users without a source-checkout layout.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 7, 2026
@YB0y
YB0y force-pushed the fix/doctor-triple-gateway-runtime-panel branch from 90844ac to 69d3253 Compare May 7, 2026 00:59
@clawsweeper

clawsweeper Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR consolidates duplicate openclaw doctor Gateway service-config notes, preserves declined --force guidance, adds focused regression tests, and updates the changelog.

Reproducibility: yes. Source inspection on current main shows the three service-config note sites can all fire for a source-checkout entrypoint with audit findings and a declined repair, and the linked report supplies terminal output for that shape.

Real behavior proof
Sufficient (terminal): The PR includes redacted terminal output from a real Ubuntu doctor run after the patch showing the consolidated Gateway service-config output.

Next step before merge
No repair lane is needed because the latest head has no actionable review finding; remaining work is normal maintainer mergeability and CI handling.

Security
Cleared: The diff only changes doctor diagnostic output control flow, tests, and changelog text; it does not alter secrets handling, permissions, network calls, dependencies, or execution surfaces.

Review details

Best possible solution:

Land the focused consolidation after normal maintainer mergeability and CI checks, keeping one mismatch report and one actionable force hint without changing gateway audit or repair semantics.

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

Yes. Source inspection on current main shows the three service-config note sites can all fire for a source-checkout entrypoint with audit findings and a declined repair, and the linked report supplies terminal output for that shape.

Is this the best way to solve the issue?

Yes. Deferring source-checkout text until audit issue codes are known is the narrow maintainable fix, and the latest head preserves force guidance for the declined path when the source-checkout warning was suppressed.

What I checked:

Likely related people:

  • steipete: Recent path history shows repeated doctor/gateway service work, including the merged duplicate Gateway runtime warning fix, and this PR's latest commit preserving the declined force hint was authored by @steipete. (role: recent area contributor and follow-up owner; confidence: high; commits: bd3f09e9696d, dd0f5937d2b5, d78f5a7a7c62; files: src/commands/doctor-gateway-services.ts, src/commands/doctor-gateway-services.test.ts)
  • Kaspre: Recent main history shows @Kaspre authored the same file's systemd update-rewrite change, which is adjacent to the service-config repair branch this PR edits. (role: recent adjacent contributor; confidence: medium; commits: c4fa9cd2e0d4; files: src/commands/doctor-gateway-services.ts, src/commands/doctor-gateway-services.test.ts)

Remaining risk / open question:

  • I did not run tests in this read-only review; validation is based on source inspection, the PR diff, added regression coverage, and supplied terminal proof.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 4615f08817c7.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 7, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 7, 2026
@YB0y
YB0y force-pushed the fix/doctor-triple-gateway-runtime-panel branch from 69d3253 to eec975a Compare May 7, 2026 18:50
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 7, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 7, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@YB0y
YB0y force-pushed the fix/doctor-triple-gateway-runtime-panel branch from 5862567 to a0a52b0 Compare May 8, 2026 01:37
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@YB0y
YB0y marked this pull request as draft May 8, 2026 16:55
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@YB0y
YB0y force-pushed the fix/doctor-triple-gateway-runtime-panel branch from a0a52b0 to e739e1f Compare May 10, 2026 14:24
@YB0y YB0y changed the title fix(doctor): collapse duplicate Gateway runtime panels and stop false… fix(doctor): consolidate Gateway service config panels into a single note (#80287) May 10, 2026
@YB0y
YB0y marked this pull request as ready for review May 10, 2026 14:34
@YB0y
YB0y force-pushed the fix/doctor-triple-gateway-runtime-panel branch from e739e1f to c2e2e44 Compare May 10, 2026 15:02
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@YB0y

YB0y commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Verify fix #78688

[email protected] openclaw /home/orin/Gittensor/OpenCoven/openclaw-upstream
node scripts/run-node.mjs doctor

[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs

/a2ui.bundle.js chunk │ size: 394.21 kB

✔ rolldown v1.0.0 Finished in 194.35 ms
[tsdown-build] still running pid=4700; no output for 30s
[tsdown-build] still running pid=4700; no output for 30s
[tsdown-build] still running pid=4700; no output for 30s
[tsdown-build] still running pid=4700; no output for 30s
runtime-postbuild: plugin SDK root alias completed in 1ms
runtime-postbuild: bundled plugin metadata completed in 362ms
runtime-postbuild: official channel catalog completed in 8ms
runtime-postbuild: bundled plugin runtime overlay completed in 556ms
runtime-postbuild: static extension assets completed in 89ms
runtime-postbuild: stable root runtime imports completed in 479ms
runtime-postbuild: stable root runtime aliases completed in 101ms
runtime-postbuild: legacy root runtime compat aliases completed in 14ms
runtime-postbuild: legacy CLI exit compat chunks completed in 1ms
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🦞 OPENCLAW 🦞

┌ OpenClaw doctor
│
◇ UI ───────────────────────────────╮
│ │
│ - Control UI assets are missing. │
│ - Run: pnpm ui:build │
│ │
├────────────────────────────────────╯
│
◇ Legacy config keys detected ───────────────────────────────────────╮
│ │
│ - agents.defaults.agentRuntime: agents.defaults.agentRuntime is │
│ ignored; set models.providers..agentRuntime or a │
│ model-scoped agentRuntime instead. Run "openclaw doctor --fix". │
│ │
├─────────────────────────────────────────────────────────────────────╯
│
◇ Doctor changes ──────────────────────────────────────────────────────╮
│ │
│ Removed agents.defaults.agentRuntime; runtime is now provider/model │
│ scoped. │
│ │
├───────────────────────────────────────────────────────────────────────╯
│
◇ Doctor warnings ──────────────────────────────────────────────────────╮
│ │
│ - channels.slack.groupPolicy is "allowlist" but groupAllowFrom (and │
│ allowFrom) is empty — all group messages will be silently dropped. │
│ Add sender IDs to channels.slack.groupAllowFrom or │
│ channels.slack.allowFrom, or set groupPolicy to "open". │
│ │
├────────────────────────────────────────────────────────────────────────╯
│
◇ Doctor ─────────────────────────────────────────────────────╮
│ │
│ Run "openclaw doctor --fix" to migrate legacy config keys. │
│ │
├──────────────────────────────────────────────────────────────╯
│
◇ Model auth ───────────────────────────────────────────────────────────╮
│ │
│ - anthropic:claude-cli: expiring (4h) — Re-auth via openclaw models │ │ auth login --provider anthropic or openclaw configure. │
│ │
├────────────────────────────────────────────────────────────────────────╯
│
◇ Command owner ─────────────────────────────────────────────────────────╮
│ │
│ No command owner is configured. │
│ A command owner is the human operator account allowed to run │
│ owner-only commands and approve dangerous actions, including │
│ /diagnostics, /export-trajectory, /config, and exec approvals. │
│ DM pairing only lets someone talk to the bot; it does not make that │
│ sender the owner for privileged commands. │
│ Fix: set commands.ownerAllowFrom to your channel user id, for example │
│ openclaw config set commands.ownerAllowFrom '["telegram:123456789"]' │
│ Restart the gateway after changing this if it is already running. │
│ │
├─────────────────────────────────────────────────────────────────────────╯
│
◇ State integrity ───────────────────────────────────────────────────────╮
│ │
│ - State directory permissions are too open (/.openclaw). Recommend │
│ chmod 700. │
│ - CRITICAL: OAuth dir missing (
/.openclaw/credentials). │
│ - 1/5 recent sessions are missing transcripts. │
│ Verify sessions in store: openclaw sessions --store │
│ "/home/orin/.openclaw/agents/main/sessions/sessions.json" │
│ Preview cleanup impact: openclaw sessions cleanup --store │
│ "/home/orin/.openclaw/agents/main/sessions/sessions.json" --dry-run │
│ Prune missing entries: openclaw sessions cleanup --store │
│ "/home/orin/.openclaw/agents/main/sessions/sessions.json" --enforce │
│ --fix-missing │
│ - Found 103 orphan transcript files in │
│ ~/.openclaw/agents/main/sessions. │
│ These .jsonl files are no longer referenced by sessions.json, so │
│ they are not part of any active session history. │
│ Doctor can archive them safely by renaming each file to │
│ *.deleted.. │
│ Examples: 0047a871-84b8-4694-9d56-d00d3d0b09be.jsonl, │
│ 0263a1db-61ff-4332-8f82-c4ff5bcf361f.jsonl, │
│ 07b89fd2-88b8-4b06-bfde-4eb034d49c07.jsonl, and 100 more │
│ │
├─────────────────────────────────────────────────────────────────────────╯
│
◇ Gateway runtime ───────────────────────────────────────────────────────╮
│ │
│ System Node 20.20.2 at /usr/bin/node is below the required Node │
│ 22.16+. Using /home/orin/.nvm/versions/node/v22.22.2/bin/node for the │
│ daemon. Install Node 24 (recommended) or Node 22 LTS from nodejs.org │
│ or Homebrew. │
│ │
├─────────────────────────────────────────────────────────────────────────╯
│
◇ Gateway service config ─────────────────────────────────────────────────╮
│ │
│ - Gateway service PATH includes version managers or package managers; │
│ recommend a minimal PATH. │
│ (/home/orin/.nvm/versions/node/v22.22.2/bin, │
│ /home/orin/.nvm/current/bin, /home/orin/.volta/bin, │
│ /home/orin/.asdf/shims, │
│ /home/orin/.local/share/fnm/aliases/default/bin, │
│ /home/orin/.local/share/fnm/current/bin, │
│ /home/orin/.fnm/aliases/default/bin, /home/orin/.fnm/current/bin, │
│ /home/orin/.local/share/pnpm) │
│ - Gateway service uses Node from a version manager; it can break after │
│ upgrades. (/home/orin/.nvm/versions/node/v22.22.2/bin/node) │
│ - Gateway service entrypoint does not match the current install. │
│ (/home/orin/Gittensor/Test/openclaw/dist/index.js -> │
│ /home/orin/Gittensor/OpenCoven/openclaw-upstream/dist/index.js) │
│ │
├──────────────────────────────────────────────────────────────────────────╯
│
◇ Security ─────────────────────────────────╮
│ │
│ - No channel security warnings detected. │
│ - Run: openclaw security audit --deep │
│ │
├────────────────────────────────────────────╯
│
◇ Skills status ───────────╮
│ │
│ Eligible: 11 │
│ Missing requirements: 0 │
│ Blocked by allowlist: 0 │
│ │
├───────────────────────────╯
│
◇ Plugins ──────╮
│ │
│ Loaded: 71 │
│ Imported: 0 │
│ Disabled: 50 │
│ Errors: 0 │
│ │
├────────────────╯
gateway connect failed: GatewayClientRequestError: protocol mismatch
│
◇ Gateway ──────────────╮
│ │
│ Gateway not running. │
│ │
├────────────────────────╯
│
◇ Gateway connection ─────────────────────────╮
│ │
│ Gateway target: ws://127.0.0.1:18789 │
│ Source: local loopback │
│ Config: /home/orin/.openclaw/openclaw.json │
│ Bind: loopback │
│ │
├──────────────────────────────────────────────╯
│
◇ Gateway port ────────────────────────────────────────────────────────╮
│ │
│ Port 18789 is already in use. │
│ - pid 3356645 orin: /home/orin/.nvm/versions/node/v22.22.2/bin/node │
│ dist/index.js gateway --port 18789 (127.0.0.1:18789) │
│ - Another process is listening on this port. │
│ │
├───────────────────────────────────────────────────────────────────────╯
│
◇ Gateway ────────────────────────╮
│ │
│ Gateway service not installed. │
│ │
├──────────────────────────────────╯
│
◇ Gateway ───────────────────────────────────────────────────────────╮
│ │
│ Run openclaw gateway install when you want to install the gateway │
│ service. │
│ │
├─────────────────────────────────────────────────────────────────────╯
Run "openclaw doctor --fix" to apply changes.
│
└ Doctor complete.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@steipete
steipete force-pushed the fix/doctor-triple-gateway-runtime-panel branch from d99da66 to 5b43a3f Compare May 11, 2026 13:33
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 11, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 11, 2026
@steipete
steipete force-pushed the fix/doctor-triple-gateway-runtime-panel branch from 5b43a3f to d78f5a7 Compare May 11, 2026 13:55
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 11, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 11, 2026
flashatten and others added 2 commits May 11, 2026 15:10
…note (openclaw#80287) [AI-assisted]

`openclaw doctor` emitted three `Gateway service config` panels for one
condition. Panel 1 carried the source-checkout warning (with an
`openclaw gateway install --force` CTA), Panel 2 the aggregated audit
bullets (which already restate the entrypoint mismatch as `X -> Y`),
and Panel 3 a post-decline `--force` hint that duplicates Panel 1's
CTA verbatim. The same entrypoint mismatch appeared twice and the same
remediation appeared twice.

Defer the source-checkout warning until after the audit, fold it into
the audit-bullet emit so a single `note(..., "Gateway service config")`
is produced per pass, and gate the warning on
`audit.issues.every((issue) => issue.code !== gatewayEntrypointMismatch)`
so the same entrypoint mismatch is not reported twice. Suppress the
post-decline `--force` hint when the source-checkout warning already
emitted that same advice (otherwise keep it so users without a source
checkout still see how to replace the service definition).

Verified:
- pnpm install --frozen-lockfile
- pnpm test src/commands/doctor-gateway-services.test.ts
- pnpm exec oxfmt --check --threads=1 src/commands/doctor-gateway-services.ts src/commands/doctor-gateway-services.test.ts

Closes openclaw#80287
@steipete
steipete force-pushed the fix/doctor-triple-gateway-runtime-panel branch from d78f5a7 to 29d4e1d Compare May 11, 2026 14:11
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 11, 2026
@steipete

Copy link
Copy Markdown
Contributor

Verification for 15f9a66:

Known proof note: an earlier local pnpm check:changed attempted Testbox delegation because OPENCLAW_TESTBOX=1 was set, queued as tbx_01krbkhdhp1fg4h5pnb5z370hm, and was stopped before acquiring a worker. The same changed gate was then run locally with OPENCLAW_TESTBOX unset and passed. Auto-merge is expected to wait for the remaining required GitHub checks.

@steipete
steipete merged commit ff8bc72 into openclaw:main May 11, 2026
104 of 105 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Landed via squash merge:

  • PR head: 15f9a663d0da8283a15eefa91164f099c80dd8f5
  • Main commit: ff8bc72c81148c0f60c4facd0639e5f24fc5186e
  • Contributor credit preserved with Co-authored-by: YB0y <[email protected]>.

Verification was posted in #78688 (comment). Relevant current-head GitHub checks were green for Real behavior proof, Workflow Sanity, OpenGrep, CodeQL, CodeQL Critical Quality, and the doctor CI shard; remaining Blacksmith broad shards were queued without runners and were not required by branch protection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations proof: supplied External PR includes structured after-fix real behavior proof. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw doctor emits 3+ ◇ Gateway service config panels in one run with duplicate --force CTAs (reproduces on v2026.5.7)

3 participants