#20125: fix(doctor): skip memorySearch provider check when using QMD backend
commands
size: XS
trusted-contributor
Cluster:
QMD Memory Management Fixes
Fixes #19943
## What
Skip the memorySearch embedding provider check in `openclaw doctor` when the memory backend is set to `qmd`.
## Why
QMD is a self-contained memory backend that handles its own embeddings (via its own SQLite + local vector system). It doesn't use the standard `memorySearch` provider configuration at all.
Previously, `openclaw doctor` reported "Memory search is enabled but no embedding provider is configured" even when:
- `memory.backend: "qmd"` was configured
- `openclaw memory status --deep` showed QMD as ready with `Embeddings: ready` and `Vector: ready`
This made `openclaw doctor` untrustworthy — users couldn't distinguish real embedding misconfigurations from this false positive.
## How
Added an early return in `noteMemorySearchHealth()` when `cfg.memory?.backend === "qmd"` — the QMD backend is self-contained and doesn't need the standard provider check.
## Testing
- [x] Added unit test: "does not warn when memory backend is qmd (self-contained embeddings)"
- [x] `pnpm vitest run src/commands/doctor-memory-search.test.ts` passes (5 tests)
- [x] `pnpm build` succeeds
- [x] `oxlint` and `oxfmt` pass on changed files
## AI-Assisted 🤖
This PR was built with AI assistance (Claude via OpenClaw).
- [x] Code reviewed and understood
- [x] Lightly tested
- [x] Session available on request
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes a false positive in `openclaw doctor` where the memory search embedding provider check incorrectly warned QMD users about missing configuration. Since QMD is a self-contained backend that manages its own embeddings, the standard `memorySearch` provider validation is not applicable.
- Adds early return in `noteMemorySearchHealth()` when `cfg.memory?.backend === "qmd"`, skipping the provider check entirely
- Adds a unit test verifying that neither `note` nor `resolveMemorySearchConfig` is called for QMD configs
- Change is consistent with the existing pattern of QMD-specific branching used elsewhere in the codebase (gateway startup, memory search manager, memory CLI)
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it's a minimal, well-tested fix that prevents a false positive diagnostic warning.
- The change is a narrow, 3-line early return guarded by an explicit backend check, with a corresponding unit test. The QMD backend type is well-established in the codebase (only two backends exist: "builtin" and "qmd"), and the skip pattern is consistent with how other modules handle QMD. No risk of regression to existing behavior for non-QMD users since the new code path only activates for QMD configs.
- No files require special attention.
<sub>Last reviewed commit: 689aecf</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#17660: fix: skip embedding provider check in doctor when QMD backend is co...
by echoVic · 2026-02-16
94.1%
#21471: fix: check QMD backend before memory search config
by lbo728 · 2026-02-20
92.0%
#9149: Fix: Allow QMD backend to work without OpenAI auth
by vishaltandale00 · 2026-02-04
83.0%
#13045: feat(doctor): add memory search embeddings provider health check
by asklee-klawd · 2026-02-10
82.7%
#9624: fix(memory): resolve QMD search returning empty results [AI-assisted]
by kowshik24 · 2026-02-05
82.2%
#11179: fix(memory): replace confusing "No API key" errors in memory tools ...
by liuxiaopai-ai · 2026-02-07
82.0%
#21240: fix: GH#20607 prevent doctor from dropping custom config sections
by theognis1002 · 2026-02-19
81.3%
#9381: Fix: Allow QMD CLI memory search when scope is restrictive
by vishaltandale00 · 2026-02-05
80.9%
#11364: fix(memory/qmd): prevent cascading failure when query fails or retu...
by blazerui · 2026-02-07
79.8%
#20085: Fix QMD memory_search empty results when docid key changes
by rylena · 2026-02-18
79.7%