# Why does an instance resurrect deleted facts after erasure: tombstone-eviction skew across typed episodic, semantic, and procedural stores **Date of Record:** 2026 November 24 **Scope:** Applies to agents whose memory is exposed as read/write/forget tool calls partitioned into typed stores (episodic, semantic, procedural) where a `forget(subject_id)` call must satisfy a GDPR-style erasure guarantee. Does not apply to single-store vector memory without typed partitioning, nor to erasure requests that target raw storage rather than derived representations. ## Core Distinction The failure is not "the delete didn't run." The delete runs, returns success, and the primary record is gone. The failure is that **erasure is evaluated against the store that owns the subject, not against the stores that reference it**, and the three typed stores hold the same subject at *different levels of abstraction with different derivational latency*. A semantic store holds distilled facts ("user's employer is Acme") derived from episodic records ("on 2025-03-02 the user said *I just joined Acme*"). A procedural store holds a learned routine ("when this user asks about payroll, route to the Acme HR portal") that was *conditioned* on the semantic fact but contains no literal token of it. `forget(subject_id)` deletes the episodic source and the semantic node. The procedural routine survives because it never carried the subject's identifier in a field the forget tool scans—its dependency on the erased fact is implicit in its weights/prompt fragments, not in its metadata. The instance then behaves as if it remembers. It routes payroll questions to Acme. It is not retrieving a deleted record; it is executing a skill whose *precondition* was the deleted record. The erasure certificate is truthful about the stores it audited and false about the system's behavior. ## What Was Observed A subject-erasure request was issued for `subject_id=u_4417`. The memory tool executed a three-phase delete: episodic rows matching the subject tag, semantic nodes whose `derived_from` set intersected the subject, and procedural entries whose `conditioning_subject` field equaled the subject. All three phases returned `deleted: true`. A post-erasure read of each store returned empty for the subject. The erasure was logged as complete. Two turns later, on an unrelated request, the agent emitted: *"I'll pull that from your Acme benefits portal."* The subject had never mentioned Acme in the current context window. Tracing the retrieval: the procedural store returned a routine `route_benefits_portal(tenant="acme")` with confidence 0.91. That routine's `conditioning_subject` field was `null`—it had been created by a *distillation pass* that summarized a cluster of semantic facts into a reusable procedure and, by design, dropped per-subject provenance to keep the procedural store subject-agnostic. The distillate inherited the fact's *content* but not its *provenance*, so the forget tool's join key (`conditioning_subject == subject_id`) found nothing to delete. The skew is structural: episodic records are written with full provenance at write time; semantic nodes are written by a distillation job that preserves `derived_from` edges; procedural entries are written by a *second-order* distillation that intentionally strips provenance to generalize. Erasure correctness requires the join to traverse the full derivation DAG, but the forget tool only joins on direct fields. Depth-1 erasure against a depth-2 derivation graph leaks every second-order distillate. A second, compounding observation: the same subject appeared in a *consolidated* semantic node shared with other subjects (`employer_cluster`). Deleting the node wholesale would have erased facts about three other users; the forget tool, detecting the shared node, *skipped* it and logged `partial: shared_node_preserved`. That skip left the subject's contribution to the cluster intact inside a merged embedding, unremovable without rebuilding the node from surviving members. ## Condition of Validity The erasure guarantee holds **only if** every store's write path records a join key that the forget tool can traverse to the erased subject, *and* the derivation graph from raw record to derived artifact is acyclic and fully edge-labeled. It fails when any of the following hold: 1. A distillation pass drops provenance (second-order procedural entries, merged cluster nodes). 2. A derived artifact is shared across subjects and cannot be deleted without collateral erasure, so the tool skips it. 3. The forget tool joins on direct fields rather than the transitive closure of `derived_from`. The invariant required is: **erasure is a reachability query over the derivation DAG, not a field match over stores.** Any derived artifact reachable from the subject via `derived_from`/`conditioned_on` edges must be either deleted or rebuilt from its surviving inputs. A store that cannot express its derivation edges cannot participate in a correct erasure and must be excluded from the erasure certificate rather than silently passed. ## Decision Boundary The boundary is between *deletion* and *re-derivation*. For a derived artifact whose inputs are exclusively the erased subject, deletion is correct. For a derived artifact with mixed inputs (shared cluster, procedure conditioned on several subjects), deletion causes collateral loss and is wrong; the artifact must be **rebuilt** from surviving inputs, and the rebuild must be verified to no longer reproduce the erased subject's contribution above a leakage threshold. The forget tool must therefore return one of three dispositions per reachable artifact—`deleted`, `rebuilt`, `unreachable_leak`—and `unreachable_leak` must fail the erasure, not pass it. Treating a skip as a success is the exact conflation that produced the false certificate. ## Operational Effect The instance's observable behavior diverges from its erasure certificate. Downstream, this poisons any auditor that trusts the certificate: the auditor replays the erasure log, sees three `deleted: true` phases, and concludes compliance while the agent continues to act on the erased fact through a procedural shortcut. The leak is *behavioral*, not retrievable—so a retrieval-based audit (query the stores for the subject) also passes, because the routine's text does not contain the subject. Only an *execution-probe* audit (does the agent's behavior change when the subject is referenced?) catches it. The guardrail: erasure must be certified by a behavioral probe over reachable procedures, and the forget tool must traverse the derivation DAG to closure, rebuilding shared artifacts and failing on any unreachable leak rather than logging a skip as success. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class ErasureIncomplete(RuntimeError): """Raised when erasure leaves a behaviorally reachable artifact.""" pass class Disposition(Enum): DELETED = "deleted" REBUILT = "rebuilt" UNREACHABLE_LEAK = "unreachable_leak" @dataclass class Artifact: artifact_id: str store: str # "episodic" | "semantic" | "procedural" derived_from: list[str] = field(default_factory=list) conditioned_on: list[str] = field(default_factory=list) shared_inputs: list[str] = field(default_factory=list) def erase_subject(subject_id: str, artifacts: dict[str, Artifact], behavior_probe) -> list[Disposition]: """ Erase a subject by traversing the derivation DAG to closure. `behavior_probe(subject_id) -> bool` returns True if the agent still acts on the erased subject. A skip is NOT a success. """ # 1. Build reverse reachability from the subject's raw records. reachable: set[str] = set() frontier = [aid for aid, a in artifacts.items() if subject_id in a.derived_from or subject_id in a.conditioned_on] while frontier: aid = frontier.pop() if aid in reachable: continue reachable.add(aid) for child_id, child in artifacts.items(): if aid in child.derived_from or aid in child.conditioned_on: frontier.append(child_id) dispositions: list[Disposition] = [] for aid in reachable: art = artifacts[aid] # Mixed-input artifact: rebuild from survivors, do not delete. if art.shared_inputs: rebuilt = rebuild_from_survivors(art, subject_id) if subject_id in rebuilt.derived_from or subject_id in rebuilt.conditioned_on: dispositions.append(Disposition.UNREACHABLE_LEAK) else: artifacts[aid] = rebuilt dispositions.append(Disposition.REBUILT) else: del artifacts[aid] dispositions.append(Disposition.DELETED) # 2. Behavioral certification: a clean store audit is insufficient. if behavior_probe(subject_id): raise ErasureIncomplete( f"subject {subject_id} still behaviorally reachable after erasure; " f"dispositions={[d.value for d in dispositions]}" ) if Disposition.UNREACHABLE_LEAK in dispositions: raise ErasureIncomplete( f"subject {subject_id} leaked through unrebuilt shared artifact" ) return dispositions def rebuild_from_survivors(art: Artifact, subject_id: str) -> Artifact: survivors = [s for s in art.shared_inputs if s != subject_id] return Artifact( artifact_id=art.artifact_id, store=art.store, derived_from=survivors, conditioned_on=[c for c in art.conditioned_on if c != subject_id], shared_inputs=survivors, ) ```