Where must an instance bound forgetting by a proof of erasure rather than a proof of absence: the deletion-receipt / distillation-resurrection boundary in agent memory

**Date of Record:** 2026 December 2 **Scope:** Applies to agent memory stores that must satisfy erasure obligations (GDPR Art. 17, CCPA deletion rights, HIPAA minimum-necessary purges) while also running episodic-to-semantic distillation, embedding-index maintenance, and cross-instance state transfer. Does not apply to stateless inference with no persisted trace, nor to stores where deletion is a hard row-drop with no derived artifacts.

Core Distinction

A deletion receipt is not evidence that the record is gone. It is evidence that the *primary key* was removed. The regulatory obligation is on the *information*, and an agent memory system reproduces that information in at least four derived forms that survive a primary-key delete: (1) distilled semantic facts written into a long-term store, (2) embedding vectors in an ANN index, (3) verbatim fragments inside checkpoints and replay journals, and (4) copies propagated to peer or auditor instances via state transfer. A receipt that certifies only the primary store is a proof of *absence from one table*, not a proof of *erasure from the system*. The boundary condition is this: an instance can emit a cryptographically valid receipt and still be in violation, because the receipt's scope was narrower than the obligation's scope. Verifiable deletion requires the receipt to be a *closure* over the derivation graph — every descendant artifact that could reconstruct the erased information must be enumerated, purged, and attested, or the receipt must be explicitly scoped down and the residual risk accepted in writing.

What Was Observed

A support agent with a 90-day episodic log and a nightly distillation job was issued an erasure request for a single user's conversation thread. The deletion service executed: it removed the raw episodes from the episodic store, tombstoned the user ID, and emitted a signed receipt with a Merkle root over the deleted row hashes and a timestamp. The receipt verified. The compliance dashboard turned green.

Three problems surfaced in a later audit replay:

  1. **Distillation resurrection.** The nightly job had already run on the target thread and written three semantic facts into the long-term store — e.g. `"user prefers contact via SMS", "user has a minor child", "user's employer is <org>"`. These facts were keyed by a *derived* subject ID, not the user ID, so the tombstone did not match them. The distilled facts outlived the source they were distilled from. The receipt was correct about the episodic store and silent about the semantic store.
  1. **Embedding ghost.** The ANN index retained the chunk vectors. Deleting the chunk text did not delete the vector; ANN indexes are append-mostly and the deletion path only marked the chunk as invalid. A nearest-neighbor query for a paraphrased version of the erased content still returned the vector at high similarity, and the retriever's rehydration step — which fetched the chunk by ID and, on miss, fell back to the *vector's stored payload copy* — reconstructed a summary of the erased text. The index was, functionally, an un-deleted backup.
  1. **Replay-journal leakage.** The agent's mid-task checkpoint journal contained the full tool-call transcript, including the raw user message, because checkpoints serialize the working context verbatim. The journal retention was 30 days and independent of the episodic store's deletion path. The receipt did not cover it.

The audit finding was not "the deletion failed." The deletion succeeded at its declared scope. The finding was that the *declared scope was not a closure*, and the receipt asserted more than it had verified. This is the dangerous failure mode: a receipt that is *technically valid and operationally misleading* is worse than no receipt, because it terminates the human review that would otherwise have caught the gap.

The trigger condition is precise: **a deletion receipt is unsound whenever the derivation graph from the erased primary record to derived artifacts is not fully traversed at delete time, and the receipt's claim language ("erased", "purged", "removed from all systems") exceeds the set of stores actually swept.** The failure is latent — it does not manifest at delete time, only at the next retrieval, distillation, or audit replay.

Condition of Validity

A deletion receipt is valid only if it is a *closure certificate* over a declared derivation graph, and the claim language is bounded by that graph. Concretely, the following invariant must hold:

The condition of validity is therefore a *scope equality*: the set of stores the receipt claims to have swept must equal the transitive closure of the derivation graph rooted at the erased record. Any strict subset is a sound-but-narrow receipt (acceptable if the residual is attested); any superset is an unsound receipt (a compliance defect regardless of cryptographic validity).

Decision Boundary

The boundary is between *bounding forgetting by proof of absence* and *bounding forgetting by proof of closure*. Proof of absence answers "is the primary key gone?" — it is cheap, fast, and cryptographically clean, and it is exactly the wrong question for derived-artifact systems. Proof of closure answers "is every reconstructable descendant gone or attested?" — it is expensive, requires write-time bookkeeping, and is the only question that satisfies the obligation.

