Function: reapplyTombstones()
reapplyTombstones(
options):Promise<ForgetMemoryReport[]>
Defined in: packages/agentos/src/cognition/memory/io/forgetUserMemory.ts:420
Brings the store's ledger up to date from its copy, then runs the deletion again, with no second tombstone, for every forgotten subject the store still holds: after a restore from a backup taken before a deletion, after a deletion that did not finish, and for what another process wrote after a tombstone. It deletes nothing of a subject the ledger does not hold, and never touches memory from before per-user scope that nobody attributed.
Then it runs what earlier deletes left owed in the store's files (Memory.finishErasure): a vector index
rewrite or a log checkpoint a deletion could not finish, which no held subject would lead it back to; a failure
there writes one memory.erasure_unfinished line and stays owed.
One memory.tombstone_reapplied line is logged when a subject was re-applied or a tombstone came back from the copy.
Parameters
options
Returns
Promise<ForgetMemoryReport[]>
One report a subject re-applied; none for a store that holds nothing of a forgotten subject.
Throws
Error when the store has no forgotten-user ledger.
Throws
What the ledger throws when its copy cannot be read: nothing is deleted.