From 54bebc5f5e7efcff5eb9e7be7160a761ae74bc10 Mon Sep 17 00:00:00 2001 From: "clawsweeper[bot]" <274271284+clawsweeper[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 21:52:07 -0700 Subject: [PATCH] fix(commands): require gateway memory probe skipped state Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com> --- src/commands/doctor-gateway-health.ts | 2 +- src/commands/doctor.fast-path-mocks.ts | 4 +++- src/flows/doctor-health-contributions.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commands/doctor-gateway-health.ts b/src/commands/doctor-gateway-health.ts index 3a4ae71910d..35c7279b13c 100644 --- a/src/commands/doctor-gateway-health.ts +++ b/src/commands/doctor-gateway-health.ts @@ -17,7 +17,7 @@ export type GatewayMemoryProbe = { * unavailable gateway. Renderers should suppress warnings only for skipped * probes, not for transport failures. */ - skipped?: boolean; + skipped: boolean; }; function isGatewayCallTimeout(message: string): boolean { diff --git a/src/commands/doctor.fast-path-mocks.ts b/src/commands/doctor.fast-path-mocks.ts index a0421fbb312..2b363a6dbe3 100644 --- a/src/commands/doctor.fast-path-mocks.ts +++ b/src/commands/doctor.fast-path-mocks.ts @@ -22,7 +22,9 @@ vi.mock("./doctor-gateway-daemon-flow.js", () => ({ vi.mock("./doctor-gateway-health.js", () => ({ checkGatewayHealth: vi.fn().mockResolvedValue({ healthOk: false }), - probeGatewayMemoryStatus: vi.fn().mockResolvedValue({ checked: false, ready: false }), + probeGatewayMemoryStatus: vi + .fn() + .mockResolvedValue({ checked: false, ready: false, skipped: false }), })); vi.mock("./doctor-memory-search.js", () => ({ diff --git a/src/flows/doctor-health-contributions.ts b/src/flows/doctor-health-contributions.ts index a338bfbdd3f..bbdc303a23c 100644 --- a/src/flows/doctor-health-contributions.ts +++ b/src/flows/doctor-health-contributions.ts @@ -465,7 +465,7 @@ async function runGatewayHealthChecks(ctx: DoctorHealthFlowContext): Promise { @@ -478,7 +478,7 @@ async function runMemorySearchHealthContribution(ctx: DoctorHealthFlowContext): }); } await noteMemorySearchHealth(ctx.cfg, { - gatewayMemoryProbe: ctx.gatewayMemoryProbe ?? { checked: false, ready: false }, + gatewayMemoryProbe: ctx.gatewayMemoryProbe ?? { checked: false, ready: false, skipped: false }, }); if (ctx.options.deep === true) { await noteMemoryRecallHealth(ctx.cfg);