fix(mcp): mark sqlite_integrity not-applicable on non-chroma backends (#1931) - #1946
Merged
igorls merged 1 commit intoJul 8, 2026
Merged
Conversation
…MemPalace#1931) mempalace_status reported a passing SQLite integrity check on non-chroma backends (checked/ok true, sqlite_path pointing at a chroma.sqlite3 that does not exist) even though _refresh_sqlite_integrity_status short-circuits the check there. _sqlite_integrity_payload now reports the check as not-applicable (checked false, ok null, reason) for non-chroma backends, keeping the chroma payload shape and error surfacing unchanged. Co-Authored-By: Zoz92 <66385795+Zoz92@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1931
What does this PR do?
On a non-chroma backend (qdrant, pgvector, sqlite_exact, sqlite_vec) the MCP
mempalace_statustool reported a passing SQLite integrity check that never ran:_refresh_sqlite_integrity_status()already short-circuits the check fornon-chroma backends, and
chroma.sqlite3does not exist for the active backend,so this reads as "integrity verified OK" when nothing was verified and points at
a file that is not there.
_sqlite_integrity_payload()now detects a non-chroma backend and reports thecheck as not-applicable:
Recorded errors only ever come from the chroma path, so a genuine corruption
report is still surfaced unchanged; only the clean non-chroma case is
reclassified. The chroma payload keeps the same keys, so existing clients are
unaffected, and backend resolution is wrapped so status output cannot raise.
Scope is limited to the status payload.
repair.sqlite_integrity_errors()isreached only behind existing chroma guards, so it is left unchanged.
How to test
New tests cover the non-chroma not-applicable payload, an unresolved-backend
fallback, and a regression guard that the chroma payload is unchanged.
Manual check on any non-chroma palace (for example
MEMPALACE_BACKEND=sqlite_exact):mempalace_statusnow returnssqlite_integrity.checked == falseandok == nullwith areason, instead oftrue/truereferencing anon-existent
chroma.sqlite3.Checklist
python -m pytest tests/ -v)ruff check .)