Multi-process live memory, namespaces, topic erasure, 8x cheaper hybrid#2
Merged
Merged
Conversation
Weak points hardened against the LLM-at-ingest / hosted-memory field, each
measured or tested:
- SQLiteStore: lock-guarded shared connection (MCP worker threads) + PRAGMA
data_version staleness probe, so several MCP clients pointed at one DB file
see each other's writes live, without restarts. Two-process + threaded tests.
- Namespaces: SDK metadata_filter on recall/build_context (neighbour-window
expansion respects it too — no scope leaks), MIDAS_MCP_NAMESPACE + per-call
namespace on every MCP tool, stats by_namespace.
- Right-to-be-forgotten: Memory.forget_matching (relevance-matched erasure,
dry-run preview by default in MCP, full deletion audit, deliberately bypasses
durability protections) and chain-safe Memory.forget (supersession chains are
relinked, not orphaned). Policy text gains a FORGET ON REQUEST step.
- Hybrid recall: BM25 index cached on a store change counter + per-term posting
lists — ~66 ms -> ~8 ms/query on a stable 5k store, scores bit-identical.
- MCP build_context: ships the measured temporal grounding ("# Today is" anchor
+ relative ages) and exposes limit/hybrid/namespace.
Measured negative, kept opt-in: hybrid BM25+RRF hurts LongMemEval-s retrieval
(multi-session recall@k 0.97->0.81, temporal 0.95->0.86; ties elsewhere), so it
stays off by default — documented in BENCHMARKS.md. Default dense path re-run
after all changes: bit-identical to baseline (0.97/0.95/0.89, n=40 seed 0).
156 tests pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Weak points hardened against the LLM-at-ingest / hosted-memory field, each measured or tested:
Measured negative, kept opt-in: hybrid BM25+RRF hurts LongMemEval-s retrieval (multi-session recall@k 0.97->0.81, temporal 0.95->0.86; ties elsewhere), so it stays off by default — documented in BENCHMARKS.md. Default dense path re-run after all changes: bit-identical to baseline (0.97/0.95/0.89, n=40 seed 0).
156 tests pass.