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 <25068+vincentkoc@users.noreply.github.com>
This commit is contained in:
mikasa
2026-06-24 10:04:12 +08:00
committed by GitHub
parent d4c151844a
commit ce0142f04e
2 changed files with 46 additions and 0 deletions
+41
View File
@@ -237,6 +237,47 @@ describe("noteMemorySearchHealth", () => {
expect(note).not.toHaveBeenCalled();
});
it("does not warn when local provider readiness probe was intentionally skipped", async () => {
resolveMemorySearchConfig.mockReturnValue({
provider: "local",
local: { modelPath: "hf:some-org/some-model-GGUF/model.gguf" },
remote: {},
});
await noteMemorySearchHealth(cfg, {
gatewayMemoryProbe: {
checked: false,
ready: false,
error:
"memory embedding readiness not checked; run `openclaw memory status --deep` to probe",
skipped: true,
},
});
expect(note).not.toHaveBeenCalled();
});
it("warns when local provider skipped readiness but configured local model is missing", async () => {
resolveMemorySearchConfig.mockReturnValue({
provider: "local",
local: { modelPath: "/definitely/missing/openclaw-memory-model.gguf" },
remote: {},
});
await noteMemorySearchHealth(cfg, {
gatewayMemoryProbe: {
checked: false,
ready: false,
error:
"memory embedding readiness not checked; run `openclaw memory status --deep` to probe",
skipped: true,
},
});
expect(note).toHaveBeenCalledTimes(1);
expect(firstNoteMessage()).toContain('Memory search provider is set to "local"');
});
it("warns when local provider readiness probe is inconclusive", async () => {
resolveMemorySearchConfig.mockReturnValue({
provider: "local",
+5
View File
@@ -473,6 +473,11 @@ export async function noteMemorySearchHealth(
return;
}
const hasExplicitLocalModel = hasLocalEmbeddings(resolved.local);
const hasUnavailableConfiguredLocalModel =
Boolean(normalizeOptionalString(resolved.local.modelPath)) && !hasExplicitLocalModel;
if (opts?.gatewayMemoryProbe?.skipped && !hasUnavailableConfiguredLocalModel) {
return;
}
const detail = opts?.gatewayMemoryProbe?.error?.trim();
note(
[