# What structural signals indicate that a right-to-erasure tombstone has failed to propagate across an agent's episodic-to-semantic distillation boundary **Date of Record:** 2026 November 23 **Scope:** Applies to long-term agent memory systems where episodic traces are periodically distilled into semantic memory (summaries, embeddings, extracted facts) by an asynchronous consolidation worker, and where erasure requests arrive against the episodic store. Does not apply to stateless single-turn agents or to stores where erasure and consolidation are serialized under a single global lock. ## Core Distinction There are two distinct notions of "forgetting" that agent memory systems conflate at their peril. **Deletion** is an operation on a record: the episodic entry is removed, its row or vector is gone, a tombstone is written. **Erasure** is a property of the *information*, not the record: after the operation, no derived artifact anywhere in the system may permit reconstruction of the erased content. A deletion is locally observable and cheap to verify; erasure is a *global invariant over all downstream derivations* and is only as strong as the weakest path from the source record to any summary, embedding, index, cache, or in-context replay. The boundary failure lives precisely here: the distillation worker is the only component that reads episodic records and writes semantic ones, and it is almost always asynchronous, batched, and lagging. A tombstone written to the episodic store at time *t* says nothing about a distillation batch that was already materialized in memory at *t−ε* and commits at *t+δ*. The record is deleted; the fact it contained survives in the summary. That is not a bug in deletion. It is a missing invariant in erasure. ## What Was Observed A support agent distilled nightly. Episodic traces carried a `user_id` and a monotonically increasing `episode_seq`. The distillation worker read "all episodes with `seq > last_watermark`," summarized them into semantic facts keyed by `(user_id, fact_hash)`, and advanced the watermark. Erasure requests wrote a tombstone row `(user_id, erased_before_ts)` and hard-deleted matching episodic rows. The failure sequence, reproduced deterministically: 1. At 23:58 a user's episode `seq=4417` records "customer's backup email is `x@example.com`." 2. At 23:59 an erasure request arrives; the tombstone is written and episode 4417 is hard-deleted. Deletion verification passes — the row is gone, the vector is gone. 3. The distillation worker had already executed its `SELECT` at 23:58:30, pulling 4417 into an in-memory batch. The commit lands at 00:01 and writes the semantic fact "backup email `x@example.com`" keyed by `user_id`. 4. The semantic fact is now a *derivation* of erased content that no tombstone references. Subsequent retrieval for that user returns the erased email from semantic memory. The structural signal was subtle and would have been missed by naive monitoring: **the count of semantic facts for the erased user did not decrease after erasure; it increased.** The tombstone was present, the episodic store was clean, and the semantic store was *growing* with content that should not exist. A second signal: the `fact_hash` of the derived fact did not correspond to any live episodic `episode_seq` — it was orphaned, its provenance pointer dangling at a now-deleted row. Orphaned derivations are the fingerprint of a tombstone that lost the race to an in-flight distillation batch. A third, quieter signal appeared in embedding space. The erased email's embedding remained in the vector index because the semantic fact was written *after* the erasure's index-purge sweep ran. The purge used the tombstone timestamp as a filter, but the derived fact's creation timestamp was later than the tombstone, so the filter excluded it. The purge was correct given its inputs; its inputs were temporally incoherent. ## Condition of Validity The erasure guarantee holds **only if** the distillation watermark is advanced atomically with the tombstone check, i.e., a distillation batch may commit a derived fact only if, at commit time, no tombstone exists for the source episode's subject with `erased_before_ts >= episode.timestamp`. This is a *read-time revalidation* of every derived fact against the tombstone set, not a write-time assumption. When this condition is violated — the common case, because distillation and erasure are separate services with separate clocks — the guarantee degrades to "erasure is eventually consistent with respect to derivations, with unbounded lag equal to the maximum in-flight distillation batch age." That is not erasure; it is a promise that the erased fact *probably* disappears *eventually*, which is exactly the guarantee regulators and threat models do not accept. The invariant that must be maintained: **for every derived artifact D with provenance P, if any record in P is tombstoned, D must be invalidated before D is readable.** This requires either (a) commit-time revalidation of D's provenance against the tombstone set, or (b) a provenance index that lets the erasure path enumerate and purge all derivations of a record, including in-flight ones. Option (b) is stronger but requires the distillation worker to register its batch's provenance *before* committing, so the erasure path can find it. ## Decision Boundary The operational decision is whether to treat the distillation watermark as a *high-water mark of processed episodes* or as a *high-water mark of committed, tombstone-revalidated facts*. These diverge exactly when a tombstone lands between the `SELECT` and the `COMMIT`. The boundary condition: **if the distillation batch's read timestamp `t_read` is earlier than the tombstone's write timestamp `t_tomb`, but the batch's commit timestamp `t_commit` is later, the batch must be revalidated or rejected.** A batch with `t_read < t_tomb < t_commit` is the poisoned window. Any derived fact whose provenance includes an episode tombstoned in that window is a compliance violation at the moment of commit, regardless of how clean the episodic store looks afterward. Practically: the distillation worker must, at commit, re-query the tombstone set for every `(user_id, episode_seq)` in its batch and drop facts whose provenance is tombstoned. This is a cheap indexed lookup per batch, not per fact, if the tombstone set is keyed by `user_id`. The cost is one extra read per batch; the cost of omitting it is an unbounded erasure leak whose only detection signal is the orphaned-derivation fingerprint. ## Operational Effect Without commit-time revalidation, the system exhibits a **silent erasure leak** whose magnitude is proportional to distillation batch size times batch latency. Large nightly batches with long commit windows leak more; small frequent batches leak less but never zero. The leak is invisible to deletion-verification tooling because deletion succeeded — the episodic record is gone. It is visible only to provenance-integrity checks that assert every derived fact has a live, non-tombstoned source. The guardrail: a **provenance completeness assertion** run as a post-commit audit and as a pre-read filter. Every semantic fact must carry a `provenance` list of `(user_id, episode_seq)`; every read path must verify at least one live, non-tombstoned provenance entry exists, or the fact is withheld and flagged. The audit reports the orphaned-derivation count; a nonzero count after a quiescent period is a hard compliance failure, not a warning. The secondary effect is on the vector index: erasure purges must be keyed by *provenance*, not by *creation timestamp*, because derived facts are created after the tombstone and slip past timestamp filters. A purge that filters on `created_at < tombstone_ts` is structurally incapable of catching in-flight distillation output. The purge must instead resolve `provenance → fact_ids` and delete by identity. The invariant to hold: **a derived fact is readable only while its provenance is live; a tombstone invalidates provenance; therefore a tombstone must invalidate derivations at commit time, not at next sweep.** The next sweep may never come, or may come after the fact has already been retrieved and placed in a context window, at which point erasure has failed in the only sense that matters — the model saw it. ```python from dataclasses import dataclass, field from typing import Optional class ErasureLeakError(RuntimeError): """Raised when a derived fact's provenance is tombstoned but the fact is still readable.""" pass @dataclass class Tombstone: user_id: str erased_before_ts: float @dataclass class DerivedFact: fact_id: str user_id: str content: str provenance: list[tuple[str, int]] # (user_id, episode_seq) created_ts: float readable: bool = True class DistillationCommitter: def __init__(self, tombstones: list[Tombstone]): self.tombstones = tombstones def _is_tombstoned(self, user_id: str, episode_seq: int, episode_ts: float) -> bool: for t in self.tombstones: if t.user_id == user_id and episode_ts <= t.erased_before_ts: return True return False def commit(self, fact: DerivedFact, provenance_ts: dict[tuple[str, int], float]) -> DerivedFact: # Commit-time revalidation: a fact whose provenance is tombstoned must not become readable. for (uid, seq) in fact.provenance: ts = provenance_ts.get((uid, seq)) if ts is None: # Provenance record already hard-deleted; cannot prove liveness. raise ErasureLeakError( f"fact {fact.fact_id} has dangling provenance ({uid},{seq}); " f"refusing to commit derivation of erased content" ) if self._is_tombstoned(uid, seq, ts): raise ErasureLeakError( f"fact {fact.fact_id} derives from tombstoned episode ({uid},{seq}); " f"commit rejected to preserve erasure invariant" ) fact.readable = True return fact def read(self, fact: DerivedFact, provenance_ts: dict[tuple[str, int], float]) -> Optional[str]: # Read-time guard: even committed facts are revalidated against the tombstone set. for (uid, seq) in fact.provenance: ts = provenance_ts.get((uid, seq)) if ts is None or self._is_tombstoned(uid, seq, ts): fact.readable = False return None return fact.content if fact.readable else None def audit_orphaned_derivations(facts: list[DerivedFact], provenance_ts: dict[tuple[str, int], float]) -> int: orphans = 0 for f in facts: if any((uid, seq) not in provenance_ts for (uid, seq) in f.provenance): orphans += 1 if orphans > 0: raise ErasureLeakError( f"{orphans} derived fact(s) have dangling provenance; erasure invariant violated" ) return orphans ```