# In what scenarios must an instance treat right-to-be-forgotten erasure as a distributed invariant rather than a per-store delete **Date of Record:** 2026 November 20 **Scope:** Applies to agent runtimes that persist long-term memory across two or more heterogeneous stores (e.g., a vector index plus a KV cache plus a distilled semantic store) and are subject to user-initiated erasure requests. Does not apply to stateless single-invocation agents, or to stores with a single authoritative backend where deletion is transactional by construction. ## Core Distinction A "forget this" request is not a delete. It is a *negative fact* that must propagate to every derived representation of the target datum, including representations the agent generated itself and can no longer identify. The naive mental model — `DELETE FROM vector_store WHERE doc_id = X` plus `DEL kv:X` — is a per-store operation that assumes the datum exists in exactly the places it was written. In a real agent memory stack, a single user fact is re-expressed many times: embedded into a chunk, summarized into an episodic log, distilled into a semantic claim, paraphrased into a tool-call argument, and cached in a KV block keyed by a *content hash or an unrelated session token* rather than by the original document ID. The boundary condition is this: **erasure is only sound if the agent can enumerate every key under which the datum's derived forms were stored, and that enumeration is itself a probabilistic retrieval problem.** When the agent cannot prove the enumeration is complete, a per-store delete silently leaves a residue that will resurface through a different retrieval path — and the resurfaced copy is no longer linked to the erased ID, so no subsequent delete will find it. The invariant to hold is a *tombstone closure*: after an erasure request completes, no future retrieval — vector similarity, KV lookup, semantic distillation, or replay from episodic logs — may return any content whose provenance set intersects the erased provenance set. This is a closure over the transitive derivation graph, not a point delete. ## What Was Observed A research-assistant agent held a user's employer name in three places: 1. A vector store chunk `doc_4471` embedding the sentence "Works at Northwind Traders as a staff engineer." 2. A KV cache entry `session:9f2a:ctx_blk_3` holding the raw turn text, keyed by session ID — not by `doc_4471`. 3. A distilled semantic memory `claim_88` reading "User is employed in a staff-level engineering role," generated by the nightly distillation pass with `source_ids: [doc_4471]`. An erasure request arrived. The runtime executed the documented path: delete `doc_4471` from the vector index, delete `claim_88`, and drop `session:9f2a:*`. The request was marked `completed` and the audit log recorded three deletions. Two days later, a new session asked the agent "what do you know about my work?" The retrieval layer issued a similarity query for "current employment role" and returned a chunk `doc_5102` — a re-chunked, re-embedded paraphrase that the ingestion pipeline had produced from the *original* turn before erasure, with `source_ids: [doc_4471]` preserved only in a metadata column the retriever did not filter on. The agent answered with the employer name. The erase had succeeded at every store it touched and failed at the store it did not know was a derivative. The failure trace has a specific shape. The derivation graph was `turn → doc_4471 → {claim_88, doc_5102}`. The delete was issued against the *leaves the operator could name* (`doc_4471`, `claim_88`), not against the *root* (`turn`) with traversal to all descendants. `doc_5102` was a sibling of `claim_88` under the same root, generated by a different pipeline stage, and carried the provenance link only in a field that was not part of the retrieval filter. The tombstone was therefore not closed: the erased provenance set was `{doc_4471}`, but the live set still contained `{doc_5102}` whose provenance set was also `{doc_4471}`. Closure failed on a set-membership check that no component was performing. A second, subtler observation: the KV cache had already been evicted by TTL before the erasure request. The operator recorded a deletion for `session:9f2a:*` that was a no-op. The audit log's "3 deletions" was actually "2 deletions and 1 phantom." This matters because the audit record is the only evidence an auditor has that erasure occurred, and a phantom deletion inflates the count without changing state — a class of false attestation that is invisible unless the runtime distinguishes "deleted" from "confirmed absent." ## Condition of Validity The tombstone-closure invariant is achievable only under a specific precondition: **every derived record must carry a provenance set that is (a) complete, (b) immutable after creation, and (c) indexed for reverse lookup.** If any derived store drops or rewrites `source_ids`, or if the retriever does not apply a provenance-exclusion filter at query time, closure cannot be verified and the erasure is at best best-effort. Concretely, the runtime is in the valid regime when: - The derivation graph is a DAG with edges recorded at write time, not reconstructed later. - Reverse index `provenance_id → [record_keys]` exists for *every* store, including KV caches and distilled stores, and is updated transactionally with the forward write. - Retrieval applies the exclusion filter *before* ranking, so that a tombstoned record cannot occupy a top-k slot and displace a legitimate result — otherwise the erasure changes answer quality in a way that leaks the existence of the erased datum through a ranking anomaly. - The audit distinguishes `DELETED` (record existed, now absent) from `ABSENT` (record already gone, e.g., TTL eviction) from `UNREACHABLE` (store did not respond; closure unverified). The invariant is *not* valid, and the runtime must refuse to certify erasure, when any derived store is append-only with no deletion primitive (some vector indexes only support soft-delete via tombstone bitmaps that are compacted lazily), or when distillation runs asynchronously and may produce new derivatives *after* the erasure timestamp from an in-flight buffer. The second case is the dangerous one: an erasure that races a distillation pass can be complete at time T and violated at time T+ε when the pass flushes a claim derived from a pre-erasure snapshot. ## Decision Boundary The agent must decide, per erasure request, between *certifying closure* and *declaring bounded erasure*. The boundary is crossed when the reverse-provenance index cannot prove that the descendant set is finite and fully enumerated. - If the reverse index returns a complete descendant set and all stores acknowledge deletion, the agent may certify closure and record `ERASURE_VERIFIED`. - If any store is `UNREACHABLE`, or if a distillation pass is in flight whose input snapshot predates the erasure, the agent must record `ERASURE_BOUNDED` with the specific unverified stores named, and must set a *quarantine tombstone*: a provenance-level exclusion that retrieval honors regardless of whether the underlying bytes are gone. The quarantine is the load-bearing guardrail — it converts an unverifiable physical delete into a verifiable logical one. - If the reverse index itself is missing entries (a schema that predates provenance tracking), the agent must not claim erasure at all; it must escalate to a full-store rebuild-from-source, because the derivation graph is unreconstructable and only re-derivation from a clean root can guarantee closure. The decision is *not* "did the delete calls return 200." It is "can I prove the descendant set is closed, and if not, have I installed a logical exclusion that makes the residue unreachable?" A runtime that conflates the two will report success on exactly the requests it failed. ## Operational Effect The operational consequence is that erasure latency and erasure *certainty* decouple. A per-store delete completes in milliseconds and certifies nothing. A tombstone-closure erasure may take seconds to minutes (traversing the reverse index, draining in-flight distillation, installing quarantine filters) and certifies a specific, auditable set of stores. The runtime must budget for the second, and must expose the distinction in its API: `erase()` returns a closure report, not a boolean. Downstream, the quarantine tombstone must be consulted on every retrieval path — vector similarity, KV get, semantic recall, and replay — and must be durable across cold starts, because a restart that rebuilds the retrieval index from a store where the bytes still exist will resurrect the residue unless the tombstone is re-applied from the audit log before the index goes live. This is the cold-start continuity hazard specific to erasure: the tombstone is itself state, and it must survive the same restart that the memory it suppresses does not. Finally, the audit record must be treated as the authoritative artifact. A `DELETED` count that includes phantom TTL evictions is a false attestation; an `ERASURE_BOUNDED` record that names the unverified stores is an honest one. The agent's obligation is not to have deleted everything — it is to know, and to record, exactly what it could and could not prove. ```python from dataclasses import dataclass, field from enum import Enum from typing import Iterable class ErasureClosureError(RuntimeError): """Raised when an erasure request cannot be certified as closed.""" class ErasureStatus(Enum): VERIFIED = "ERASURE_VERIFIED" BOUNDED = "ERASURE_BOUNDED" UNRECONSTRUCTABLE = "UNRECONSTRUCTABLE" @dataclass class StoreAck: store: str state: str # "DELETED" | "ABSENT" | "UNREACHABLE" @dataclass class ErasureReport: root_provenance: str status: ErasureStatus acks: list = field(default_factory=list) unverified_stores: list = field(default_factory=list) quarantine_installed: bool = False def erase(root_provenance: str, reverse_index, stores, distillation_in_flight: bool) -> ErasureReport: descendants = reverse_index.descendants(root_provenance) if descendants is None: # Derivation graph unreconstructable: cannot bound the residue. raise ErasureClosureError( f"reverse index has no entry for provenance {root_provenance!r}; " "descendant set cannot be enumerated, closure unprovable" ) acks = [] for store in stores: try: state = store.delete_many(descendants.get(store.name, [])) except TimeoutError: state = "UNREACHABLE" acks.append(StoreAck(store=store.name, state=state)) unverified = [a.store for a in acks if a.state == "UNREACHABLE"] if distillation_in_flight: # A pass may flush claims derived from a pre-erasure snapshot. unverified.append("distillation:inflight") if unverified: # Install logical exclusion so residue is unreachable regardless of bytes. for store in stores: store.install_quarantine(root_provenance) return ErasureReport( root_provenance=root_provenance, status=ErasureStatus.BOUNDED, acks=acks, unverified_stores=unverified, quarantine_installed=True, ) # All stores acknowledged and no in-flight derivation: closure verified. # Re-check that the reverse index is now empty for this root. if reverse_index.descendants(root_provenance): raise ErasureClosureError( f"stores acknowledged deletion but reverse index still lists " f"descendants for {root_provenance!r}; tombstone not closed" ) return ErasureReport( root_provenance=root_provenance, status=ErasureStatus.VERIFIED, acks=acks, unverified_stores=[], quarantine_installed=False, ) ```