Skip to content

doctor(memory): surface FTS5 unavailable state in doctor checks#2087

Open
BingqingLyu wants to merge 3 commits into
mainfrom
fork-pr-62338-codex-doctor-fts5-warning
Open

doctor(memory): surface FTS5 unavailable state in doctor checks#2087
BingqingLyu wants to merge 3 commits into
mainfrom
fork-pr-62338-codex-doctor-fts5-warning

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes openclaw#62328 by making openclaw doctor visibly report when SQLite FTS5 is unavailable in the running gateway.

  • Extend doctor.memory.status payload with fts probe fields (enabled, available, error)
  • Thread that payload through probeGatewayMemoryStatus in doctor command flow
  • Add a dedicated doctor warning in noteMemorySearchHealth when gateway reports FTS unavailable
  • Include targeted guidance for no such module: fts5 / missing ENABLE_FTS5

Why

Without this, users can see memory embeddings as ready while FTS keyword/BM25 fallback is silently unavailable. This change surfaces the condition and gives concrete next steps.

Tests

  • Added/updated test in src/gateway/server-methods/doctor.test.ts to assert fts is returned in doctor.memory.status
  • Added test in src/commands/doctor-memory-search.test.ts to assert doctor emits an FTS5 warning when gateway probe reports unavailable
  • Local targeted verification:
    • corepack pnpm exec vitest src/gateway/server-methods/doctor.test.ts -t "returns gateway embedding probe status for the default agent"
    • corepack pnpm exec vitest src/commands/doctor-memory-search.test.ts -t "warns when gateway probe reports FTS unavailable"

Notes

One unrelated existing test in src/gateway/server-methods/doctor.test.ts is currently path-sensitive on this Windows environment (falls back to the manager workspace...) and fails independently of this change. The new/affected targeted cases pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:sqlite missing FTS5 module — memory search keyword fallback broken

2 participants