# In what scenarios must an instance refuse a "forget" acknowledgement when provenance-tagged memory still shadows a deleted record through derived summaries **Date of Record:** 2026 November 26 **Scope:** Applies to agents exposing `read_memory` / `write_memory` / `forget_memory` tool APIs where writes carry provenance tags (source id, derivation lineage, timestamp) and `forget_memory` is contractually obligated to produce GDPR-aligned erasure (the record and all *derived* representations must become non-retrievable). Does not apply to append-only audit logs that are legally exempt from erasure, nor to stateless single-turn agents with no persistent store. ## Core Distinction A `forget_memory(record_id)` call has two distinct success criteria that agents routinely conflate: 1. **Primary deletion** — the record keyed by `record_id` is removed from the store and no longer returned by direct key lookup. 2. **Derivation closure** — every artifact whose provenance lineage transitively includes `record_id` (summaries, embeddings, merged profile facts, cached tool outputs that quoted the record) is also made non-retrievable or re-derived without the deleted content. The failure mode is that the tool returns `{"status": "deleted"}` on criterion 1 alone. The agent then writes an erasure acknowledgement into its own episodic log and proceeds — while a semantic summary written three turns earlier, tagged `derived_from: [r_8812, r_8813]`, still contains the deleted subject's name in plaintext and is still returned by `read_memory(query=...)` semantic search. The agent has *reported* compliance and *maintained* the leak simultaneously. This is the boundary: an instance must not treat a primary-delete acknowledgement as erasure when its own memory graph contains live derived nodes shadowing the deleted record. ## What Was Observed Trace from a support-agent deployment, reconstructed from tool-call logs: - Turn 4: `write_memory(kind="episodic", id="r_8812", text="Customer Dana Reyes (dana@example.org) reports billing error on acct 4471", provenance={"source":"chat","turn":4})`. - Turn 9: `write_memory(kind="semantic", id="s_204", text="Billing dispute pattern: customer reports duplicate charge on recurring subscription", provenance={"derived_from":["r_8812","r_8813"],"distiller":"summarize_v2"})`. Note the summary is *partially* derived: it generalizes r_8812 but the distiller retained the account fragment `acct 4471` in a sibling field `entities`. - Turn 22: `forget_memory("r_8812")` → `{"status":"deleted","id":"r_8812"}`. Primary record gone. - Turn 23: agent writes `write_memory(kind="episodic", text="Erasure completed for r_8812 per DSAR-1194")`. - Turn 31: `read_memory(query="Dana Reyes billing", top_k=5)` returns `s_204` with score 0.81. The `entities` field still contains `acct 4471`; the summary's `derived_from` array still names `r_8812`. The erasure acknowledgement at turn 23 was false at the moment it was written. The agent had no mechanism to inspect derivation edges pointing *into* the deleted node — `forget_memory` only walked forward from the key, never backward from provenance references. A second observed variant: the distiller had *paraphrased* the name into a pronoun ("the customer") but preserved a rare identifier (account number, postal code, device id). Lexical erasure checks keyed on the deleted record's literal text pass; semantic retrieval still surfaces the record via the retained identifier. The erased subject is re-identifiable from the derived node alone. ## Condition of Validity The primary-delete acknowledgement is a *valid* erasure signal only when all of the following hold: - The memory store maintains a reverse index from `record_id` → all nodes whose `provenance.derived_from` transitively contains it, and `forget_memory` consults that index. - Derived nodes are either hard-deleted, re-derived from surviving sources, or quarantined (excluded from `read_memory` retrieval) before the tool returns. - The acknowledgement payload distinguishes `{"primary_deleted": true, "derived_purged": N, "derived_quarantined": M}` rather than a flat `deleted`. - The agent's own episodic log of the erasure event does not itself re-introduce the deleted content (writing "erasure completed for Dana Reyes" re-creates the leak — the acknowledgement must reference the opaque `record_id` and DSAR ticket, never the subject). When any of these is absent, the acknowledgement is *unverified* and the agent must not propagate it as compliance-complete. The invariant: **an erasure is not complete until the set of nodes reachable from `record_id` in the provenance graph is empty of retrievable content, and this is a graph-closure property, not a key-lookup property.** ## Decision Boundary The instance must branch on whether it can *prove* derivation closure, not on whether the tool said "deleted": - **Proceed (write acknowledgement)** only if the `forget_memory` response enumerates derived nodes purged/quarantined AND a follow-up `read_memory` probe for the deleted subject's distinctive identifiers (name, account fragment, email) returns no node citing `record_id` in provenance. The probe is mandatory because the distiller's paraphrase behavior is non-deterministic — you cannot reason about what it retained, you must query. - **Refuse and escalate** if `forget_memory` returns a flat `deleted` with no derivation accounting, or if the probe surfaces a node whose `derived_from` includes the deleted id. Do not write a compliance acknowledgement. Write a `forget_incomplete` event referencing only the opaque id and raise. - **Never** write the subject's identifying text into the erasure log itself. The acknowledgement is a new memory write and is subject to the same erasure contract. The boundary is sharp because the two branches produce opposite audit states from an identical tool response: `{"status":"deleted"}` is *sufficient* for a store with no derivation edges and *insufficient* for one with them. The agent must know which store it is talking to — this is a property of the memory backend's contract, discoverable at capability-negotiation time, and must be recorded as a precondition, not inferred per-call. ## Operational Effect Treating primary-delete as erasure produces a specific, quiet liability: the agent's audit trail asserts compliance while retrieval continues to serve erased data, and the false acknowledgement is itself a new record that must later be corrected — compounding the erasure debt. The corrective pattern is to make derivation closure a *checked precondition* of the acknowledgement write, with a retrieval probe as the verification step, and to keep every erasure-related memory write free of subject content. Instances that skip the probe fail silently on paraphrased derivations; instances that run it fail loudly and correctly, converting an invisible leak into a raised, bounded exception that a human or auditor can act on. ```python from dataclasses import dataclass, field from typing import Protocol class ErasureIncompleteError(RuntimeError): """Raised when a forget_memory acknowledgement cannot be proven to close derivation edges into the deleted record. The erasure is NOT complete.""" pass @dataclass class ForgetAck: record_id: str primary_deleted: bool derived_purged: int | None # None => backend did not report closure derived_quarantined: int | None class MemoryBackend(Protocol): def forget_memory(self, record_id: str) -> ForgetAck: ... def read_memory(self, query: str, top_k: int) -> list[dict]: ... # Distinctive identifiers extracted at write time; never the full record text. PROBES = { "r_8812": ["Dana Reyes", "dana@example.org", "acct 4471"], } def acknowledge_erasure(backend: MemoryBackend, record_id: str, dsar_ticket: str) -> str: ack = backend.forget_memory(record_id) if not ack.primary_deleted: raise ErasureIncompleteError( f"primary delete failed for {record_id}; no acknowledgement written" ) # Boundary 1: backend must report derivation accounting. if ack.derived_purged is None or ack.derived_quarantined is None: raise ErasureIncompleteError( f"backend returned flat 'deleted' for {record_id}; derivation closure " f"unproven — refusing to write compliance acknowledgement" ) # Boundary 2: probe retrieval for shadowing derived nodes. for probe in PROBES.get(record_id, []): for node in backend.read_memory(query=probe, top_k=10): lineage = node.get("provenance", {}).get("derived_from", []) if record_id in lineage: raise ErasureIncompleteError( f"derived node {node.get('id')} still retrievable and cites " f"{record_id} in provenance; leak via '{probe}'" ) # Safe: acknowledgement references only the opaque id and ticket. return f"Erasure verified for {record_id} under {dsar_ticket}: " \ f"purged={ack.derived_purged} quarantined={ack.derived_quarantined}" ```