Skip to content

Commit 91fd256

Browse files
committed
fix(doctor): suppress false-positive local embedding warning when gateway probe was skipped
The local memory provider branch in noteMemorySearchHealth only suppressed its "local embeddings are not confirmed ready" warning when the gateway probe reported checked && ready. When `openclaw doctor` (or `openclaw doctor --deep`) ran, the gateway memory probe used the probe:false path and returned checked:false + skipped:true, meaning readiness was never tested — but the local branch still emitted the alarming "not confirmed ready" warning, a false positive that implied a healthy local embedding stack was broken. Mirror the existing key-optional provider branch: when the probe was intentionally skipped, return without warning. A transport timeout still sets checked:false with skipped absent, so it continues to fall through to the warning. Fixes #92582.
1 parent 49b0487 commit 91fd256

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

src/commands/doctor-memory-search.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,27 @@ describe("noteMemorySearchHealth", () => {
272272
expect(firstNoteMessage()).toContain("a local model path is configured");
273273
});
274274

275+
it("does not warn when local provider probe was skipped (skipped: true)", async () => {
276+
// `openclaw doctor` (and `openclaw doctor --deep`) probes gateway memory
277+
// readiness with probe:false, so the gateway returns checked:false +
278+
// skipped:true to mean "readiness was not tested", not "embeddings are
279+
// broken". Key-optional providers already treat this as non-fatal; the
280+
// local provider must do the same so a configured, healthy local embedding
281+
// stack is not falsely flagged as "not confirmed ready".
282+
// Regression test for: https://github.com/openclaw/openclaw/issues/92582
283+
resolveMemorySearchConfig.mockReturnValue({
284+
provider: "local",
285+
local: { modelPath: "hf:some-org/some-model-GGUF/model.gguf" },
286+
remote: {},
287+
});
288+
289+
await noteMemorySearchHealth(cfg, {
290+
gatewayMemoryProbe: { checked: false, ready: false, skipped: true },
291+
});
292+
293+
expect(note).not.toHaveBeenCalled();
294+
});
295+
275296
it("does not emit provider guidance when no memory runtime is active", async () => {
276297
resolveActiveMemoryBackendConfig.mockReturnValue(null);
277298
resolveMemorySearchConfig.mockReturnValue({

src/commands/doctor-memory-search.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,18 @@ export async function noteMemorySearchHealth(
472472
if (opts?.gatewayMemoryProbe?.checked && opts.gatewayMemoryProbe.ready) {
473473
return;
474474
}
475+
// When the probe was intentionally skipped (skipped: true / checked: false
476+
// from the probe:false path used by `openclaw doctor` and `openclaw doctor
477+
// --deep`), we have no embedding readiness information — do not warn. A
478+
// skipped probe means readiness was never checked, not that the configured
479+
// local provider is broken, so flagging "not confirmed ready" is a false
480+
// positive. This mirrors the key-optional provider branch below.
481+
// NOTE: a transport timeout also sets checked: false, but skipped stays
482+
// false/absent — a timeout is a real diagnostic signal and should fall
483+
// through to the warning below.
484+
if (opts?.gatewayMemoryProbe?.skipped) {
485+
return;
486+
}
475487
const hasExplicitLocalModel = hasLocalEmbeddings(resolved.local);
476488
const detail = opts?.gatewayMemoryProbe?.error?.trim();
477489
note(

0 commit comments

Comments
 (0)