fix #92582: Bug: doctor falsely warns local memory embeddings are not ready#95393
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 23, 2026, 6:06 PM ET / 22:06 UTC. Summary PR surface: Source +5, Tests +41. Total +46 across 2 files. Reproducibility: yes. source inspection gives a high-confidence reproduction path: current main can pass gatewayMemoryProbe { checked: false, ready: false, skipped: true } into the local-provider renderer and still reach the warning. The linked issue also includes terminal output from a configured local-provider setup, but I did not run a live command in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical doctor-memory fix that treats intentionally skipped local embedding probes as neutral, preserves checked failure and timeout warnings, and either defers or explicitly includes the doctor --deep live-probe behavior. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence reproduction path: current main can pass gatewayMemoryProbe { checked: false, ready: false, skipped: true } into the local-provider renderer and still reach the warning. The linked issue also includes terminal output from a configured local-provider setup, but I did not run a live command in this read-only review. Is this the best way to solve the issue? Yes for the guard-only false-positive scope: mirroring the skipped-probe handling already used by sibling provider paths is the narrowest maintainable renderer fix. The remaining decision is whether this PR or a broader doctor --deep probe-forwarding sibling should be canonical. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b08d901dd2fc. Label changesLabel justifications:
Evidence reviewedPR surface: Source +5, Tests +41. Total +46 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
94cb450 to
3f770d3
Compare
d453bac to
f6ab4a6
Compare
|
Merged via squash.
|
Fixes #92582
Summary
openclaw doctorcan warn that local memory embeddings are "not confirmed ready" even when the configured local memory stack is healthy. This PR makes the local-provider doctor renderer honor the gateway's explicit skipped-probe state, matching the existing key-optional provider behavior.What Problem This Solves
probe: false).openclaw memory status --deepconfirmed embeddings, vector store, semantic vectors, and FTS were ready.Fix classification
Root Cause
probeGatewayMemoryStatus()already returnschecked: falseandskipped: truewhen the gateway intentionally skips the embedding readiness probe. The key-optional provider renderer returns early for that state, but the local-provider renderer only returned forchecked && ready, so skipped local probes fell through to the "local embeddings are not confirmed ready" warning.gatewayMemoryProbestate. Honoringskippedin the local provider branch restores that contract without changing gateway probing or suppressing checked failures.Changes
gatewayMemoryProbe.skippedis true.Scope boundary
This PR only changes doctor diagnostic rendering in
src/commands/doctor-memory-search.tsand its focused regression test. It does not change gateway probe RPC parameters,openclaw memory status --deep, embedding model loading, vector-store readiness, or local provider runtime behavior.Source-of-truth boundary
The existing
gatewayMemoryProbeobject is the source of truth:skipped: truemeans the gateway intentionally did not perform an embedding readiness probe. This PR consumes that existing contract in the local provider branch; it does not add a new config option or redefine gateway memory status payloads.Real behavior proof
openclaw doctor --non-interactive --no-colorfrom the issue worktree on Windows Git Bash with an isolatedOPENCLAW_CONFIG_PATH,OPENCLAW_STATE_DIR, andOPENCLAW_HOME. The temporary config setagents.defaults.memorySearch.provider=localand an explicitagents.defaults.memorySearch.local.modelPath=hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf. Gateway auth used an exec SecretRef and the command intentionally omitted--allow-exec, which makes doctor skip gateway health probes instead of running the exec credential.OPENCLAW_CONFIG_PATH=<tmp>/openclaw.json OPENCLAW_STATE_DIR=<tmp>/state OPENCLAW_HOME=<tmp>/home NO_COLOR=1 NODE_OPTIONS="--require <tmp>/node-version-shim.cjs" pnpm -s openclaw doctor --non-interactive --no-coloropenclaw doctorcompleted without renderingMemory search provider is set to "local"orlocal embeddings are not confirmed ready.Review findings addressed
openclaw doctorrun with local memory search configured, showing the false warning strings were absent.Verification
OPENCLAW_CONFIG_PATH=<tmp>/openclaw.json OPENCLAW_STATE_DIR=<tmp>/state OPENCLAW_HOME=<tmp>/home NO_COLOR=1 NODE_OPTIONS="--require <tmp>/node-version-shim.cjs" pnpm -s openclaw doctor --non-interactive --no-colorObserved: exited 0; output showed gateway probes skipped and no local embeddings warning.
node scripts/run-vitest.mjs src/commands/doctor-memory-search.test.ts src/commands/doctor-gateway-health.test.ts src/flows/doctor-health-contributions.test.tsObserved: exited 0.
node scripts/run-oxlint.mjs src/commands/doctor-memory-search.ts src/commands/doctor-memory-search.test.tsObserved: exited 0.
git diff --check HEAD~1 HEADObserved: exited 0.
Regression Test Plan
src/commands/doctor-memory-search.test.tslocalwith an explicithf:model path and passes the gateway skipped-probe shape:checked: false,ready: false,skipped: true.checked: false,ready: false,skipped: falseand expects the warning, preventing the fix from masking real gateway failures.Additional Check
pnpm check:test-typeswas attempted after the commit. It did not pass in this checkout because of an existing unrelated type error outside this diff:Patch quality notes
Merge risk
merge-risk: session-statesignal because doctor memory diagnostics touch memory/session-adjacent health reporting.Risk / Scope
Low risk, diagnostic-only. The failure mode of this change is bounded to doctor output for local memory search.