fix(doctor): suppress false-positive local embedding warning when probe is skipped (fixes #92582)#95067
Conversation
…be is skipped (fixes openclaw#92582)
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the guard-only code idea is valid, but #95393 is now the better open canonical branch because it carries the same focused fix with configured doctor proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this duplicate and focus maintainer review on #95393, or deliberately switch to #95091 if maintainers want the broader doctor --deep probe behavior. So I’m closing this here and keeping the remaining discussion on #95393 and #95091. Review detailsBest possible solution: Close this duplicate and focus maintainer review on #95393, or deliberately switch to #95091 if maintainers want the broader doctor --deep probe behavior. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main can pass a skipped gateway memory probe into the local-provider renderer, and that renderer warns unless the probe is checked and ready. I did not run a fresh live configured local-provider doctor command in this read-only review. Is this the best way to solve the issue? No for keeping this PR open as the landing path: the patch is a correct narrow guard-only fix, but #95393 is the better current canonical branch because it carries the same fix with configured doctor proof. Security review: Security review cleared: Security review cleared: the diff only changes doctor diagnostic control flow and a colocated Vitest test, with 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 97b97a9999f8. |
…tor-local-embedding-skip
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Updated PR body with:
|
…tor-local-embedding-skip
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Closed as superseded by #95393 per ClawSweeper's root-cause cluster analysis. The canonical PR carries the same focused fix with configured doctor proof (🦞) and is ready for maintainer look (🐚). |
Summary
openclaw doctoremits a false-positive warning "local embeddings are not confirmed ready" even when the memory probe was intentionally skipped (not failed). This happens because theprovider === "local"branch innoteMemorySearchHealthdoes not checkgatewayMemoryProbe.skippedbefore falling through to the warning — unlike the key-optional provider branches which already handle this case.src/commands/doctor-memory-search.ts:472— the local provider branch checksgatewayMemoryProbe.checked && readyfor early return but has no guard forskipped: true. Whenopenclaw doctorprobes the gateway withprobe: false(the default path), the gateway returns{ checked: false, ready: false, skipped: true }meaning "readiness was not tested" — but the code interprets this as "not ready" and warns.gatewayMemoryProbe.skippedis true, before the warning path. A skipped probe means readiness was never checked; it does NOT mean local embeddings are unavailable. A transport timeout (checked: false, skipped: false/absent) still falls through to the warning — as it should.src/commands/doctor-memory-search.ts— added skipped-probe guard (+11 lines)src/commands/doctor-memory-search.test.ts— added regression test for skipped probe with local provider (+19 lines)doctor --deepprobe forwarding is unchanged — this is a guard-only fix for the false warningprobeGatewayMemoryStatusor gateway RPC parametersskippedcorrectly — no change needed thereReproduction
agents.defaults.memorySearch.providerto"local"openclaw doctor(without--deep)skipped: truebecause readiness was never checkedReal behavior proof
Behavior or issue addressed (#92582):
openclaw doctorfalsely warns "local embeddings are not confirmed ready" when the gateway memory probe was intentionally skipped (probe: false path, returningskipped: true)Real environment tested: Linux, Node v22.22.0, OpenClaw 2026.6.x (e0c1add) built from source. The proof exercises
noteMemorySearchHealthvia the colocated test suite that injects the exact probe result observed in production (checked: false, ready: false, skipped: true).Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/commands/doctor-memory-search.test.ts— 50 tests including the new "does not warn when local provider probe was skipped" regression testEvidence before fix:
Evidence after fix:
Observed result after fix: The
noteMemorySearchHealthfunction now treats a skipped gateway memory probe identically to the key-optional provider branches — no warning is emitted because readiness was never checked. A transport timeout (checked: false, skipped: false/absent) still falls through to the warning path correctly.What was not tested: A live
openclaw doctorrun against a real gateway withagents.defaults.memorySearch.providerset tolocalwas not driven. The regression test injects the exactGatewayMemoryProbeshape returned by the gateway'sdoctor.memory.statusRPC in the skipped-probe path, so the code path exercised is identical to production.Repro confirmation: The new regression test at
src/commands/doctor-memory-search.test.ts:241("does not warn when local provider probe was skipped") constructs the exact probe result from the issue and assertsexpect(note).not.toHaveBeenCalled(). All 50 tests in the file pass.Risk / Mitigation
skipped: trueis set incorrectly.Mitigation: The gateway only sets
skipped: truewhen the probe was intentionally not performed (probe: falsepath). A transport timeout or gateway error setschecked: falsebut leavesskippedfalse/absent — those cases correctly fall through to the existing warning.doctor --deepbehavior —--deepstill won't force a live embedding probe.Mitigation: The broader
--deepprobe path is handled by sibling PR fix(doctor): probe memory embeddings on --deep and skip false warning on local provider #95091; maintainers can choose to land that separately if desired. This PR fixes the immediate false-positive bug without changing any other diagnostic behavior.Change Type (select all)
Scope (select all touched areas)
Regression Test Plan
node scripts/run-vitest.mjs src/commands/doctor-memory-search.test.ts— 50 tests including the new skipped-probe regression testReview Findings Addressed
Linked Issue/PR
Fixes #92582