From 164c35da856cd895c8d1111a51913c225ecc9ea4 Mon Sep 17 00:00:00 2001 From: Gio Della-Libera Date: Sun, 17 May 2026 08:03:03 -0700 Subject: [PATCH] fix(cli): lower extra gateway advisory severity (#82922) Merged via squash. Prepared head SHA: abed98a5f3a4899d7e89967238d4c3c86682c6fc Co-authored-by: giodl73-repo <235387111+giodl73-repo@users.noreply.github.com> Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com> Reviewed-by: @altaywtf --- CHANGELOG.md | 1 + src/cli/daemon-cli/status.print.test.ts | 31 +++++++++++++++++++++++++ src/cli/daemon-cli/status.print.ts | 14 +++++------ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ccfb7a9a12..ac347c335d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,7 @@ Docs: https://docs.openclaw.ai - Agents/replies: classify provider conversation-state rejections and return a clear message-channel error instead of auto-resetting or falling back to a generic runner failure. (#82616) Thanks @dutifulbob. - Browser plugin: trust managed Chrome CDP diagnostics when launch HTTP probes race cold-start readiness, avoiding false startup failures. Fixes #82904. (#82986) Thanks @kmanan and @hclsys. - Android: prompt before replacing a changed Gateway TLS thumbprint, showing the old and new SHA-256 fingerprints so users can accept expected certificate rotations instead of hard failing on pin mismatch. (#83077) Thanks @sliekens. +- CLI/status: render extra gateway-like service diagnostics as warning/info output instead of error output. Fixes #46930. (#82922) thanks @giodl73-repo. ## 2026.5.17 diff --git a/src/cli/daemon-cli/status.print.test.ts b/src/cli/daemon-cli/status.print.test.ts index 13e34056029..f87cc63cb23 100644 --- a/src/cli/daemon-cli/status.print.test.ts +++ b/src/cli/daemon-cli/status.print.test.ts @@ -437,4 +437,35 @@ describe("printDaemonStatus", () => { expectMockLineContains(runtime.error, "Config warnings:"); expectMockLineContains(runtime.error, "without channelConfigs metadata"); }); + + it("prints extra gateway-like services as warnings instead of errors", () => { + printDaemonStatus( + { + service: { + label: "LaunchAgent", + loaded: true, + loadedText: "loaded", + notLoadedText: "not loaded", + runtime: { status: "running", pid: 8000 }, + }, + rpc: { + ok: true, + url: "ws://127.0.0.1:18789", + server: { version: "2026.5.12" }, + }, + port: { + port: 18789, + status: "busy", + listeners: [], + hints: [], + }, + extraServices: [{ label: "ai.openclaw.gateway.rescue", scope: "user", detail: "loaded" }], + }, + { json: false }, + ); + + expectMockLineContains(runtime.log, "Other gateway-like services detected"); + expectMockLineContains(runtime.log, "ai.openclaw.gateway.rescue"); + expect(runtime.error).not.toHaveBeenCalled(); + }); }); diff --git a/src/cli/daemon-cli/status.print.ts b/src/cli/daemon-cli/status.print.ts index e3e54fa6f28..e6007077aef 100644 --- a/src/cli/daemon-cli/status.print.ts +++ b/src/cli/daemon-cli/status.print.ts @@ -441,24 +441,24 @@ export function printDaemonStatus(status: DaemonStatus, opts: { json: boolean }) } if (extraServices.length > 0) { - defaultRuntime.error(errorText("Other gateway-like services detected (best effort):")); + defaultRuntime.log(warnText("Other gateway-like services detected (best effort):")); for (const svc of extraServices) { - defaultRuntime.error(`- ${errorText(svc.label)} (${svc.scope}, ${svc.detail})`); + defaultRuntime.log(`- ${warnText(svc.label)} (${svc.scope}, ${svc.detail})`); } for (const hint of renderGatewayServiceCleanupHints()) { - defaultRuntime.error(`${errorText("Cleanup hint:")} ${hint}`); + defaultRuntime.log(`${infoText("Cleanup hint:")} ${hint}`); } spacer(); } if (extraServices.length > 0) { - defaultRuntime.error( - errorText( + defaultRuntime.log( + infoText( "Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).", ), ); - defaultRuntime.error( - errorText( + defaultRuntime.log( + infoText( "If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).", ), );