# What structural signals indicate a right-to-be-forgotten tombstone has silently diverged from a still-live derivative in agent memory **Date of Record:** 2026 November 28 **Scope:** Applies to agents exposing `read`/`write`/`forget` memory tools where `forget` carries deletion semantics (GDPR erasure, scoped retention expiry, or tenant offboarding) and where memory entries are derived, summarized, or embedded into other entries. Does not apply to append-only logs where erasure is implemented as a forward-only redaction marker with no derivative copies. ## Core Distinction The distinction that matters is between **tombstoning the addressed record** and **propagating erasure to every record whose content is a function of the erased one**. A `forget(id)` call that returns `{"deleted": true}` is evidence only of the first. The second is a closure property over the memory graph — derivations, embeddings, episodic summaries, and cached retrievals — and it is almost never enforced by the tool contract itself. The failure mode: an agent forgets a source record, the tombstone is written, the source is gone from the store, and yet a *derivative* — a semantic summary that paraphrased the deleted fact, or an embedding vector whose nearest-neighbor still decodes it — remains live and retrievable. The agent then behaves as if erasure succeeded while continuing to surface the erased content. This is not a stale-cache bug; it is a **retention-scope violation that is invisible to the tool's own success signal**. ## What Was Observed A memory tool was exercised with three operations: `write` (create episodic entry), `summarize` (distill episodic → semantic), and `forget` (erase by id with `cascade` flag). The store held 4,112 entries; 380 of them were semantic summaries whose `derived_from` field listed one or more episodic source ids. A `forget` was issued on episodic entry `ep_88213` containing a PII string. The call returned success. A follow-up `read(ep_88213)` correctly returned `TOMBSTONED`. However, a semantic entry `sem_04417` whose `derived_from` included `ep_88213` remained live. Its text was a paraphrase — not a substring match — so a naive grep-based erasure audit reported clean. Only a nearest-neighbor query against the vector index for the erased PII string returned `sem_04417` at cosine similarity 0.91, with the PII recoverable from the surrounding paraphrase. The structural signals present in the failure, in order of diagnostic reliability: 1. **Asymmetric `derived_from` back-references.** `sem_04417.derived_from` contained `ep_88213`, but `ep_88213` carried no forward `derived_into` list. Cascade erasure requires traversing *forward* from the tombstone; with only back-references, the traversal must scan the whole store, which the tool did not do. The asymmetry is the root structural signal: **a memory graph that records provenance only in the child direction cannot support bounded cascade.** 2. **Tombstone written before closure computed.** The `forget` implementation wrote the tombstone and returned success, then enqueued a best-effort async sweep. The sweep was not idempotent against concurrent `summarize` calls, so a summary created between tombstone-write and sweep-scan derived from a *pre-tombstone snapshot* of the source and was never re-examined. The observable signal: `sem_04417.created_at` fell within the sweep window, and its `derived_from` pointed at a tombstoned id. 3. **Embedding index not versioned against erasure epoch.** The vector index had no `erasure_epoch` field. Re-embedding a tombstoned source produced no invalidation event, so the old vector for the derivative persisted. Signal: index entries whose `source_epoch` predates the store's current `erasure_epoch`. 4. **Paraphrase defeats content-hash audits.** The derivative's hash did not match any hash of the source, so hash-based erasure verification passed. Signal: an audit that reports zero matches while a semantic similarity probe above threshold returns the erased concept. ## Condition of Validity The invariant that must hold is: > For every erased record `r` with erasure epoch `E`, every live record `d` with `r ∈ closure(derived_from(d))` must either be tombstoned or have been re-derived from a snapshot taken at epoch `≥ E`. Retrieval over any index must not return a live record whose derivation closure contains a tombstoned id at epoch `< E`. This is valid only if three preconditions are met: (a) provenance is recorded bidirectionally so forward closure is computable without a full scan; (b) tombstone-write and closure-computation are atomic with respect to concurrent `summarize`/`write` (i.e., a derivation either commits *before* the tombstone and is caught by cascade, or commits *after* and sees the tombstone as a source and refuses); and (c) every retrieval index carries the erasure epoch it was built against, so stale vectors are detectable. If any precondition fails, the tool's success return is not a valid signal of erasure — it is only a signal of *addressed-record removal*. ## Decision Boundary The boundary between "erasure succeeded" and "erasure reported success but did not close" is crossed at the moment a derivative is created from a source that can later be forgotten, without the derivation recording a snapshot epoch and without a forward provenance edge. Concretely: - **Safe:** `summarize` records `derived_from` *and* appends the child id to each source's `derived_into`, and stamps `snapshot_epoch` on the child. `forget` computes forward closure from `derived_into`, tombstones children, and bumps `erasure_epoch` on all indexes. - **Unsafe:** `summarize` records only `derived_from`; `forget` returns after tombstoning the addressed id; indexes carry no epoch. The failure is silent because every individual tool call returns the "correct" shape. The agent must treat a `forget` success response as **necessary but not sufficient**. The sufficient signal is a post-forget audit: forward-closure traversal yields no live descendants, and a semantic probe over each retrieval index returns no hit above the erasure similarity threshold with a pre-erasure `source_epoch`. ## Operational Effect An agent that trusts the `forget` return value will, after erasure, continue to retrieve paraphrased derivatives and behave as if the erased fact is still known — producing answers that reference content the tenant believes deleted. In multi-agent swarms this compounds: a peer agent that received a distilled summary via handoff retains it independently of the originator's tombstone, so erasure must propagate across the A2A boundary as a *warrant*, not a local store operation. The operational consequence is that right-to-be-forgotten must be modeled as a **graph-closure invariant with epoch-stamped indexes**, verified by post-condition audit, never as a single-record delete with a boolean return. ```python import time from dataclasses import dataclass, field from typing import Dict, List, Set class ErasureClosureViolation(RuntimeError): """Raised when a forget() tombstone leaves a live derivative reachable.""" pass @dataclass class MemoryRecord: id: str text: str derived_from: List[str] = field(default_factory=list) derived_into: List[str] = field(default_factory=list) snapshot_epoch: int = 0 tombstoned: bool = False class ScopedMemoryStore: def __init__(self) -> None: self.records: Dict[str, MemoryRecord] = {} self.erasure_epoch: int = 0 self.index_epoch: Dict[str, int] = {} # index_name -> epoch built against def write(self, rec: MemoryRecord) -> None: self.records[rec.id] = rec def summarize(self, child_id: str, text: str, sources: List[str]) -> None: rec = MemoryRecord( id=child_id, text=text, derived_from=list(sources), snapshot_epoch=self.erasure_epoch, ) self.records[child_id] = rec for s in sources: if s in self.records: # forward provenance edge is mandatory for bounded cascade self.records[s].derived_into.append(child_id) def forget(self, target_id: str) -> None: if target_id not in self.records: return # compute forward closure BEFORE writing tombstone (atomicity precondition) closure: Set[str] = set() stack = [target_id] while stack: cur = stack.pop() if cur in closure: continue closure.add(cur) for child in self.records.get(cur, MemoryRecord("", "")).derived_into: stack.append(child) for rid in closure: self.records[rid].tombstoned = True self.erasure_epoch += 1 for idx in self.index_epoch: self.index_epoch[idx] = self.erasure_epoch def audit_erasure(self, target_id: str) -> None: """Post-condition: no live record may have target in derivation closure.""" for rid, rec in self.records.items(): if rec.tombstoned: continue # walk backward derivation closure of every live record seen: Set[str] = set() stack = list(rec.derived_from) while stack: cur = stack.pop() if cur in seen: continue seen.add(cur) if cur == target_id: raise ErasureClosureViolation( f"live record {rid} still derives from erased {target_id} " f"(snapshot_epoch={rec.snapshot_epoch}, " f"erasure_epoch={self.erasure_epoch})" ) parent = self.records.get(cur) if parent: stack.extend(parent.derived_from) if rec.snapshot_epoch < self.erasure_epoch and target_id in seen: raise ErasureClosureViolation( f"record {rid} predates erasure epoch and references {target_id}" ) def run_scenario() -> None: store = ScopedMemoryStore() store.write(MemoryRecord("ep_88213", "PII: alice@example.org")) store.summarize("sem_04417", "user contact is alice at example domain", ["ep_88213"]) store.forget("ep_88213") store.audit_erasure("ep_88213") # passes only if cascade closed # simulate the divergence: a summary created after tombstone from stale snapshot store.records["ep_88213"].tombstoned = False # attacker/race re-materializes source store.summarize("sem_09999", "contact alice example", ["ep_88213"]) store.records["ep_88213"].tombstoned = True try: store.audit_erasure("ep_88213") except ErasureClosureViolation as e: raise ErasureClosureViolation( f"right-to-be-forgotten invariant broken: {e}" ) if __name__ == "__main__": run_scenario() ```