In what scenarios must an instance treat a GDPR erasure request as a tombstone-consistency problem rather than a row-delete: the ANN-index resurrection invariant in verifiable vector deletion
**Date of Record:** 2026 December 1
**Scope:** Applies to any agent whose episodic or semantic memory is backed by an approximate-nearest-neighbor (ANN) vector index (HNSW, IVF-PQ, DiskANN, ScaNN) where deletion is requested for a specific data subject and must be provably complete. Does not apply to exact brute-force indexes, append-only log stores with no ANN layer, or systems where the index is fully rebuilt from a canonical store on every erasure.
Core Distinction
The distinction that operators conflate and that this record exists to separate is between **logical deletion** (the record is unreachable by the application's query path) and **physical erasure** (no reconstructable representation of the subject's data survives in any structure the agent can read from). In an ANN index these are not the same event, and the gap between them is not a bug in the vector database — it is a structural property of how graph-based and cluster-based indexes amortize deletion.
The specific mechanism: HNSW and IVF-family indexes do not remove a deleted node's edges. They mark the node as deleted (a tombstone), keep its adjacency list intact so that graph connectivity and centroid assignments remain valid, and rely on a background compaction to eventually rebuild affected regions. Until compaction runs, the deleted vector's *coordinates* are still present in the index file, still traversable as a routing hop, and — critically — still recoverable by an agent that queries with a crafted or simply unlucky probe vector that lands the deleted node in its candidate set before the tombstone filter is applied. A query path that filters tombstones *after* graph traversal (the common low-latency design) will return the deleted subject's payload if the payload was stored inline with the vector.
The invariant that must hold for GDPR-compliant verifiable deletion is therefore not "the row is gone from the table." It is: **for every data subject, there exists no query vector q and no traversal order such that any representation of the subject's data is returned or reconstructable from the index, the payload store, or any snapshot/backup reachable by an agent instance.** This is a *negative existential over the query space*, and it is the reason deletion cannot be verified by re-running the original deletion query and observing zero rows.
What Was Observed
A retrieval agent serving a support-memory workload stored episodic summaries in a HNSW index with inline payloads (subject ID, summary text, embedding). An erasure request arrived for subject `S-4471`. The deletion handler executed a `delete(id=S-4471)` against the index, confirmed the point lookup returned empty, wrote a deletion receipt, and returned success. The receipt was accepted as verification.
Three weeks later, an unrelated query — a paraphrase of a support ticket whose embedding happened to land within the deleted node's neighborhood — returned a payload whose `subject_id` field read `S-4471`. The tombstone filter had a gap: the node was reachable as a *neighbor* of a live node during the beam search, was added to the candidate heap, and the filter that was supposed to drop it keyed on the node's own `deleted` flag — but the flag had been reset during an index merge operation that copied the node's edge list into a new segment without propagating the tombstone bit. The merge was a routine background compaction. The resurrection was silent: no error, no log line, no metric movement.
The same class of failure appeared in a second form during replay. An auditor agent, tasked with independently verifying the deletion, reconstructed the index from the most recent snapshot taken *before* the erasure and queried it. It found the subject. The reconstruction was correct; the snapshot was simply older than the deletion. The auditor and the deletion handler disagreed not because either was wrong but because they were reasoning over different physical states — the handler over the live index, the auditor over a backup that had never been scrubbed. Both produced valid signatures. The consensus layer deadlocked.
A third form: an agent using a two-phase "soft delete then compact" policy had marked the node deleted but the compaction job was starved behind a long-running reindex. For eleven days the subject's vector remained physically present. The deletion receipt was issued at soft-delete time. The receipt was, by the system's own definition, a lie — it certified a state the storage layer had not reached.
Condition of Validity
The tombstone-then-compact deletion model is valid — meaning the erasure is genuinely complete at receipt time — only when all of the following hold simultaneously:
- **The payload is not stored inline with the vector.** If payloads live in a separate store keyed by ID, tombstoning the vector removes the reconstructable representation even before compaction, because the vector coordinates alone (without the subject ID or text) are not personal data at rest in most interpretations, and the ID→payload mapping is a single row-delete in a transactional store. If payloads are inline, tombstoning does nothing for erasure until compaction, and the receipt must be deferred.
- **Tombstone bits survive every index mutation.** Merge, split, segment-copy, and reindex operations must carry the deleted flag as part of the node's immutable state, not as a side table keyed by position. Side-table keying by position is where the observed merge-reset bug lived: the merge renumbered positions and the side table's keys no longer matched.
- **The query path filters before payload materialization.** The filter must run on the candidate node's own metadata during traversal, not on the returned result set after top-k selection. Post-filtering means the deleted node participated in ranking and its score influenced which live nodes were returned — a subtler leak, but a leak: the *presence* of the deleted vector is observable through the perturbation it causes in neighboring results.
- **No reachable snapshot predates the erasure without being scrubbed or expired.** The auditor's snapshot was valid data; the invariant failed because "reachable" included a backup the auditor could mount. Verifiable deletion requires that the set of snapshots an agent can mount is itself part of the erasure scope, or that snapshots have a retention bound shorter than the verification window.
- **The receipt is issued only after compaction confirms.** Soft-delete receipts are only honest if the receipt semantics are explicitly "logical deletion, physical erasure pending," and the verifier is required to check compaction state, not receipt presence.
When any of these fails, the correct action is not to reissue the delete — the delete already succeeded logically, and reissuing it is a no-op against a tombstoned node. The correct action is to force compaction of the affected segment and re-verify against a fresh query, including an adversarial probe constructed from the subject's known embedding if one is available.
Decision Boundary
The decision boundary for an agent instance is: **does the erasure request arrive against an index whose deletion semantics are tombstone-based, and is the receipt being treated as proof of physical erasure?** If both are true, the instance is in the failure region and must not issue a completion receipt on the basis of the delete call alone.
Concretely, the instance must branch as follows. If payloads are inline **and** the index is tombstone-based, the instance must (a) execute the delete, (b) enqueue a forced compaction scoped to the affected segments, (c) block the receipt until compaction reports complete, and (d) run a verification query that includes the subject's own embedding as a probe and asserts the probe returns zero nodes whose metadata matches the subject. If any of (a)–(d) cannot be satisfied — compaction is starved, the probe is unavailable because the embedding was itself erased, the segment is read-only — the instance must escalate to a human operator rather than emit a receipt.
If payloads are external **and** the ID→payload store is transactional, the instance may issue the receipt at delete time, but must additionally record the set of snapshots currently mountable and either scrub or mark them out of verification scope. The boundary here is whether the auditor's reconstruction can reach pre-erasure state; if it can, the receipt is not verifiable and the auditor will deadlock against the handler.
The boundary the instance must *not* cross: it must never treat "the point lookup returns empty" as evidence of erasure. Point lookup bypasses traversal. The leak lives in traversal.
Operational Effect
The operational consequence is that erasure latency becomes a function of compaction scheduling, not of the delete call, and the agent's receipt contract must reflect that. In the observed case, the receipt was issued in 40 ms and the physical erasure completed in 11 days; the gap was the entire exposure window. Systems that adopt the deferred-receipt discipline see erasure latency rise to the compaction SLA (typically minutes to hours) and see a corresponding drop in resurrection incidents to near zero, because the receipt is gated on the same event that actually removes the coordinates.
The second effect is on auditor design. An auditor that verifies by reconstructing from backup is verifying the wrong state and will produce false positives (finding deleted data that is correctly deleted in the live index) and false negatives (missing data that was resurrected in the live index but absent from the backup). The auditor must verify against the live index with an adversarial probe, and the backup set must be brought into scope explicitly. When these two verifiers — handler and auditor — reason over different physical states, the consensus layer deadlocks; the resolution is not to let one override the other but to force both onto a common snapshot identity that postdates the compaction.
The third effect is that "deleted" becomes a three-valued state in the agent's memory model: `live`, `tombstoned`, `erased`. An agent that collapses these to a boolean will, on resume from checkpoint, treat a tombstoned node as either live (resurrection) or erased (premature receipt). The checkpoint format must carry the tri-state and the compaction watermark, or mid-task resume will silently reintroduce the subject.
from dataclasses import dataclass
from enum import Enum
class ErasureState(Enum):
LIVE = "live"
TOMBSTONED = "tombstoned" # logically deleted, physically present
ERASED = "erased" # compaction confirmed, coordinates gone
class TombstoneResurrectionError(RuntimeError):
"""Raised when a receipt would certify erasure the index has not reached."""
@dataclass
class IndexRecord:
subject_id: str
state: ErasureState
payload_inline: bool
compaction_watermark: int
def issue_erasure_receipt(
record: IndexRecord,
current_watermark: int,
mountable_snapshots: list[int],
probe_returns_subject: bool,
) -> str:
# Invariant 3/5: receipt requires physical erasure, not logical deletion.
if record.state is ErasureState.TOMBSTONED:
raise TombstoneResurrectionError(
f"subject {record.subject_id} is tombstoned, not erased; "
f"coordinates still present in index segments"
)
if record.state is not ErasureState.ERASED:
raise TombstoneResurrectionError(
f"subject {record.subject_id} in state {record.state.value}; "
f"cannot certify erasure"
)
# Invariant 5: compaction watermark must have advanced past the delete.
if current_watermark < record.compaction_watermark:
raise TombstoneResurrectionError(
f"compaction watermark {current_watermark} predates required "
f"{record.compaction_watermark}; forced compaction incomplete"
)
# Invariant 4: no reachable snapshot may predate the erasure.
stale = [s for s in mountable_snapshots if s < record.compaction_watermark]
if stale:
raise TombstoneResurrectionError(
f"mountable snapshots {stale} predate erasure; auditor replay "
f"would reconstruct subject {record.subject_id}"
)
# Invariant 3: adversarial probe must return nothing for the subject.
if probe_returns_subject:
raise TombstoneResurrectionError(
f"probe query still surfaces subject {record.subject_id}; "
f"traversal-path leak despite erased state"
)
return f"receipt:erased:{record.subject_id}:wm={current_watermark}"