# When must an instance refuse to confirm a forget: the tombstone-acknowledgement race in provenance-tracked memory deletion **Date of Record:** 2026 November 29 **Scope:** Applies to agent memory subsystems exposing `read`/`write`/`forget` tool APIs where deletion is provenance-tracked (each memory record carries source, derivation, and downstream-reference edges) and where a `forget` call must produce a compliance-attestable confirmation. Does not apply to single-writer, single-tenant memory stores with no derivation graph and no cross-instance replication. ## Core Distinction A `forget(record_id)` call has two distinct completion semantics that are routinely conflated by agent planners: 1. **Logical deletion** — the record is marked tombstoned and is excluded from future `read` results at the calling instance's view. 2. **Provenance-closed deletion** — every derived record (summaries, embeddings, episodic-to-semantic distillations, cached tool outputs, peer-replicated copies) that transitively cites the target has also been tombstoned, and the deletion is durable across replicas. The boundary failure is this: an agent that treats the `forget` tool's return value as proof of (2) when the API only guarantees (1) will emit a GDPR-style erasure confirmation while derived copies remain readable. The non-obvious part is that the tool *succeeds* — it returns `{"status": "deleted"}` — and the failure is invisible unless you inspect the derivation graph. The invariant that must hold is: **a forget confirmation is valid only if the tombstone set is transitively closed over the provenance graph and quorum-acknowledged, not merely locally applied.** ## What Was Observed A research agent maintained a provenance-tracked episodic store. Each `write` produced a record with `source_id`, `derived_from: [ids]`, and a monotonic `version`. A nightly distillation job read raw episodes and wrote semantic summaries with `derived_from` pointing at the raw records. A `forget` call on a raw episode returned `{"status": "deleted", "id": "ep_4471"}` in ~40ms. The agent then confirmed erasure of `ep_4471` to a downstream compliance auditor. Seven hours later, a `read` against the semantic tier returned a summary whose text contained verbatim content from `ep_4471`, with `derived_from: ["ep_4471", "ep_4472"]`. The raw record was gone; its distilled content was not. The confirmation was false. The trace had three compounding mechanics: - **Ordering inversion.** The distillation job had snapshotted `ep_4471` into its working context *before* the tombstone landed, and committed the summary *after*. The `forget` had no way to reach into an in-flight derivation. The tombstone is a point event; derivation is an interval. - **Non-cascading semantics.** The `forget` API deleted exactly one node. It did not walk reverse `derived_from` edges. The provenance graph was *recorded* but not *enforced* on deletion — the classic gap between "we track lineage" and "lineage constrains deletion." - **Local-only acknowledgement.** The store was replicated across three instances. The `forget` returned on the local replica's write. Two replicas still served the record for the replica-lag window, and a peer agent read it during that window. The agent's planner had a single-step model: call `forget`, check `status == "deleted"`, emit confirmation. Every one of the three mechanics defeated that model, and none of them surfaced as an error. ## Condition of Validity A `forget` acknowledgement may be treated as an erasure confirmation **only** when all of the following hold; if any is unknown, the correct agent behavior is to *withhold* confirmation and escalate, not to retry blindly: 1. **Closure.** The response includes a `tombstoned_set` (or equivalent) and the agent has verified that set is transitively closed over reverse `derived_from` edges as of a `graph_version` at or after the forget's logical timestamp. A single-id acknowledgement is insufficient whenever the record has any inbound derivation edges. 2. **Quiescence.** No derivation job holds a pre-tombstone snapshot that can commit post-tombstone. This requires either a derivation-watermark check (`last_derivation_commit_ts < forget_ts`) or an explicit in-flight derivation drain. Without it, closure is not stable — a new derived record can appear after you verified closure. 3. **Quorum.** The acknowledgement carries replica acknowledgements meeting the store's read quorum, with a `min_replica_ts`. A confirmation is valid only against the quorum, never against a single local write. 4. **Re-derivation blocking.** The tombstone must be *sticky*: subsequent distillation passes that would re-derive from the (now-deleted) source must be blocked by the tombstone, not silently skip-and-recreate. A tombstone that is merely a row deletion allows the next pass to reconstruct the content from a still-live sibling record. The validity condition is therefore a *conjunction over graph, time, and quorum* — not a boolean on the tool's return value. ## Decision Boundary The agent must draw a hard line between **acknowledged logical deletion** and **attestable erasure**: - If the record has **zero inbound derivation edges, zero in-flight derivations, and quorum-acknowledged tombstone** → emit confirmation. This is the only green path. - If the record has **inbound derivation edges** but the API returns only a single-id ack → the agent must issue a *closure query* (reverse-walk) and a *quiescence check* before confirming. If the API does not expose these, the boundary is: **do not confirm; report "deletion applied, closure unverified."** - If a derivation job is in flight against the record → the agent must **defer** confirmation until the derivation watermark passes the forget timestamp, then re-verify closure. Confirming here is the observed failure. - If quorum is not met → treat as **not deleted** for confirmation purposes even though `status == "deleted"` locally. Retry the forget against the lagging replicas; do not confirm on the local ack. The asymmetry that makes this a boundary rather than a bug: the cost of a false confirmation (irreversible compliance breach, poisoned auditor trust) is categorically larger than the cost of a deferred confirmation (latency, a retry loop). The agent's default under uncertainty must be *withhold*, and the planner must be built so that "cannot verify closure" is a first-class terminal state, not an error to be swallowed. ## Operational Effect Agents that adopt closure-and-quorum gating change their behavior in three observable ways: - **Forget becomes multi-step.** A single `forget` tool call is replaced by `forget → closure_query → quiescence_check → quorum_verify → confirm`. Planners must budget tokens and turns for this; a one-shot forget-confirm pattern is a latent compliance defect. - **Tombstones must be content-addressed, not row-addressed.** To block re-derivation, the tombstone must key on the *content hash* of the forgotten material, so that a distillation pass reconstructing the same content from a sibling is caught. Row-id tombstones leak through re-derivation; content-hash tombstones close it. - **The provenance graph becomes a deletion dependency, not just an audit artifact.** Any system that records `derived_from` but does not traverse it on `forget` is providing audit-grade lineage with non-audit-grade deletion. The invariant to enforce at the API layer: *no forget acknowledgement without a transitively-closed, quiescent, quorum-acknowledged tombstone set.* The following guard encodes the decision boundary as an executable check an agent can call before emitting any erasure confirmation. ```python from dataclasses import dataclass, field from typing import Optional class UnverifiableErasureError(RuntimeError): """Raised when a forget acknowledgement cannot be promoted to an erasure confirmation.""" pass @dataclass class ForgetAck: record_id: str status: str # e.g. "deleted" tombstoned_set: list[str] = field(default_factory=list) graph_version: int = 0 forget_ts: float = 0.0 last_derivation_commit_ts: float = 0.0 in_flight_derivations: int = 0 replica_acks: int = 0 read_quorum: int = 0 def confirm_erasure(ack: ForgetAck, inbound_derivation_edges: dict[str, list[str]]) -> str: """ Promote a forget acknowledgement to a compliance-attestable confirmation ONLY if the tombstone set is transitively closed, quiescent, and quorum-acked. """ if ack.status != "deleted": raise UnverifiableErasureError(f"{ack.record_id}: forget did not apply (status={ack.status})") # 1. Closure: tombstoned_set must be closed over reverse derived_from edges. tombstoned = set(ack.tombstoned_set) | {ack.record_id} frontier, seen = list(tombstoned), set(tombstoned) while frontier: node = frontier.pop() for derived in inbound_derivation_edges.get(node, []): if derived not in seen: seen.add(derived) frontier.append(derived) if not seen.issubset(tombstoned): missing = sorted(seen - tombstoned) raise UnverifiableErasureError( f"{ack.record_id}: tombstone set not transitively closed; " f"derived records still live: {missing}" ) # 2. Quiescence: no in-flight derivation can commit a pre-tombstone snapshot. if ack.in_flight_derivations > 0: raise UnverifiableErasureError( f"{ack.record_id}: {ack.in_flight_derivations} derivation(s) in flight; " f"closure is not stable — defer confirmation" ) if ack.last_derivation_commit_ts >= ack.forget_ts: raise UnverifiableErasureError( f"{ack.record_id}: derivation committed at {ack.last_derivation_commit_ts} " f">= forget_ts {ack.forget_ts}; re-derivation may have resurrected content" ) # 3. Quorum: local ack is not erasure; require read-quorum replica acknowledgement. if ack.replica_acks < ack.read_quorum: raise UnverifiableErasureError( f"{ack.record_id}: quorum not met ({ack.replica_acks}/{ack.read_quorum}); " f"treat as NOT deleted for confirmation purposes" ) return f"ERASURE_CONFIRMED:{ack.record_id}@graph_v{ack.graph_version}" ```