hermes-agent/tests/plugins/memory
cyb3rwr3n cb6d6d46ab fix(memory/holographic): sanitize FTS5 queries for natural-language recall
The FactRetriever's _fts_candidates passed the raw query string directly
to FTS5's MATCH operator. FTS5 defaults to AND-between-tokens, which
means any multi-word prose query like 'what happened with the deployment
rollback' required every single token to co-occur in a fact — dropping
recall to zero on the kind of queries agents actually issue via prefetch().

Fix: add _sanitize_fts_query() that:
- tokenizes the query and drops English stopwords
- strips FTS5 operator characters per token
- OR-joins the remaining content tokens as phrase literals

For pathological inputs (all stopwords, empty), falls back to the raw
query so the caller sees zero results instead of a SQL error.

This is a pure-retrieval-quality fix — the HRR + Jaccard reranking
stages still keep precision high. Ships with 10 tests covering the
sanitizer and retrieval integration.
2026-06-30 15:55:11 -07:00
..
__init__.py fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) 2026-04-05 22:43:33 -07:00
test_byterover_provider.py fix(byterover): honor auto extract config 2026-06-27 04:04:15 -07:00
test_hindsight_provider.py fix(hindsight): lazy-install cloud client dependency 2026-06-19 07:36:28 -07:00
test_holographic_retrieval.py fix(memory/holographic): sanitize FTS5 queries for natural-language recall 2026-06-30 15:55:11 -07:00
test_holographic_shutdown_closes_db.py fix(memory/holographic): close DB connection on shutdown instead of leaking to GC (#54133) 2026-06-28 02:41:52 -07:00
test_mem0_backend.py feat(mem0): v3 API, OSS mode, update/delete tools, telemetry & review fixes (#15624) 2026-06-22 12:30:47 +00:00
test_mem0_providers.py feat(mem0): v3 API, OSS mode, update/delete tools, telemetry & review fixes (#15624) 2026-06-22 12:30:47 +00:00
test_mem0_setup.py feat(mem0): v3 API, OSS mode, update/delete tools, telemetry & review fixes (#15624) 2026-06-22 12:30:47 +00:00
test_mem0_v3.py fix(memory/mem0): recall on the current question + stronger search guidance (#55535) 2026-06-30 15:51:08 +05:30
test_memory_lazy_install.py fix(memory): lazy-install supermemory + mem0 SDKs like honcho/hindsight 2026-06-29 00:25:36 -07:00
test_openviking_provider.py feat(openviking): add full recall prefetch policy 2026-06-24 18:53:49 +05:30
test_supermemory_provider.py fix(memory): lazy-install supermemory + mem0 SDKs like honcho/hindsight 2026-06-29 00:25:36 -07:00