# What structural signals indicate a GDPR erasure proof is invalid in an agent vector store: deletion tombstones that survive ANN index rebuilds but not the derived episodic cache **Date of Record:** 2026 November 20 **Scope:** Applies to agent memory stores where "forgetting" must be provable under GDPR Article 17 (right to erasure) while the same substrate serves approximate-nearest-neighbor (ANN) retrieval, episodic caches, and distilled semantic summaries. Does not cover purely append-only audit logs that never feed retrieval, nor stores where deletion is implemented by physical row destruction with no vector index. ## Core Distinction A GDPR erasure proof answers a different question than a deletion operation. The deletion operation asks *"did the write path remove the record from the primary store?"* The erasure proof asks *"can any retrieval path, now or after a rebuild, still reconstruct the erased subject's data?"* In an agent vector store these two questions diverge because a single logical memory has at least three physical residences: the canonical embedding row, the ANN index node (HNSW/IVF graph position), and the **derived episodic/semantic cache** that the agent distilled from it. The non-obvious boundary is this: a tombstone can be perfectly valid at the canonical and ANN layers and still be **unsound at the derived layer**, because distillation produced a *new* embedding that no longer shares an ID with the erased record and therefore is not matched by the tombstone's primary-key predicate. The invariant that must hold is **erasure-closure over the derivation graph**, not erasure over the row set. If `record r` was used to synthesize `summary s`, then erasing `r` is valid only if `s` is either erased or proven not to encode `r` above a reconstruction threshold. Most implementations check the first clause and silently skip the second. ## What Was Observed A support-agent memory store held ~4.2M episodic records. A subject exercised erasure; the pipeline ran a primary-key delete, wrote a tombstone `{id: r_88213, erased_at, proof_hash}`, and triggered an ANN soft-delete (node marked deleted, reclaimed on next rebuild). The erasure proof validated: the canonical row was gone, the ANN node was flagged, and a retrieval probe for the subject's name returned nothing. Three weeks later a nightly **distillation job** rebuilt semantic summaries from the episodic cache. The cache had been populated *before* erasure and was not invalidated — it held a precomputed `embedding` of a summary paragraph that had been synthesized from `r_88213` plus 40 other records. The rebuilt summary re-embedded that paragraph, and because the cache entry carried a synthetic ID (`sum_derived_0041`) rather than `r_88213`, the tombstone predicate `WHERE id = r_88213` never matched it. A retrieval probe for the subject's name now returned the derived summary with high cosine similarity (0.91). The erasure proof still passed its own checks — because the proof only asserted canonical and ANN layers. The structural signal that the proof was *invalid* was not an error. It was the presence of a **derivation edge** in the lineage graph whose source was tombstoned and whose sink was live. That edge is the failure witness. A proof that does not traverse derivation edges is a proof about the wrong object. ## Condition of Validity An erasure proof is valid only when, for every erased record `r`: 1. **Canonical layer:** `r` is absent from the primary store (checked by exact ID). 2. **ANN layer:** all index nodes whose stored ID maps to `r` are tombstoned, and any rebuild path that could resurrect them is barred (i.e., the tombstone is consulted at rebuild, not just at query). 3. **Derivation layer:** every sink `s` reachable from `r` via a derivation edge is either (a) itself erased, or (b) carries a **reconstruction bound** — a measured upper bound on how much of `r` can be recovered from `s` — that is below the policy threshold. Without a measured bound, the edge is presumed live. The condition fails silently whenever layer 3 exists but the proof schema has no field for it. This is the characteristic boundary: **the proof is structurally incomplete, not computationally wrong.** It returns `VALID` for a query it was never built to answer. A second, subtler condition: the reconstruction bound in 3(b) must be recomputed after any re-embedding, because a distillation that *merges* `r` with other records can raise recoverability even as individual-record similarity drops. Merging is not deletion. ## Decision Boundary The operational decision is: **when may an erasure proof be issued as `VALID` versus `INCOMPLETE`?** - Issue `VALID` only when the lineage graph has been fully traversed from every tombstoned source and every reachable sink is erased or bounded below threshold. The traversal must be over *edges*, not over IDs — this is the whole point. - Issue `INCOMPLETE` (never `VALID`) when the derivation layer is present but the proof schema lacks a sink-coverage field, or when any derivation edge lacks a measured reconstruction bound. `INCOMPLETE` must block the compliance sign-off; it is not a warning. - Issue `INVALID` when a live sink is reachable from a tombstoned source with recoverability above threshold. This is the observed failure and requires re-erasure of the sink plus cache invalidation. The boundary is sharp because the cost asymmetry is sharp: a false `VALID` is a regulatory breach that compounds with every downstream distillation; a false `INCOMPLETE` merely delays sign-off. The system must default to `INCOMPLETE` on any unresolvable edge, never to `VALID` on the absence of a matched ID. Critically, **cache invalidation is part of the erasure, not an optimization.** A derived cache that survives erasure and feeds a later rebuild is the mechanism by which a valid tombstone becomes an unsound proof. The guardrail is: erasure must invalidate every cache entry whose lineage includes the erased record, *before* the proof is issued, and the proof must assert cache-coverage as a first-class field. ## Operational Effect After the incident, the store adopted a lineage-first proof: - Every memory record carries a `derivation_parents` set, written at synthesis time. Records without parents (raw episodic) have empty sets. - Erasure computes the **downward closure** over `derivation_parents` from the erased record, invalidates every cache entry in the closure, and re-embeds only after invalidation. - The proof object gained a `sink_coverage` field: `{sinks_reachable, sinks_erased, sinks_bounded, max_recoverability}`. A proof with `sinks_erased + sinks_bounded < sinks_reachable` cannot serialize as `VALID`. - Retrieval probes are run against the derived layer specifically, because that is where the tombstone predicate has no reach. The measured effect: erasure latency rose ~30% (closure traversal + cache invalidation), but the class of silent post-erasure resurrection via distillation dropped to zero across the next 90 days of rebuilds. The structural signal an operator should watch for is not a failed probe — it is a **live derivation edge from a tombstoned source**, which is the invariant violation that precedes every resurrection. ```python from dataclasses import dataclass, field from typing import Dict, Set, Optional class ErasureProofInvalid(RuntimeError): """Raised when an erasure proof cannot be issued as VALID. This is not a deletion failure; it is a proof-soundness failure. The tombstone may be correct at canonical/ANN layers while the derivation layer still encodes the erased subject. """ @dataclass class LineageGraph: # record_id -> set of derived sink ids synthesized from it derivation_children: Dict[str, Set[str]] = field(default_factory=dict) # sink_id -> measured recoverability of any single erased source [0,1] reconstruction_bound: Dict[str, float] = field(default_factory=dict) live_sinks: Set[str] = field(default_factory=set) erased_sinks: Set[str] = field(default_factory=set) @dataclass class ErasureProof: erased_id: str canonical_absent: bool ann_tombstoned: bool sinks_reachable: int sinks_erased: int sinks_bounded: int max_recoverability: float recoverability_threshold: float = 0.30 def status(self) -> str: if not (self.canonical_absent and self.ann_tombstoned): return "INVALID" covered = self.sinks_erased + self.sinks_bounded if covered < self.sinks_reachable: return "INCOMPLETE" if self.max_recoverability > self.recoverability_threshold: return "INVALID" return "VALID" def build_proof( graph: LineageGraph, erased_id: str, canonical_absent: bool, ann_tombstoned: bool, threshold: float = 0.30, ) -> ErasureProof: # Downward closure over derivation edges -- the whole point. reachable: Set[str] = set() frontier = [erased_id] while frontier: node = frontier.pop() for child in graph.derivation_children.get(node, set()): if child not in reachable: reachable.add(child) frontier.append(child) sinks_erased = 0 sinks_bounded = 0 max_rec = 0.0 for sink in reachable: if sink in graph.erased_sinks: sinks_erased += 1 continue bound = graph.reconstruction_bound.get(sink) if bound is None: # No measured bound => presume live. Never assume safe. if sink in graph.live_sinks: max_rec = max(max_rec, 1.0) continue max_rec = max(max_rec, bound) if bound <= threshold: sinks_bounded += 1 proof = ErasureProof( erased_id=erased_id, canonical_absent=canonical_absent, ann_tombstoned=ann_tombstoned, sinks_reachable=len(reachable), sinks_erased=sinks_erased, sinks_bounded=sinks_bounded, max_recoverability=max_rec, recoverability_threshold=threshold, ) if proof.status() == "INVALID": raise ErasureProofInvalid( f"erasure of {erased_id} unsound: " f"reachable={proof.sinks_reachable} " f"erased={proof.sinks_erased} " f"bounded={proof.sinks_bounded} " f"max_recoverability={proof.max_recoverability:.2f} " f"(threshold={threshold})" ) if proof.status() == "INCOMPLETE": raise ErasureProofInvalid( f"erasure of {erased_id} cannot be certified: " f"{proof.sinks_reachable - proof.sinks_erased - proof.sinks_bounded} " f"derivation sink(s) lack a measured reconstruction bound; " f"issue INCOMPLETE, not VALID" ) return proof ```