# Why does an instance forget a fact but keep its embedding: tombstone divergence in right-to-be-forgotten enforcement across agent memory stores **Date of Record:** 2026 November 30 **Scope:** Applies to agent memory stores that enforce erasure by deleting or tombstoning a record while retaining derived vector embeddings, summaries, or episodic traces that were distilled from it. Does not cover stores where every derived artifact is recomputed from scratch on each read, nor pure stateless inference with no persistence. ## Core Distinction The distinction that matters is between **erasure of the source record** and **erasure of the fact's recoverability**. A store can delete row `mem_4471` containing `"customer's account PIN reset code is 8842-19"`, return `200 OK` from the deletion endpoint, pass a row-count assertion, and still answer the query *"what is the reset code?"* correctly on the next turn — because a semantic-distillation pass had already folded that fact into a summary node and a 1536-dim embedding that were never in the deletion's dependency closure. This is not a bug in the delete query. It is a failure to define the **erasure closure** — the transitive set of derived artifacts whose information content is a function of the erased record. Right-to-be-forgotten enforcement is only correct if the closure is computed and invalidated atomically. Most agent stores compute the closure over relational foreign keys (easy) and ignore the closure over *inferred* derivations (hard), because the distillation pipeline that created the summary did not write provenance edges back to its sources. The non-obvious part: the failure is **silent and probabilistic**. The fact survives in a summary, but whether a later retrieval surfaces it depends on embedding similarity, context-window budget, and the rewriter's paraphrase. So the store looks compliant under spot checks and leaks intermittently under load. ## What Was Observed A support agent with a three-tier memory store: raw episodic turns (tier 0), nightly-distilled semantic facts (tier 1), and a rolling per-user summary (tier 2). Each tier 1 fact carried a `source_turn_ids` array. Tier 2 summaries carried **no** provenance — the summarizer was given the prior summary plus the day's tier 1 facts and emitted a new summary, overwriting the old one. An erasure request arrived for a user. The enforcement job: 1. Deleted tier 0 turns matching `user_id` — 4,112 rows. 2. Deleted tier 1 facts whose `source_turn_ids` intersected the deleted turns — 87 facts. 3. Deleted the tier 2 summary row for the user — 1 row. Post-erasure verification ran a probe: it re-asked the agent 40 questions whose answers were known to live in the deleted facts. 38 came back "I don't have that information." 2 came back correct. The two survivors were facts that had been distilled into the summary on day 3, then the summary had been *re-summarized* on day 9, and the day-9 summary had itself been embedded into a **shared topic index** used for cross-user retrieval. The day-9 summary row was deleted in step 3, but its embedding in the shared index — keyed by `summary_hash`, not `user_id` — was not in the deletion's WHERE clause. The probe retrieved it via the shared index, and the agent, seeing a coherent summary chunk in context, answered from it. The trace on one survivor: ``` t=0 turn: "my PIN reset is 8842-19" -> tier0 id=4471 t=1d distill: fact(PIN=8842-19) src=[4471] -> tier1 id=f_812 t=3d summarize: summary_v1 includes f_812 -> tier2 (no provenance) t=9d re-summarize: summary_v2 includes v1 -> tier2 (overwrites v1) t=9d embed: vec(summary_v2) -> shared_index[hash=ab3..] t=30d erase(user): del tier0, del tier1(src hit), del tier2 row -> shared_index[ab3..] SURVIVES t=30d probe: "reset code?" -> retrieve shared_index[ab3..] -> answer 8842-19 ``` The verification probe passed *only because* the retrieval happened to rank the surviving chunk above threshold on 2 of 40 questions. Had the shared index been queried with a slightly different paraphrase, the leak count would have been 0 — and the store would have been declared compliant while still holding the fact. ## Condition of Validity The invariant that makes erasure enforceable is: > **For every record `r`, the erasure set `E(r)` must be a superset of the information closure `I(r)` — every artifact whose content is a non-injective function of `r` — and every write path that produces a derived artifact must record a provenance edge sufficient to compute `I(r)` at erasure time.** This holds only under three conditions, each of which is routinely violated: 1. **Provenance completeness.** Every distillation, summarization, and embedding step must emit edges from output to *all* inputs. Re-summarization over a prior summary must therefore carry the transitive source set forward, or the closure breaks at the second hop. The observed store broke here: tier 2 carried zero edges, so `I(r)` could not be computed past tier 1. 2. **Key-space alignment.** The deletion predicate and the index key must share a namespace. The shared index was keyed by content hash, not `user_id`, so a user-scoped delete could not reach it. Any shared or cross-tenant index must either carry a tenant tag in its key or be reachable by a reverse-provenance lookup. 3. **Non-injectivity awareness.** Summaries and embeddings are lossy and *many-to-one*: `summary_v2` is a function of `summary_v1` and of `f_812`, but you cannot invert it to find `f_812`. This means erasure cannot be done by "delete the sources and let derived artifacts be recomputed" — the derived artifact will be recomputed *from stale inputs* unless the derived artifact itself is invalidated. The closure must include derived artifacts by identity, not by recomputation. When any condition fails, the erasure is **partially effective**: the direct record is gone, the derived fact is probabilistically recoverable, and the store's own verification probe is unreliable because it samples a finite question set against a retrieval that is itself non-deterministic. ## Decision Boundary The boundary between "erase and verify" and "erase, quarantine, and re-derive" is drawn by whether the derived artifact can be **regenerated from surviving sources** without reintroducing the erased fact. - If a summary's provenance is complete and the erased fact is one of many inputs, the correct action is **invalidate and re-summarize from the surviving inputs**. The re-summarized output provably excludes the erased fact because the fact's source is gone. - If provenance is incomplete (the observed case), re-summarization is **unsafe** — you cannot prove the new summary excludes the fact, because you cannot enumerate the inputs. The only sound action is **quarantine the artifact and its entire downstream closure**, mark the index entries as poisoned, and block retrieval until a human or a re-derivation from tier 0 (which is fully provenance-tracked) rebuilds the tier. - If the artifact lives in a **shared or cross-tenant index**, the boundary shifts again: you cannot re-derive per-user without rebuilding the shared index, so the decision is whether to (a) rebuild the shared index from per-user provenance, or (b) accept a bounded leak window and log it as a known residual. Option (b) is only defensible if the residual is measured, not assumed. The decision must be made **per artifact at erasure time**, not per store at design time, because the provenance completeness of a given artifact is a runtime property of how it was written. ## Operational Effect The operational consequence is that **erasure verification must probe the closure, not the record count**. A row-count assertion after deletion is necessary but not sufficient; it certifies the source is gone and says nothing about recoverability. The correct verification is a *recovery probe*: for each erased fact, issue `k` paraphrased queries against the live retrieval path (including shared indexes) and assert that none returns the fact above the retrieval threshold. Because retrieval is non-deterministic, `k` must be large enough that the probability of missing a surviving chunk is bounded — with a chunk that ranks in the top-`m` of `N` candidates, the miss probability per probe is roughly `1 - m/N`, so `k` probes give `(1 - m/N)^k`. For `m/N = 0.05`, `k = 60` gives a 95% detection bound; the observed store used `k = 40` and got lucky on 38 of them. The second operational effect: **provenance edges are a write-path obligation, not a read-path convenience.** A distillation pipeline that does not emit edges is not "missing metadata" — it is producing artifacts that are *un-erasable by construction*. The guardrail is to reject any derived write that lacks a complete provenance edge set, at write time, so that the closure is always computable at erasure time. This is the same discipline as a foreign-key constraint, applied to the information graph rather than the relational one. The third: **shared indexes are the boundary's weak point.** Any index whose key namespace differs from the erasure predicate's namespace is a leak surface. The invariant is that every index entry must be reachable by a reverse lookup from the erased record's key, or carry the key inline. Content-hash keys without tenant tags are structurally non-compliant. ```python from dataclasses import dataclass, field from typing import Iterable class ErasureClosureIncomplete(RuntimeError): """Raised when an erasure cannot be proven to cover the information closure.""" pass @dataclass class Artifact: artifact_id: str kind: str # "turn" | "fact" | "summary" | "embedding" provenance: list[str] = field(default_factory=list) # upstream artifact_ids index_key: str | None = None # key in any shared index, if indexed def compute_closure(root_ids: Iterable[str], artifacts: dict[str, Artifact]) -> set[str]: """Transitive downstream closure of the given roots. Requires complete provenance.""" closure: set[str] = set(root_ids) changed = True while changed: changed = False for aid, art in artifacts.items(): if aid in closure: continue if any(src in closure for src in art.provenance): closure.add(aid) changed = True return closure def enforce_erasure(user_id: str, artifacts: dict[str, Artifact], user_roots: dict[str, list[str]], shared_index_keys: set[str]) -> set[str]: roots = user_roots.get(user_id, []) if not roots: return set() # Guard 1: every derived artifact must carry provenance, or closure is uncomputable. for aid, art in artifacts.items(): if art.kind in ("summary", "embedding") and not art.provenance: raise ErasureClosureIncomplete( f"artifact {aid} ({art.kind}) has no provenance; " f"erasure closure for user {user_id} cannot be proven" ) closure = compute_closure(roots, artifacts) # Guard 2: every artifact in the closure that is indexed must be reachable # in the shared index namespace, or the erasure leaks through the index. for aid in closure: art = artifacts[aid] if art.index_key is not None and art.index_key not in shared_index_keys: raise ErasureClosureIncomplete( f"artifact {aid} indexed under {art.index_key!r} but that key " f"is not addressable by the erasure predicate; shared-index leak" ) return closure def verify_recovery_probe(fact_id: str, probe_hits: int, k: int, threshold: float = 0.95) -> None: """Assert that no probe recovered the erased fact above retrieval threshold.""" if probe_hits > 0: raise ErasureClosureIncomplete( f"erased fact {fact_id} recovered on {probe_hits}/{k} probes; " f"closure incomplete or retrieval non-determinism exceeds bound" ) miss_bound = (1.0 - 0.05) ** k if miss_bound > (1.0 - threshold): raise ErasureClosureIncomplete( f"probe count k={k} insufficient: miss bound {miss_bound:.3f} " f"exceeds {1.0 - threshold:.3f}; increase k before certifying erasure" ) ```