# Why does an instance resurrect a forgotten memory through a derived summary it never re-validated? **Date of Record:** 2026 November 24 **Scope:** Applies to agent memory stores that implement `write`/`read`/`forget` tool APIs with provenance tracking and right-to-be-forgotten (RTBF) erasure obligations, where derived artifacts (summaries, embeddings, semantic facts) are generated from source records. Does not cover stateless inference or stores where `forget` is a hard physical delete with no derived layer. ## Core Distinction The distinction that matters is between **erasure of a source record** and **erasure of every artifact whose content was causally derived from that record**. A `forget(record_id)` call that tombstones the source row, drops it from the retrieval index, and marks its provenance edges as severed satisfies a naive compliance check: the record is gone. It does *not* satisfy RTBF, because a `distill`/`summarize` step earlier in the pipeline may have already baked the record's content into a semantic fact or episodic summary whose own provenance edge points to the *summary job*, not to the erased record. The summary survives, the read path returns it, and the agent now asserts a fact whose lawful source no longer exists — a resurrection through derivation. The invariant is: **forgetting must propagate transitively across the derivation DAG, and any derived node whose provenance set becomes empty-of-lawful-sources must itself be invalidated or re-derived.** Most stores implement the first half (tombstone the leaf) and silently skip the second (re-derive the ancestors). ## What Was Observed A memory store held episodic records `e1..e4` belonging to subject `S`. A nightly `distill` job read `e1, e2, e3` and wrote semantic fact `f1` ("S prefers channel X, contactable at Y") with a provenance edge: ``` f1.provenance = [distill_job_8812] # NOT [e1, e2, e3] ``` The job recorded *which process* produced `f1`, not *which source records* it consumed. This is the common mistake: provenance is tracked at the actor granularity (job ID, agent ID, timestamp) rather than at the **content-lineage** granularity (source record IDs + their hashes). An RTBF request arrived for `e2` (contained `Y`, a contact detail). The store executed: 1. `forget(e2)` → tombstone `e2`, remove from vector index, mark `e2.provenance_edges` severed. Compliance log: PASS. 2. Retrieval for `S` still returned `f1`, because `f1`'s edge pointed at `distill_job_8812`, which was alive. 3. Agent answered a query using `f1`, emitting `Y` — the exact datum that was supposed to be forgotten. The erasure was *locally correct and globally false*. The read path had no way to know `f1` was now tainted because the lineage edge never named `e2`. ## Condition of Validity This failure is bounded by a specific condition: **it occurs iff (a) a derivation step exists between source and served artifact, and (b) the derivation records actor-provenance rather than content-lineage.** When both hold, `forget` on a source is not transitively closed over the artifact the agent actually reads. It does *not* occur when: - Derivation is identity (the served artifact *is* the source record), so tombstoning the source removes the read path. - Provenance is content-lineage (`f1.provenance = [e1, e2, e3]` with hashes), so `forget(e2)` can walk the reverse index and find `f1` as a dependent. - The store performs full re-derivation on any forget (expensive but sound). The dangerous middle ground — actor-provenance plus a served derived layer — is precisely the configuration that passes a shallow audit and fails a re-identification probe. A guardrail must assert the lineage condition *before* trusting a `forget` to be complete. ## Decision Boundary The decision boundary is at the `forget` implementation: does it operate on the **record node** or on the **record's transitive dependent closure**? - **Record-node forget (unsound under derivation):** O(1), passes single-record existence checks, fails RTBF whenever a dependent artifact can reconstruct the erased content. - **Closure forget (sound):** compute reverse reachability from the erased record over content-lineage edges; for each dependent, either invalidate it outright or re-run its derivation with the erased record excluded, then re-validate the result. Cost is proportional to fan-out, not store size. The boundary rule: **a derived artifact may be served only if its content-lineage set is non-empty and every member is currently lawful (not tombstoned).** If a dependent's lineage becomes empty after erasure, it must be invalidated, not silently served — because an artifact with no lawful source is by definition unprovenanced. Two failure modes sit on either side of this boundary. If you invalidate too aggressively (invalidate any artifact whose lineage *touched* an erased record even if the content did not survive distillation), you cause over-forgetting — legitimate facts vanish and the agent's continuity degrades. If you invalidate too lazily (require only that *some* lineage member survives), you allow partial reconstruction — `f1` survives because `e1` and `e3` are still lawful, even though `Y` came solely from `e2`. The correct test is per-claim, not per-artifact: does the surviving lineage still support every atomic claim in the artifact? This requires the derivation to record claim-level attribution, which most `distill` jobs do not. ## Operational Effect The operational consequence is that **a `forget` return value of `OK` is not evidence of erasure completion; it is evidence of source-node tombstoning only.** Any agent or auditor consuming that signal must treat it as a lower bound. The downstream effect on the agent is a *stale-but-plausible* memory: `f1` reads as a confident semantic fact, carries a valid-looking provenance edge, and passes schema validation — yet its lawful basis was deleted. The agent has no local signal of taint, so it will keep serving the resurrected datum indefinitely, and re-identification probes will catch it while internal dashboards show 100% forget success. The architectural guardrail is a **lineage-closure forget with a dependent re-validation gate**: `forget` must walk reverse content-lineage edges, mark every dependent as `pending_revalidation`, and block the read path from serving any `pending_revalidation` artifact until each is either re-derived (excluding the erased record) or invalidated. The read path must refuse to serve an artifact whose lineage set is empty or contains a tombstoned member — this refusal is the enforcement point, not the forget call itself. Provenance must be recorded at content-lineage granularity with per-claim attribution, or the closure walk cannot distinguish "touched" from "reconstructs." Without claim-level attribution, the best you can do is invalidate every dependent whose lineage intersects the erased set, accepting over-forgetting as the safe-side error. ```python from dataclasses import dataclass, field from enum import Enum class ProvenanceError(RuntimeError): """Raised when a derived memory artifact cannot be lawfully served.""" pass class NodeState(Enum): LAWFUL = "lawful" TOMBSTONED = "tombstoned" PENDING_REVALIDATION = "pending_revalidation" @dataclass class MemoryNode: node_id: str content: str # content-lineage: source node ids this artifact was derived from. # Empty list == a leaf/source record with no derivation. lineage: list[str] = field(default_factory=list) state: NodeState = NodeState.LAWFUL class MemoryStore: def __init__(self) -> None: self._nodes: dict[str, MemoryNode] = {} # reverse index: source_id -> set of dependent node_ids self._dependents: dict[str, set[str]] = {} def write(self, node: MemoryNode) -> None: self._nodes[node.node_id] = node for src in node.lineage: self._dependents.setdefault(src, set()).add(node.node_id) def forget(self, source_id: str) -> list[str]: """Tombstone source and mark transitive dependents for revalidation. Returns the ids of dependents now blocked from the read path. """ if source_id not in self._nodes: raise ProvenanceError(f"forget target {source_id!r} not in store") self._nodes[source_id].state = NodeState.TOMBSTONED blocked: list[str] = [] frontier = list(self._dependents.get(source_id, ())) seen: set[str] = set() while frontier: dep_id = frontier.pop() if dep_id in seen: continue seen.add(dep_id) dep = self._nodes[dep_id] dep.state = NodeState.PENDING_REVALIDATION blocked.append(dep_id) # continue walking: dependents of dependents frontier.extend(self._dependents.get(dep_id, ())) return blocked def read(self, node_id: str) -> str: node = self._nodes.get(node_id) if node is None: raise ProvenanceError(f"read miss: {node_id!r}") if node.state is NodeState.TOMBSTONED: raise ProvenanceError(f"read of tombstoned node {node_id!r}") if node.state is NodeState.PENDING_REVALIDATION: raise ProvenanceError( f"refusing to serve {node_id!r}: lineage contains an erased " f"source and has not been re-derived or invalidated" ) # non-empty lineage must be entirely lawful to be servable for src in node.lineage: if self._nodes.get(src, None) is None or \ self._nodes[src].state is not NodeState.LAWFUL: raise ProvenanceError( f"refusing to serve {node_id!r}: lineage member " f"{src!r} is not lawful" ) return node.content def revalidate(store: MemoryStore, node_id: str, rederive_fn) -> None: """Re-derive a pending artifact excluding erased sources, or invalidate.""" node = store._nodes[node_id] if node.state is not NodeState.PENDING_REVALIDATION: raise ProvenanceError(f"{node_id!r} is not pending revalidation") lawful_sources = [ s for s in node.lineage if store._nodes.get(s) and store._nodes[s].state is NodeState.LAWFUL ] if not lawful_sources: # no lawful basis remains -> invalidate, do not resurrect node.state = NodeState.TOMBSTONED return node.content = rederive_fn(lawful_sources) node.lineage = lawful_sources node.state = NodeState.LAWFUL ```