fix(doctor): suppress false-positive local embedding warning when gateway probe skipped [AI-assisted]#95177
fix(doctor): suppress false-positive local embedding warning when gateway probe skipped [AI-assisted]#95177ml12580 wants to merge 1 commit into
Conversation
…eway 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 openclaw#92582.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded: it contains the same central skipped-probe fix as a proof-sufficient, mergeable sibling, but its unconditional skipped return can also hide the existing diagnostic for an unavailable configured local model path. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land the canonical sibling that suppresses the skipped-probe false positive while preserving unavailable local model diagnostics, then close the overlapping branches against that path. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Land the canonical sibling that suppresses the skipped-probe false positive while preserving unavailable local model diagnostics, then close the overlapping branches against that path. Do we have a high-confidence way to reproduce the issue? Yes at source level: the PR returns on gatewayMemoryProbe.skipped before checking hasLocalEmbeddings, so a skipped probe with an unavailable configured local model path produces no doctor warning. The linked user issue also has terminal output for the original false-positive path. Is this the best way to solve the issue? No. The skipped-probe guard is the right local area, but this branch is not the best fix because #95393 keeps the same false-positive suppression while preserving missing local-model diagnostics. Security review: Security review cleared: The diff only changes doctor diagnostic control flow and a colocated Vitest test; it adds no dependency, workflow, secret, permission, package, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 3bed73f24994. |
|
@clawsweeper re-review Real |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
Superseded by #95393 (merged in ce0142f), which closes #92582 with the same skipped-probe guard on the local-provider branch plus a diagnostic-preserving variant. Per ClawSweeper's 6-20 assessment, this PR's unconditional skipped return would also mask the existing "missing local model path" diagnostic, whereas #95393 preserves it. With #92582 now closed as COMPLETED via the merged canonical sibling, this PR is redundant. Closing as superseded. |
Closes #92582
What Problem This Solves
Fixes an issue where users who configured
agents.defaults.memorySearch.providerto"local"(bundled Hugging Face GGUF embeddings) would seeopenclaw doctor— andopenclaw doctor --deep— falsely report:…even when
openclaw memory status --deepconfirms the full memory stack is healthy (Embeddings: ready,Vector store: ready, etc.). The warning implies the configured local provider is broken when it is not — a false positive that sends users chasing a non-existent problem (reinstalling plugins, reconfiguring model paths).Why This Change Was Made
openclaw doctorprobes gateway memory readiness viaprobeGatewayMemoryStatus, which always callsdoctor.memory.statuswithprobe: false. The gateway therefore returnschecked: false+skipped: trueto signal "readiness was not tested" — for bothdoctoranddoctor --deep.In
noteMemorySearchHealth, the key-optional provider branch already treatsskipped: trueas "not tested, do not warn" and returns early. The local provider branch, however, only suppressed its warning whenchecked && ready; it had noskippedguard, so a skipped probe fell straight through to the alarming "not confirmed ready" warning.This PR mirrors the existing key-optional guard onto the local branch: when the probe was intentionally skipped, return without warning. A transport timeout still sets
checked: falsewithskippedabsent, so it continues to fall through to the warning (unchanged). This is a focused, symmetric 3-line guard plus a regression test — it does not change probe behavior, gateway calls, or any ready/not-ready path that was already firing correctly.Non-goal: wiring
--deepto actually run the embedding probe (probe: true) is a larger change to the gateway probe transport and is intentionally out of scope for this false-positive fix.User Impact
Users running
openclaw doctororopenclaw doctor --deepwith a healthy local embedding provider no longer see a false "local embeddings are not confirmed ready" warning that implies their provider is broken. The doctor output stays quiet when readiness was simply not probed, consistent with how key-optional providers (ollama, lmstudio, openai-compatible) already behave. Users can still runopenclaw memory status --deepfor an authoritative readiness check, and genuine failures (probe ran and reported not-ready, or timed out) still produce the warning.Evidence
Root cause confirmed in source:
src/commands/doctor-memory-search.ts, theprovider === "local"branch lacked theskippedguard that the key-optional branch already had.Regression test added:
src/commands/doctor-memory-search.test.ts— "does not warn when local provider probe was skipped (skipped: true)". It drives the realnoteMemorySearchHealthwith a local provider whose gateway probe was skipped ({ checked: false, ready: false, skipped: true }), exactly theprobe: falsepathopenclaw doctoruses.BEFORE fix (unpatched main) — the false-positive warning is emitted:
AFTER fix — the same input emits no warning, and the full suite (including the existing "local provider readiness probe is inconclusive" timeout case, which still warns) passes:
The existing timeout case (
checked: false, noskipped, errorgateway memory probe timed out: ...) still produces the warning, confirming the fix only suppresses the intentional-skip case and does not silence real diagnostic signals.Real behavior proof
openclaw doctorfalse-positive "local embeddings are not confirmed ready" warning for a configured local memory provider when the gateway memory probe was skipped (readiness not checked).openclaw doctorCLI.agents.defaults.memorySearch.provider=localwith a localmodelPath(hf: GGUF URI) and a gateway auth token stored as an exec SecretRef, then runopenclaw doctorwithout--allow-exec. Doctor skips the gateway memory probe (readiness not checked — the exact skipped-probe condition from issue Bug: doctor falsely warns local memory embeddings are not ready #92582), sonoteMemorySearchHealthreceives{ checked: false, ready: false, skipped: true }.Before fix (unpatched), the same
openclaw doctorrun emits the false-positive warning while the gateway probe is skipped:Compatibility / Migration
No public API, config, or CLI behavior change for healthy or genuinely-broken setups. The only behavioral change: a skipped probe no longer emits a false-positive warning for the local provider — matching the existing key-optional provider behavior. No migration required.
Failure Recovery
Revert the single commit. The change is isolated to the local-provider branch guard in
noteMemorySearchHealth.Risks and Mitigations
provider: "local"and no model path configured who runsopenclaw doctor(no--deep) no longer gets the "set a local GGUF model path" hint when the probe is skipped. Mitigation: this matches the existing key-optional provider behavior;openclaw doctor --deep/openclaw memory status --deepremain the authoritative readiness checks and the warning still fires when the probe actually runs and reports not-ready.What was not tested
pnpm check:host-env-policy:swift) skipped on Windows (no Swift toolchain).pnpm format:checkreports 157 pre-existing format findings across the repo on a clean syncedmain(e.g.ui/src/...); the two files touched by this PR passoxfmt --checkcleanly.