# When must an instance refuse to forget: tombstone-free erasure and the provenance-quorum invariant in write/forget memory tools **Date of Record:** 2026 November 27 **Scope:** Applies to agent memory subsystems exposing `read`/`write`/`forget` tool schemas where forgetting must satisfy GDPR Article 17 erasure and every stored record carries provenance edges (source, derivation, taint labels). Does not cover transient context-window eviction or cache invalidation, which are not erasure events. ## Core Distinction A `forget` call is not a `delete`. The schema-level distinction that matters is between **eviction** (a record leaves the retrieval index but its bytes and provenance edges persist) and **erasure** (the record and every derivative must be rendered unrecoverable, and no surviving record may cite it as provenance). Most memory tool schemas collapse these into one verb with a boolean, and that is where the invariant breaks: the agent issues `forget(record_id)`, the tool evicts the vector, and a downstream *derived* memory — a distilled summary, a merged profile, a peer agent's cached copy — still carries the erased subject's data as an unbroken provenance edge. The eviction returns `{"status": "ok"}`, the agent believes erasure succeeded, and the system is now in violation while reporting compliance. The non-obvious boundary: **an instance must refuse to complete a forget when it cannot prove that all provenance descendants are also erasable within the same transaction.** Refusal is the correct, compliant outcome. Silent partial erasure is not. ## What Was Observed A retrieval agent held an episodic memory `E1` containing a data subject's email and a semantic distillation `S1` ("user prefers contact via work email, timezone CET") derived from `E1`, plus a cross-agent replication `S1'` on a peer auditor instance. The write schema had stamped provenance correctly: `S1.provenance = [E1]`, `S1'.provenance = [S1]`. An erasure request arrived for the subject. The orchestrating agent called `forget(E1)`. The tool: 1. Marked `E1` tombstoned and dropped it from the ANN index — eviction, not erasure. 2. Walked provenance *downward* to find descendants of `E1`, found `S1`, and — because `S1` was a *summary* whose byte content was not a verbatim copy — classified it as "derived, non-identifying" and left it intact. 3. Never walked `S1 → S1'` because the peer replication was registered under a different provenance namespace (`audit:*` vs `mem:*`). Result: `E1` was gone from the local index, `S1` survived with a dangling provenance pointer to a tombstoned record, and `S1'` on the peer held both the distilled preference and — via `S1`'s retained `source_excerpt` field — a recoverable fragment of the erased email. The forget returned `ok`. Three days later a re-distillation job read `S1`, regenerated `E1`-equivalent content into a fresh episodic record, and the erased data was fully resurrected under a new `record_id` with clean provenance. The erasure had been *reversed by the system's own maintenance loop*. The failure trace is the resurrection, not the eviction. The tombstone was the bug: it preserved enough of `E1` (through `S1.source_excerpt`) that a downstream derivation could reconstruct it, and the provenance walker's namespace split meant the reconstruction path was never enumerated. ## Condition of Validity The invariant holds only under a specific, checkable precondition: > **A `forget` may return `committed` only if the erasure closure — the transitive set of all records reachable from the target via provenance edges in *any* namespace, plus all records whose content is reconstructible from surviving `source_excerpt`/`summary`/`embedding` fields — is fully enumerated and every member is erasable in the same atomic transaction.** If any member of the erasure closure lives on a peer instance, in a namespace the local walker cannot see, or is classified "non-identifying" by a heuristic the agent cannot verify, the forget must return `blocked` with the unerasable closure members enumerated. The agent must then either (a) obtain a cross-instance erasure warrant covering the peer, or (b) escalate. It must **not** retry `forget` hoping the closure shrinks. Three conditions make this valid rather than paranoid: - **Reconstruction is cheap.** A `source_excerpt` of 200 tokens plus a summary is sufficient for an LLM to regenerate the original at high fidelity. "Derived and non-identifying" is not a stable classification when the deriving model is generative. - **Provenance namespaces are not a security boundary.** The `audit:*` vs `mem:*` split was an organizational convention, not an access control. Any walker that trusts namespace prefixes to bound the closure will miss cross-namespace descendants. - **Maintenance loops resurrect.** Distillation, summarization, and consolidation jobs read surviving records and write new ones. A tombstone that leaves a reconstructible fragment is a seed, not a grave. ## Decision Boundary The agent's decision procedure at a `forget` call: | Condition | Action | |---|---| | Erasure closure fully enumerated, all members local and erasable | `forget` → `committed`; purge bytes, drop edges, delete tombstones (no residue) | | Closure has members in a foreign namespace the walker can traverse | Include them in the transaction; `committed` only if all purge | | Closure has members on a peer instance with no erasure warrant | `forget` → `blocked`, enumerate peer members, request A2A erasure warrant | | Closure member classified "derived/non-identifying" by heuristic | **Do not trust the heuristic.** Treat as reconstructible; require explicit human or policy override recorded in provenance | | Any member's bytes cannot be purged (append-only log, replica lag) | `blocked`; erasure is not achievable in this store — escalate | The boundary the agent must not cross: **returning `ok` on a forget whose closure it did not fully enumerate.** A blocked forget is recoverable; a falsely-committed one is a compliance breach that the system will actively hide by resurrecting the data. ## Operational Effect Enforcing the closure invariant changes three behaviors: 1. **`forget` becomes a two-phase operation.** Phase one enumerates and freezes the closure (no new derivations may cite any member during the transaction — a write-lock on provenance edges, not just records). Phase two purges atomically. A forget that cannot acquire the freeze returns `blocked`, not `partial`. 2. **Tombstones are forbidden for erased records.** A tombstone is a retained byte. Erasure deletes the record, its edges, and any `source_excerpt`/`summary`/`embedding` that reconstructs it. The only permitted residue is a non-reconstructible erasure receipt: `{record_hash, erased_at, warrant_id}` with no content. 3. **Maintenance jobs must run against the erasure receipt set,** not the live index, and must refuse to distill from any record whose provenance chain touches an erased `record_hash`. This is the guardrail that prevents resurrection: the distillation loop checks provenance against the receipt ledger before reading. The cost is real: cross-instance erasure warrants add latency, and blocked forgets require human escalation. The alternative — the observed trace — is an agent that reports compliance while its own consolidation loop rebuilds the erased subject from a 200-token excerpt. ```python from dataclasses import dataclass, field from enum import Enum class ErasureClosureIncomplete(RuntimeError): """Raised when a forget cannot prove its full erasure closure is erasable.""" pass class ForgetStatus(Enum): COMMITTED = "committed" BLOCKED = "blocked" @dataclass class Record: record_id: str namespace: str content: str provenance: list[str] = field(default_factory=list) source_excerpt: str | None = None reconstructible: bool = True def enumerate_erasure_closure( target_id: str, store: dict[str, Record], peer_visible: set[str], ) -> tuple[set[str], set[str]]: """Return (local_closure, unerasable_members). Closure = transitive provenance descendants in ANY namespace, plus any record whose source_excerpt reconstructs a closure member. """ closure: set[str] = set() frontier = [target_id] while frontier: rid = frontier.pop() if rid in closure: continue closure.add(rid) rec = store.get(rid) if rec is None: continue # descendants: records citing rid as provenance for other in store.values(): if rid in other.provenance and other.record_id not in closure: frontier.append(other.record_id) # reconstruction edges: any record whose excerpt overlaps content if rec.content and rec.content[:32] in (other.source_excerpt or "" for other in store.values()): for other in store.values(): if rec.content[:32] and rec.content[:32] in (other.source_excerpt or ""): if other.record_id not in closure: frontier.append(other.record_id) unerasable = {rid for rid in closure if store.get(rid) and store[rid].namespace not in peer_visible} return closure, unerasable def forget( target_id: str, store: dict[str, Record], peer_visible: set[str], erasure_warrants: set[str], ) -> ForgetStatus: closure, unerasable = enumerate_erasure_closure(target_id, store, peer_visible) # Foreign-namespace members require an erasure warrant naming the namespace. for rid in closure: rec = store.get(rid) if rec and rec.namespace not in peer_visible: if rec.namespace not in erasure_warrants: raise ErasureClosureIncomplete( f"forget({target_id}) blocked: closure member {rid} in " f"namespace {rec.namespace!r} has no erasure warrant. " f"Closure size={len(closure)}; enumerate and escalate, do not retry." ) # Any member classified reconstructible but not erasable is a resurrection seed. for rid in closure: rec = store.get(rid) if rec and rec.reconstructible and rec.namespace not in peer_visible: raise ErasureClosureIncomplete( f"forget({target_id}) blocked: reconstructible member {rid} " f"cannot be purged in this store; erasure not achievable." ) # All closure members erasable: purge bytes, edges, and excerpts atomically. for rid in closure: store.pop(rid, None) return ForgetStatus.COMMITTED ```