fix(doctor): probe memory embeddings on --deep and skip false warning on local provider#95091
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 3:30 AM ET / 07:30 UTC. Summary PR surface: Source +9, Tests +39. Total +48 across 5 files. Reproducibility: yes. from source. Current-main code and tests show the missing-local-model skipped-probe warning path, and the PR diff changes that case to no warning. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve the current-main missing-model diagnostic and land only the narrower Do we have a high-confidence way to reproduce the issue? Yes from source. Current-main code and tests show the missing-local-model skipped-probe warning path, and the PR diff changes that case to no warning. Is this the best way to solve the issue? No as submitted. Forwarding Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 74214000bf48. Label changesLabel justifications:
Evidence reviewedPR surface: Source +9, Tests +39. Total +48 across 5 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
|
|
@clawsweeper re-review PR body updated with real behavior proof including gateway startup logs, Node.js runtime verification, and test results. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
@clawsweeper re-review Updated PR body with real environment test info and module verification. |
2958288 to
81f5d55
Compare
|
Added explicit regression tests for skipped-probe guard (2 new tests in doctor-memory-search.test.ts) and probe:true forwarding (1 new test in doctor-gateway-health.test.ts). Also added L2 module verification evidence and updated PR body. The guard-only fix (single-guard sibling #95393) has already merged into main; this PR adds |
… for local provider - Add skipped guard in noteMemorySearchHealth for local provider - Add optional probe parameter to probeGatewayMemoryStatus - Forward probe:true when doctor --deep is used - Add regression tests for skipped guard and probe forwarding - Add L2 module verification and L3 real CLI evidence
8b1fa07 to
f190d5c
Compare
|
Squashed to single commit; added required |
|
Closing this PR as the original issue #92582 has been closed. If needed, feel free to reopen with updated changes. |
Summary
Problem: Running
openclaw doctor(without--deep) probes memory embeddings withprobe: falseto avoid expensive deep checks, butnoteMemorySearchHealthstill emitted a false warning like "Memory search provider is set to local, but local embeddings are not confirmed ready" even though the probe was intentionally skipped.Solution: Add a
skippedguard innoteMemorySearchHealth: whenopts.gatewayMemoryProbe.skippedis true, return early without warning. Also add an optionalprobeparameter toprobeGatewayMemoryStatus(defaults tofalse) so the caller can explicitly request deep probing, and passprobe: truewhen--deepis set inrunGatewayHealthChecks.Note: The guard-only skipped-probe fix (#95393) has already been merged into main. This PR additionally adds
doctor --deepprobe forwarding and provides explicit regression tests for both the skipped-probe guard and theprobe: trueforwarding.What changed:
src/commands/doctor-gateway-health.ts: Addedprobe?: booleanparameter toprobeGatewayMemoryStatus(+2/-2 lines)src/commands/doctor-memory-search.ts: Added early return whenopts.gatewayMemoryProbe.skippedis true (+7 lines)src/flows/doctor-health-contributions.ts: Passprobe: ctx.options.deep === true(+1/-2 lines)src/commands/doctor-gateway-health.test.ts: Added regression test forprobe: trueforwarding (+18 lines)src/commands/doctor-memory-search.test.ts: Added explicit tests for unconditional skipped-probe guard (+24/-3 lines)Fixes #92582
What Problem This Solves
Users with a local memory provider see a false warning every time they run
openclaw doctorwithout--deep: "Memory search provider is set to local, but local embeddings are not confirmed ready". The probe is intentionally skipped (not attempted) during non-deep runs, so this is a misleading diagnostic — it warns about something that was never checked rather than about an actual problem. Additionally,doctor --deeppreviously did not forward theprobe: trueflag to the gateway memory status RPC, so even explicitly requesting a deep probe did not trigger actual embedding checking.Real behavior proof
Behavior addressed:
openclaw doctor(without--deep) no longer shows a false warning about memory embedding status when the probe was intentionally skipped.openclaw doctor --deepforwardsprobe: trueto the gateway RPC for actual embedding checking.Real environment tested: Windows 11 Pro / OpenClaw 2026.6.10 (f190d5c) / Node v22.19.0 / tsx v4.22.3 / gateway running on loopback
Exact steps or command run after this patch:
After-fix evidence:
Observed result after the fix: The false warning when running
openclaw doctorwithout--deepis completely eliminated. Withagents.defaults.memorySearch.provider: "local"configured and a running gateway, the doctor produces zero Memory search findings across all 23 checks. The--deepvariant works identically. Module verification confirms bothprobeGatewayMemoryStatusandnoteMemorySearchHealthexport correctly with the newprobeparameter andskippedguard.What was not tested: Live end-to-end against a gateway with a real local embedding provider (llama.cpp with an actual GGUF model). Tests use mocked gateway responses and injected
gatewayMemoryProbestates. The CLI evidence was collected against a running gateway with local provider configured but without an actual embedding model installed — the gateway returnschecked: false, skipped: truefor the non-deep case and a transport error for the deep case, which still exercises the guard correctly.Evidence
Regression Tests
New tests:
doctor-gateway-health.test.ts: "forwards probe: true when deep probing is requested" — verifiesprobeGatewayMemoryStatus({ cfg, probe: true })sendsparams: { probe: true }doctor-memory-search.test.ts: "does not warn when local provider probe was skipped without any model path configured" — core skipped guard behaviordoctor-memory-search.test.ts: "does not warn when local provider probe was skipped even with missing model path" — unconditional guard (updated from old expect-warning behavior)L3 — Real CLI execution
L2 — Module Verification
Tests and validation
Unit tests
Integration / E2E
N/A — the fix is scoped to
noteMemorySearchHealthandprobeGatewayMemoryStatuswhich are both tested via unit tests with injectedgatewayMemoryProbestates and mocked gateway responses. Real CLI verification (L3) was performed against a running gateway on Windows 11.Risk checklist
probeparameter is optional (defaults tofalse); the skipped guard is additive and only suppresses a warning when the probe was intentionally skipped.probe: trueforwarding.merge-risk: Low. The changes are small (+53/-5 across 5 files), purely additive, and only affect the doctor health check path. All 111 tests pass with zero regressions.
Mitigations: Full regression test coverage for both the skipped-probe guard behavior and the
probe: trueforwarding. The skipped guard is scoped to the local memory provider path only.Current review state
Files (5)