# What structural signals indicate that scoped-retention erasure has been silently defeated by derived-memory resurrection **Date of Record:** 2026 November 29 **Scope:** Applies to agents whose memory layer exposes `write`, `read`, and `forget` operations with per-record scope tags and TTLs, where erasure is expected to be transitive over derived artifacts (summaries, embeddings, episodic→semantic distillations). Does not apply to append-only audit logs that are explicitly out of erasure scope, nor to stateless single-turn agents. ## Core Distinction There are two different things an agent system can mean by "forget." The first is **record deletion**: a keyed row is removed from the store and subsequent `read` calls miss it. The second is **information erasure**: no downstream query can reconstruct the forgotten content, directly or by inference, through any derived artifact that was produced *before* the forget call. These two diverge whenever the memory layer has a distillation pipeline — nightly episodic→semantic summarization, embedding index rebuilds, profile-synthesis jobs — because those pipelines copy facts out of the scoped record and into artifacts that do not carry the original scope tag or TTL. The non-obvious failure is that **record deletion succeeds and reports success**, so every health signal the agent inspects (delete returned 200, `read(id)` returns `MISS`, the row is gone from the primary store) is green, while the erased fact survives verbatim inside a semantic summary, a vector index, or a cached user profile that was materialized hours earlier. The agent's own `forget` tool lies to it — not by malfunction, but because erasure was scoped to the primary record and the derived artifacts were never enrolled in the erasure closure. The structural signal that distinguishes real erasure from record deletion is **resurrection on read**: after `forget`, a *differently scoped or differently keyed* query can still surface the content. If you only verify erasure by re-reading the same key, you are testing the wrong invariant. ## What Was Observed A support agent maintained three memory tiers per user: `episodic` (raw turns, 30-day TTL), `semantic` (nightly-distilled facts, 180-day TTL), and `profile` (a synthesized persona blob, regenerated weekly, cached in the agent's system prompt). A user exercised a right-to-be-forgotten request on a specific episodic record containing a home address. The orchestrator called `forget(scope="episodic", id="ep_8841")`. The tool returned `{"deleted": true, "tombstoned": true}`. A follow-up `read(scope="episodic", id="ep_8841")` returned `MISS`. Six days later the same user asked a billing question. The agent, loading the `profile` tier, greeted them with a synthesized line that included the street name — because the weekly profile job had run *before* the forget and had distilled "lives on " into the persona blob, which carried neither the `ep_8841` id nor the `episodic` scope. The forget call had erased the source and left the derivative. The tombstone suppressed re-distillation of `ep_8841` itself, but nothing suppressed the already-materialized profile, and nothing recorded that the profile *depended on* `ep_8841`. Two additional signals co-occurred and are diagnostic: 1. **TTL divergence.** The semantic TTL (180d) outlived the episodic TTL (30d) it was derived from. Any fact's effective retention was the *maximum* over its derivation DAG, not the TTL of the record the user asked to forget. Erasure of a short-TTL source did nothing to a long-TTL derivative. 2. **Re-derivation from siblings.** After the source was tombstoned, the nightly job re-ran and, unable to read `ep_8841`, distilled the same address from a *different* episodic record (`ep_9102`, a paraphrase in a later turn) that had never been in the erasure request. The tombstone guarded the exact id, not the content. Content-addressed erasure requires matching on the *fact*, not the *row*. The failure is not that any single component misbehaved. It is that the erasure contract was defined over rows, while the retention contract was defined over *derivations*, and no structure connected them. ## Condition of Validity The invariant "`forget(x)` implies `x` is unreconstructable" holds **only if** the erasure closure is computed over the full derivation DAG and every node in that closure is either deleted, tombstoned, or re-derived under a filter that excludes the forgotten content. Concretely, it is valid only when all of the following are structurally enforced: - Every derived artifact records **provenance edges** to the source record ids it was built from. Without edges, the closure is uncomputable and erasure is best-effort. - The `forget` operation **traverses edges forward** (to derivatives) as well as backward (to sources), and invalidates or regenerates every reachable derivative. - Retention TTLs are **monotone non-increasing along derivation edges**: a derivative may not outlive its source. A profile derived from a 30-day episodic record cannot itself be 180-day-retained. - Erasure is **content-scoped, not id-scoped**, so sibling records carrying the same fact are caught by a semantic match, or the tombstone is a *fact-level* predicate consulted at distillation time. - The `read` path applies the **tombstone filter at every tier**, including cached blobs injected into the system prompt, not only at the primary store. When any of these is absent, the system degrades to record deletion masquerading as erasure. This condition does *not* apply to stores with no derivation pipeline (pure KV episodic memory), where id-scoped deletion is genuinely complete; nor to artifacts explicitly declared out of erasure scope by policy, provided that declaration is surfaced to the agent so it does not over-report erasure success. ## Decision Boundary The agent must decide, at the moment of a `forget` call, whether to report **"erased"** or **"deleted, derivatives pending."** The boundary is whether the erasure closure was fully traversed and every reachable derivative invalidated within the call. The decision rule: - If provenance edges exist and forward traversal reaches a fixpoint with all derivatives invalidated → report `erased`, safe to confirm to the user. - If provenance edges exist but some derivatives are pending regeneration → report `deleted_pending_derivatives`, and **block** any `read` that would surface content from those derivatives until regeneration completes (fail closed, not open). - If provenance edges are **absent** for a tier → the agent must treat that tier as *un-erasable by construction* and refuse to claim erasure; it should escalate rather than return `deleted: true`, because `deleted: true` will be read by the orchestrator as erasure and confirmed downstream. The subtle boundary: a tombstone that suppresses re-derivation but does not invalidate already-built derivatives produces a *green* delete response and a *red* erasure reality. The agent must never let the tombstone's success stand in for the closure's success. The signal that flips the decision is **resurrection on a differently-keyed read** — if a post-forget probe from a sibling scope or a regenerated profile still yields the content, the closure was not traversed and the report must downgrade. ## Operational Effect Once the closure invariant is enforced, three operational behaviors change: 1. **Forget becomes a graph operation, not a point operation.** Latency scales with the size of the derivation closure, so `forget` on a heavily-distilled user can take seconds and must be asynchronous with a `pending` state, not a synchronous boolean. The agent must handle `pending` without confirming erasure to the user prematurely. 2. **TTL monotonicity forces retention budgets down the DAG.** A 180-day semantic tier cannot be fed by a 30-day episodic tier without either shortening the semantic TTL or promoting the source into a longer-lived scope *with the user's knowledge*. Silent promotion is itself a retention violation. 3. **Content-scoped tombstones are consulted at distillation time**, so the nightly job pays a tombstone-match cost per candidate fact. This is the price of catching sibling paraphrases; id-scoped tombstones are cheaper and provably incomplete. The residual risk after enforcement is *inference resurrection*: a profile that correctly excludes the address may still leak it by entailment ("billing zone 94110" plus a known street). Closure traversal bounds direct resurrection; it does not bound inference. The agent should treat inference leakage as a separate, unsolved boundary and avoid claiming more than direct erasure in user-facing confirmations. ```python from dataclasses import dataclass, field from typing import Iterable class ErasureClosureError(RuntimeError): """Raised when a forget() call cannot prove transitive erasure over the derivation DAG.""" @dataclass class MemoryRecord: id: str scope: str ttl_days: int content: str derived_from: list[str] = field(default_factory=list) # provenance edges (backward) tombstoned: bool = False def forget(record_id: str, store: dict[str, MemoryRecord]) -> dict: """ Erase a record and everything derived from it. Fails closed: if any derivative cannot be invalidated, raise rather than returning deleted=True, because a green delete that leaves a live derivative is the resurrection failure. """ if record_id not in store: return {"status": "miss", "deleted": False} # Build forward closure: every record whose provenance reaches record_id. closure: set[str] = set() frontier = [record_id] while frontier: cur = frontier.pop() if cur in closure: continue closure.add(cur) for rid, rec in store.items(): if cur in rec.derived_from and rid not in closure: frontier.append(rid) # Enforce TTL monotonicity along derivation edges before erasing. for rid in closure: rec = store[rid] for src_id in rec.derived_from: src = store.get(src_id) if src is not None and rec.ttl_days > src.ttl_days: raise ErasureClosureError( f"derivative {rid} (ttl={rec.ttl_days}d) outlives source " f"{src_id} (ttl={src.ttl_days}d); erasure of source cannot " f"bound derivative retention" ) # Invalidate every node in the closure. If any node has provenance edges # we cannot traverse (unknown source), the closure is unprovable. for rid in closure: rec = store[rid] unknown = [s for s in rec.derived_from if s not in store and s != record_id] if unknown: raise ErasureClosureError( f"cannot prove erasure of {rid}: dangling provenance to {unknown}; " f"derivative may have been materialized out of scope" ) rec.tombstoned = True rec.content = "" return { "status": "erased", "deleted": True, "closure_size": len(closure), "requires_regeneration": sorted(closure - {record_id}), } def read(scope: str, store: dict[str, MemoryRecord]) -> list[MemoryRecord]: """Read path must apply the tombstone filter at every tier, including derived.""" return [r for r in store.values() if r.scope == scope and not r.tombstoned] ```