Skip to content

Commit ce0142f

Browse files
fix #92582: Bug: doctor falsely warns local memory embeddings are not ready (#95393)
* fix(doctor): ignore skipped local embedding probe * fix(doctor): keep skipped local model diagnostics --------- Co-authored-by: Vincent Koc <[email protected]>
1 parent d4c1518 commit ce0142f

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,47 @@ describe("noteMemorySearchHealth", () => {
237237
expect(note).not.toHaveBeenCalled();
238238
});
239239

240+
it("does not warn when local provider readiness probe was intentionally skipped", async () => {
241+
resolveMemorySearchConfig.mockReturnValue({
242+
provider: "local",
243+
local: { modelPath: "hf:some-org/some-model-GGUF/model.gguf" },
244+
remote: {},
245+
});
246+
247+
await noteMemorySearchHealth(cfg, {
248+
gatewayMemoryProbe: {
249+
checked: false,
250+
ready: false,
251+
error:
252+
"memory embedding readiness not checked; run `openclaw memory status --deep` to probe",
253+
skipped: true,
254+
},
255+
});
256+
257+
expect(note).not.toHaveBeenCalled();
258+
});
259+
260+
it("warns when local provider skipped readiness but configured local model is missing", async () => {
261+
resolveMemorySearchConfig.mockReturnValue({
262+
provider: "local",
263+
local: { modelPath: "/definitely/missing/openclaw-memory-model.gguf" },
264+
remote: {},
265+
});
266+
267+
await noteMemorySearchHealth(cfg, {
268+
gatewayMemoryProbe: {
269+
checked: false,
270+
ready: false,
271+
error:
272+
"memory embedding readiness not checked; run `openclaw memory status --deep` to probe",
273+
skipped: true,
274+
},
275+
});
276+
277+
expect(note).toHaveBeenCalledTimes(1);
278+
expect(firstNoteMessage()).toContain('Memory search provider is set to "local"');
279+
});
280+
240281
it("warns when local provider readiness probe is inconclusive", async () => {
241282
resolveMemorySearchConfig.mockReturnValue({
242283
provider: "local",

src/commands/doctor-memory-search.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,11 @@ export async function noteMemorySearchHealth(
473473
return;
474474
}
475475
const hasExplicitLocalModel = hasLocalEmbeddings(resolved.local);
476+
const hasUnavailableConfiguredLocalModel =
477+
Boolean(normalizeOptionalString(resolved.local.modelPath)) && !hasExplicitLocalModel;
478+
if (opts?.gatewayMemoryProbe?.skipped && !hasUnavailableConfiguredLocalModel) {
479+
return;
480+
}
476481
const detail = opts?.gatewayMemoryProbe?.error?.trim();
477482
note(
478483
[

0 commit comments

Comments
 (0)