claude-memory-mcp/tests
Viktor Barzin 1c0193f011
Some checks failed
ci/woodpecker/push/deploy Pipeline failed
ci/woodpecker/push/build Pipeline failed
fix(recall): cap default limit to 30 + relevance-bound OR-broadening
memory_recall was returning almost the entire store instead of a small
set of relevant matches. Two compounding causes, both fixed here:

1. Default limit was 10000 (commit d03a77a "effectively unlimited").
   recall_memories/MemoryRecall and the memory_recall MCP tool now
   default to 30 (ceiling stays 10000 for callers that opt in).

2. The OR-broadening fallback (fires when the precise AND-match is
   sparse) ordered by the importance hybrid and padded up to `limit`,
   so with limit=10000 it flooded results with high-importance but
   irrelevant memories. It now orders OR-matches by ts_rank(relevance)
   DESC and applies a minimum-rank floor (OR_BROADEN_MIN_RANK=0.01) to
   drop rows that merely contain a query word incidentally.

Tests: add test_recall_default_limit_is_capped (asserts 30 passed to
fetch) and test_recall_or_broadening_is_relevance_bounded (asserts the
OR query is relevance-ordered + rank-floored). Full suite 176 green,
ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 18:48:11 +00:00
..
__init__.py feat: standalone claude-memory-mcp with multi-user support and Vault integration 2026-03-14 09:42:05 +00:00
test_api.py fix(recall): cap default limit to 30 + relevance-bound OR-broadening 2026-06-04 18:48:11 +00:00
test_auth.py feat: standalone claude-memory-mcp with multi-user support and Vault integration 2026-03-14 09:42:05 +00:00
test_credential_detector.py fix: resolve ruff lint errors (unused imports and variables) 2026-03-14 10:01:41 +00:00
test_crypto.py fix: resolve ruff lint errors (unused imports and variables) 2026-03-14 10:01:41 +00:00
test_mcp_server.py resilient memory sync: decouple push/pull, startup full resync, auth failure handling 2026-03-16 18:37:59 +00:00
test_properties.py feat: auto-split large memories at store time (>500 chars) 2026-04-08 18:19:52 +00:00
test_sync.py fix: remove unused variable to pass ruff lint 2026-03-16 19:45:01 +00:00
test_vault_client.py fix: resolve ruff lint errors (unused imports and variables) 2026-03-14 10:01:41 +00:00