The age bound an indexer works to and what its last pass left out,
shared with status. It also remembers when each transcript left out
was last active, so later passes skip it without reading it again.
Feeds the raw fallback index from the transcript archive and from raw
memories consolidation archived, embedding outside the index lock so
recall is never held behind the model.
Embedding sessions are handed out without fairness, so without this gap
the indexer takes the session straight back and an ingest or recall
waiting for it times out.
Opens the raw index, or rebuilds it from scratch when its files cannot
be read as an index, for example after a schema change: everything in it
is derived from the transcript archive and the store, so the next pass
refills it. An I/O error opening the directories themselves is returned
instead; tantivy and usearch report their own I/O faults without an I/O
cause, so those still rebuild.
open_or_rebuild with the index sealed at rest under keys when given.
Files sealed under a key not given, or sealed when no keys are, cannot be
opened, so the index is rebuilt like one with an unreadable schema.
Withdraws from the raw index every passage of a tombstoned memory, of an
archived transcript whose session was deleted, or with the text of one
of that transcript’s lines (an older copy of a grown transcript holds
them under another source), then drops those transcripts from the
archive. The index stores each text once, so a passage whose text a kept
transcript still holds is filed under that transcript instead. memories
are ids the caller just deleted, checked without a store lookup. The
archive is read, and the vector segments and text files rewritten,
without the index’s write lock, so recall keeps answering; the lock is
held from the last check for doomed passages until the doomed
transcripts leave the archive, so an indexer pass cannot add one back in
between.