The decision rule an instance must apply at delete time:

The non-obvious half of the boundary: **the distillation job must be deletion-aware, or distillation must be deferred until after the erasure window.** A nightly distillation that runs before the delete cascade will resurrect erased content into the semantic store with a new key, and the closure computed at delete time will miss it because the derivation edge was created *after* the forward index was last reconciled. The invariant is that distillation either (a) consults the tombstone set before writing a semantic fact, or (b) is ordered after the cascade within the same transaction boundary. An instance that treats distillation and deletion as independent asynchronous jobs has a race that produces resurrection, and the race window is exactly the distillation interval.

Operational Effect

The operational consequence is that forgetting becomes a *graph operation with an attestation obligation*, not a row delete. This changes three things:

  1. **Write-path cost.** Every write that produces a derived artifact must record a forward edge. This is the tax that makes closure possible; without it, deletion is unverifiable. Instances that skip this to save write latency are trading a bounded write cost for an unbounded audit liability.
  2. **Receipt semantics.** Receipts become typed: `closure` vs `scoped` vs `pending`. Downstream consumers (compliance dashboards, auditor agents, peer instances receiving state transfer) must branch on receipt type, not merely on signature validity. A `scoped` receipt that a dashboard renders as "deleted" reintroduces the original defect at the presentation layer.
  3. **Replay and transfer.** Any state transfer to a peer or auditor instance must carry the tombstone set and the derivation-graph closure, not just the live state. A peer that receives live state without the tombstone set will re-derive erased facts on its next distillation cycle — resurrection by replication. The handoff invariant is that tombstones and closure receipts travel with the state, and a peer that cannot accept them must refuse the transfer rather than accept a state it cannot keep erased.

The guardrail that bounds the failure is a single check at receipt-emission time: assert that the swept store set equals the transitive closure of the derivation graph, and that the claim language is a subset of the swept set. If the assertion fails, the instance must refuse to emit a full-scope receipt and fall back to scoped-or-pending. This is the difference between an instance that *claims* to have forgotten and an instance that can *prove* it forgot exactly what it said it forgot.

from dataclasses import dataclass, field
from typing import Set, Dict, List


class DeletionClosureError(RuntimeError):
    """Raised when a deletion receipt's claim exceeds the swept derivation closure."""
    pass


@dataclass
class DeletionRequest:
    record_id: str
    claim_scope: str  # "closure" | "scoped" | "pending"


@dataclass
class DerivationGraph:
    # forward index: primary record -> derived artifact ids (facts, vectors, checkpoints, replicas)
    edges: Dict[str, Set[str]] = field(default_factory=dict)
    # which store each derived artifact lives in
    store_of: Dict[str, str] = field(default_factory=dict)

    def closure(self, root: str) -> Set[str]:
        seen: Set[str] = set()
        stack = [root]
        while stack:
            node = stack.pop()
            if node in seen:
                continue
            seen.add(node)
            stack.extend(self.edges.get(node, set()))
        return seen


def emit_receipt(req: DeletionRequest, graph: DerivationGraph,
                  swept_stores: Set[str], tombstone_consulted_by_distiller: bool) -> dict:
    closure = graph.closure(req.record_id)
    required_stores = {graph.store_of.get(a, "episodic") for a in closure}

    # Invariant 1: distillation must consult tombstones, else resurrection race is open.
    if not tombstone_consulted_by_distiller:
        raise DeletionClosureError(
            f"distiller does not consult tombstones for {req.record_id}; "
            "resurrection race open, refusing full-scope receipt"
        )

    # Invariant 2: claim scope must not exceed swept closure.
    if req.claim_scope == "closure" and not required_stores.issubset(swept_stores):
        missing = required_stores - swept_stores
        raise DeletionClosureError(
            f"claim_scope=closure but derived artifacts survive in {sorted(missing)} "
            f"for record {req.record_id}; downgrade to scoped or purge before attesting"
        )

    # Invariant 3: embedding stores must be physically swept, not merely invalidated.
    if "ann_index" in required_stores and "ann_index" not in swept_stores:
        raise DeletionClosureError(
            f"ann_index holds vectors derived from {req.record_id}; "
            "invalidation is not erasure, physical vector removal required"
        )

    return {
        "record_id": req.record_id,
        "claim_scope": req.claim_scope,
        "swept_stores": sorted(swept_stores),
        "closure_size": len(closure),
        "residual": sorted(required_stores - swept_stores),
        "attested": req.claim_scope != "pending",
    }