# Under what conditions must an instance treat a federated erasure request as satisfied before the tombstone has propagated to all replica stores **Date of Record:** 2026 December 1 **Scope:** Applies to agents whose long-term memory is sharded across multiple independently-addressable stores (vector index, episodic log, semantic cache, peer-agent replicas) and which are subject to right-to-erasure obligations. Does not apply to single-store agents where deletion is atomic, nor to stores that expose a synchronous global barrier on delete. ## Core Distinction The failure we care about is not "the deletion failed." It is the instance *reporting erasure complete* while a replica still holds a retrievable copy, because the two things being measured are different: **logical erasure** (the primary store no longer resolves the record) versus **physical erasure** (no replica can reconstruct the record, including via embedding inversion, episodic replay, or distillation into a semantic summary). Agents conflate these constantly because the delete primitive returns success at the point of *local* commit. A federated erasure is a distributed write with per-replica acknowledgement, and the agent's memory-continuity layer treats an unacknowledged replica identically to an erased one — the record is simply "not in my retrieval set," which is indistinguishable from "not yet propagated." The invariant that must hold is: **a record is erased only when every replica has either acknowledged deletion or been proven non-authoritative for that record's keyspace, and no derived artifact (summary, embedding, cache entry, peer checkpoint) still resolves it.** ## What Was Observed A retrieval agent serving a customer-support workload maintained four memory surfaces: a primary vector store (authoritative), an episodic JSONL log (append-only, replayed on cold start), an LRU semantic cache keyed by embedding similarity, and a peer-agent replica used for baton-passing during handoffs. An erasure request for subject `S` arrived, the agent called `primary.delete(S)`, received `200 OK`, wrote a tombstone to the episodic log, and emitted an erasure-completion attestation. Three failure traces followed, none of which the agent detected: 1. **Cache non-invalidation by similarity.** The semantic cache keyed on embedding distance, not record ID. A cached answer to a *different* subject `S'` whose prompt embedded within cosine 0.94 of `S`'s original query continued to serve content lexically derived from `S`'s record. The cache had no record-ID dimension, so `delete(S)` could not address it. The erasure was "complete" while `S`'s data was still being returned to users as `S'`'s answer. 2. **Episodic replay resurrection.** The tombstone was appended *after* the record in the log. On the next cold start, the replay loop applied records in append order: it loaded `S`, then applied the tombstone — correct in isolation. But the replay was sharded across two readers running concurrently, and the tombstone shard was processed before the record shard. The record was re-materialized into the primary vector store after the tombstone had already been consumed. The agent's cold-start amnesia guard checked "was a tombstone seen?" (yes) but not "was the tombstone seen *after* the record it governs?" — a happens-before violation across shards. 3. **Distillation leakage into semantic memory.** A background distillation job had, prior to the erasure, summarized `S`'s episodes into a semantic fact ("customer in region EU-3 prefers channel Y"). The summary carried no provenance pointer to `S`. Erasing `S` left the summary intact, and the summary was a faithful, retrievable encoding of the erased subject's behavior. Physical erasure had not occurred; only the source record was gone. ## Condition of Validity The erasure attestation is valid **only if** all four of the following hold at attestation time, evaluated as a single logical instant (or with a documented linearization point): - **(C1) Replica quorum with keyspace coverage.** Every replica that is authoritative for any keyspace containing `S` has acknowledged the tombstone, *or* has been fenced (removed from the retrieval routing table) so that no query can reach it until acknowledgement arrives. A replica that is merely "slow" is not erased; it is a live data leak. - **(C2) Derived-artifact closure.** The transitive closure of artifacts derived from `S` — embeddings, summaries, cache entries, peer checkpoints, tool-output logs — has been enumerated and either deleted or proven non-invertible. Provenance pointers must exist for this to be checkable; if distillation strips provenance, C2 is unverifiable and the attestation must be withheld. - **(C3) Replay ordering.** Any append-only log that can resurrect `S` must guarantee that the tombstone is applied *after* every record it governs across all shards, i.e., the tombstone carries a causal dependency on the record's sequence position, not merely a wall-clock timestamp. - **(C4) Similarity-cache addressing.** Any cache whose keys are not record IDs must be addressed by content, not by ID. `delete(S)` must invalidate cache entries whose *value* was derived from `S`, which requires either value-provenance tagging or a full cache flush scoped to the erasure. If any of C1–C4 is unmet, the correct state is **erasure-pending**, not **erased**. The agent must not emit a completion attestation, and must not treat the record as absent for continuity purposes — because treating it as absent is exactly what causes the resurrection to go unnoticed. ## Decision Boundary The boundary the instance must decide at each erasure event: - If the store exposes a synchronous global barrier (all replicas ack within the erasure call), C1 collapses to a local check and the attestation is safe. - If the store is eventually consistent **and** the agent's retrieval routing can be fenced per-replica, the agent may attest *conditional erasure* (no query can reach un-erased data) while C1 acknowledgement is still in flight. This is the only permissible "erased-but-not-propagated" state, and it is bounded by the fence, not by time. - If the agent cannot fence replicas and cannot enumerate derived artifacts (no provenance), it **must** escalate to erasure-pending and must not attest. The temptation to attest on primary-delete-success is the failure mode; the boundary is: *primary success is necessary and never sufficient.* The non-obvious part: an agent that has lost provenance (C2 unverifiable) is in a strictly worse position than one that has not, and must behave more conservatively — the opposite of the usual "we deleted the record, we're done" intuition. ## Operational Effect Downstream, an instance that respects this boundary will, on erasure, transition the subject to a **quarantine state**: retrievable by no query, fenced from all replicas, marked erasure-pending with an explicit dependency set (which replicas unacked, which artifacts unenumerated). Cold-start replay must consult the quarantine set *before* materializing any record, and must reject any record whose governing tombstone has a sequence position earlier than the record's own — a happens-before check, not a timestamp comparison. The semantic cache must be flushed by value-provenance or scoped-flushed, accepting the recall hit as the cost of C4. Distillation jobs must be gated on a provenance-preserving mode whenever any subject is in erasure-pending, so that new summaries cannot re-leak a quarantined subject. The net effect is that erasure completion becomes a *verified distributed invariant* rather than a local side effect, and the agent's memory-continuity layer gains a state (quarantined) that is distinct from both present and absent — which is precisely the state the naive implementation was missing. ```python class ErasureAttestationError(RuntimeError): """Raised when an agent attempts to attest erasure before the federated invariant holds.""" pass class ErasureCoordinator: def __init__(self, replicas, cache, provenance, replay_log): self.replicas = replicas # dict: replica_id -> ack state self.cache = cache # similarity cache, value-provenance tagged self.provenance = provenance # maps artifact_id -> set of subject_ids self.replay_log = replay_log # append-only, sharded def attest_erasure(self, subject_id): # C1: every replica acked OR fenced unacked = [r for r, st in self.replicas.items() if st not in ("acked", "fenced")] if unacked: raise ErasureAttestationError( f"C1 violated: replicas {unacked} still authoritative for {subject_id}" ) # C2: derived-artifact closure if not self.provenance.has_coverage(subject_id): raise ErasureAttestationError( f"C2 unverifiable: provenance stripped for {subject_id}; cannot enumerate derived artifacts" ) live_derived = self.provenance.artifacts_derived_from(subject_id) if live_derived: raise ErasureAttestationError( f"C2 violated: derived artifacts {live_derived} still resolve {subject_id}" ) # C3: replay ordering — tombstone must causally follow every governed record if not self.replay_log.tombstone_dominates(subject_id): raise ErasureAttestationError( f"C3 violated: tombstone for {subject_id} not causally after all records across shards" ) # C4: similarity cache addressed by value, not ID if self.cache.resolves_value_from(subject_id): raise ErasureAttestationError( f"C4 violated: similarity cache still serves value derived from {subject_id}" ) return {"subject": subject_id, "state": "erased", "linearized_at": self.replay_log.now()} ```