Special Thanks
Thanks to @jonatanbellido for a first-time contribution (#140) and @nxxxsooo for continued work hardening the sqlite_vec embedding path (#135, #143).
PATCH release: sqlite_vec delete_memory proxy fix, hash-embedding fallback guard, and embedding-dimension mismatch guard.
Fixed
- fix(storage): add a delete_memory proxy to the sqlite_vec DeleteMixin, delegating to delete() and unpacking its (bool, str) result (#140, @jonatanbellido). DreamInspiredConsolidator calls storage.delete_memory() during forgetting/archival; HybridMemoryStorage and MilvusMemoryStorage already implemented it, but the sqlite_vec backend did not, so consolidation forgetting/archival raised AttributeError and failed silently on sqlite_vec.
- fix(storage): refuse the hash-embedding fallback on non-empty databases (#135, @nxxxsooo). When no ML backend is available, _initialize_hash_embedding_fallback previously installed _HashEmbeddingModel unconditionally, writing SHA256 pseudo-vectors into the same vec0 table as real embeddings and silently poisoning semantic search on databases that already held real memories. The fallback is now allowed only on an effectively-empty database; on a database with data it raises an actionable RuntimeError. Set MCP_MEMORY_ALLOW_HASH_EMBEDDINGS=1/true/yes to force-allow (e.g. for testing) or 0/false/no to force-refuse. When the hash model is installed, embedding_backend_degraded is set to True so health tooling can detect degraded mode.
- fix(storage): guard against a silent embedding-dimension mismatch on the sqlite_vec backend (#143). Configuring a non-default embedding model whose dimension differed from an existing database previously degraded silently to MiniLM-384 and only failed later at INSERT time, reading as data corruption. Now: (1) opening an existing database whose vec0 memory_embeddings table is FLOAT[N] with an embedding model that produces a different dimension raises a clear RuntimeError at init naming both dimensions and the configured model; (2) the ONNX path now logs a prominent warning when a different model is requested instead of logging plain success.
Full changelog: https://codeberg.org/doobidoo/mcp-memory-service/src/branch/main/CHANGELOG.md#1152-2026-07-15