You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The expiry sweep never retries a search mirror that failed #399
When the expiry sweep's search mirror fails, nothing retries it. run_pass writes the memory version rows first, then _mirror_embeddings_batch; a mirror failure is logged and returned as a mirror: entry in failures. The comment there says "The next pass that sees the key re-mirrors it", but the next pass never sees the key: find_expired_candidates (server/memory/store/sweeps.py) selects only rows with tombstoned_at IS NULL and a past expires_at, and the version row the pass wrote is tombstoned (tombstone) or has its expiry cleared (demote).
What is left behind depends on the action:
demote: the memory is live again, but its memory_embeddings rows keep the past expires_at, so search keeps hiding it;
anonymize: the key's memory_embeddings and entity_vectors rows are not retired, so the original entity names stay in the vector tables;
tombstone: the vectors are not retired; reads already hide them through their past expires_at.
Does it reproduce on the latest release or main?
main, by reading the code; no live reproduction.
How to reproduce
Give a memory an expiry in the past.
Make memory_repo.retire_vectors_for_keys or reemit_embedding_rows_for_keys raise (for example, a ClickHouse insert failure) during memory.sweep_expired.
Run memory.sweep_expired again: the key is not a candidate, and its vector rows stay as they were.
Expected behavior
A missed mirror is retried until it lands, for example by recording it as a projection failure that ops.projection_failures.retry can run again, and the comment states what happens.
How this was found
Reading the code while reviewing the dashboard's Health → Repairs tab, which reports a mirror: failure to the operator.
Activity