#21471: fix: check QMD backend before memory search config
commands
size: XS
Cluster:
QMD Memory Management Fixes
Fixes #21443
## Summary
When `memory.backend` is set to `qmd`, `openclaw doctor` was still showing the embedding-provider warning, despite QMD managing embeddings internally.
## Root Cause
The QMD backend check was implemented (#17263) but ran **after** memory search config resolution, which could cause it to be skipped in certain configuration states.
## Changes
- Moved QMD backend check to the top of `noteMemorySearchHealth()`
- Now checks QMD backend **before** resolving memory search config
- Added clarifying comment explaining the check order
## Testing
- All existing tests pass (`doctor-memory-search.test.ts`)
- QMD backend check now runs first, ensuring no false warnings
## Closes
#21443
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Reordered QMD backend check to run before memory search config resolution, preventing false embedding-provider warnings when using QMD. QMD handles embeddings internally and doesn't require a separate provider, so the check correctly exits early before any provider validation logic runs.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- Simple reordering fix with existing test coverage confirming QMD backend check behavior. The change is minimal (moving 6 lines earlier), logic is unchanged, and all tests pass. The fix addresses a clear bug where QMD users received false warnings.
- No files require special attention
<sub>Last reviewed commit: 05c5205</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#20125: fix(doctor): skip memorySearch provider check when using QMD backend
by brandonwise · 2026-02-18
92.0%
#17660: fix: skip embedding provider check in doctor when QMD backend is co...
by echoVic · 2026-02-16
91.0%
#9624: fix(memory): resolve QMD search returning empty results [AI-assisted]
by kowshik24 · 2026-02-05
83.6%
#11364: fix(memory/qmd): prevent cascading failure when query fails or retu...
by blazerui · 2026-02-07
82.6%
#20085: Fix QMD memory_search empty results when docid key changes
by rylena · 2026-02-18
82.2%
#11179: fix(memory): replace confusing "No API key" errors in memory tools ...
by liuxiaopai-ai · 2026-02-07
82.0%
#9149: Fix: Allow QMD backend to work without OpenAI auth
by vishaltandale00 · 2026-02-04
82.0%
#21240: fix: GH#20607 prevent doctor from dropping custom config sections
by theognis1002 · 2026-02-19
81.3%
#13045: feat(doctor): add memory search embeddings provider health check
by asklee-klawd · 2026-02-10
79.8%
#22937: fix: remove legacy unsuffixed QMD collections on upgrade
by sud0n1m-ziggy · 2026-02-21
79.8%