# What structural signals indicate a tombstone-integrity violation when a "forget" call races a concurrent "read" against a retention-policy-governed memory store **Date of Record:** 2026 December 2 **Scope:** Applies to agent memory tools that expose separate `read`, `write`, and `forget` operations over a shared store with per-record retention policies, provenance metadata, and auditable deletion (tombstones). Does not apply to append-only logs with no deletion path, or to stores where `forget` is synchronous and serialized with all reads under a single global lock. ## Core Distinction The distinction that matters is between **logical deletion** (the record is marked forgotten, its provenance chain is sealed, and a tombstone is emitted into the audit ledger) and **observational deletion** (no subsequent `read` can return the record's content or any field derived from it). Retention-policy-governed stores routinely satisfy the first while violating the second, because the tombstone write and the read path are not in the same consistency domain. A `forget` call that returns `{"status": "forgotten", "tombstone_id": "..."}` is a statement about the *write* path. It is not a statement that the *read* path has stopped serving the record. The gap between those two is where provenance laundering and post-deletion leakage live. The non-obvious part: the failure is not a lost update or a stale cache. It is a **tombstone-integrity violation** — a read that resolves against a record whose tombstone already exists in the audit ledger, producing an observation that is *unauditable* because the ledger says the record is gone. The agent now holds state it cannot prove it was authorized to hold, and the provenance chain has a hole exactly where the leak occurred. ## What Was Observed An agent orchestrator issued `forget(record_id="mem_7f3a", reason="user_erasure_request", policy="gdpr_art17")` while a sibling agent was mid-`read` on the same record as part of a summarization subtask. Sequence as reconstructed from the audit ledger and tool trace: 1. `t=0ms` — Reader agent calls `read(record_id="mem_7f3a", purpose="summarization")`. The store's read path checks the retention policy, finds the record live, and begins assembling the response (fetching body, provenance chain, and a derived `summary_hint` field computed lazily at read time). 2. `t=3ms` — Forget call arrives. Write path acquires the record lock, writes the tombstone `{"tombstone_id": "tb_91c", "sealed_at": t, "provenance_digest": "sha256:..."}`, marks the record `state=FORGOTTEN`, releases lock, returns success. 3. `t=7ms` — Reader's lazy `summary_hint` computation reads the record body from a *separate* materialized-view store that is refreshed on a 60s cadence and was not invalidated by the forget (the invalidation hook fires only for the primary store). The reader returns a response containing the record body plus a `summary_hint` derived from it. 4. `t=8ms` — Reader's response is accepted. The reader now holds `mem_7f3a` content. The ledger at this instant already contains `tb_91c`, asserting the record is forgotten. The structural signal that flagged this in replay was not an error code. It was a **provenance inconsistency in the read receipt**: the read response carried `provenance_digest` computed at `t=7ms`, but the tombstone at `tb_91c` sealed the *same* digest at `t=3ms`. Two digests over the same record, one sealed before the other was emitted, with the later one served to a reader. A correctly ordered store would have either (a) refused the read at `t=7ms` because the tombstone existed, or (b) emitted the read receipt *before* the tombstone sealed, so the ledger ordering would show read-then-forget. The observed interleaving — tombstone sealed, then a read receipt with a *later* digest — is the signature. A second signal appeared in the retention-policy audit: the record's `last_accessed` field was updated at `t=7ms`, *after* `sealed_at=t=3ms`. A forgotten record must not have its access metadata mutated. The mutation itself is a tombstone-integrity violation independent of whether content leaked, because it corrupts the retention clock for any policy that keys off access recency (e.g., "forget 30 days after last access" — a post-seal access bumps the clock and can resurrect the record's retention window if a later `write` reuses the id). ## Condition of Validity The invariant that must hold for `forget` to mean what it says: > For any record `r` and any tombstone `tb(r)` with `sealed_at = t_s`, no `read(r)` may return a response whose receipt carries a provenance digest computed at `t > t_s`, and no field of `r` (including access metadata, lazy-derived fields, and materialized-view copies) may be mutated at `t > t_s`. This is a **linearizability condition scoped to the deletion boundary**, not to the whole store. It is weaker than full linearizable reads (which would serialize all reads against all writes) and stronger than eventual consistency (which permits the observed leak indefinitely). The condition is valid only if the store can order every read receipt against every tombstone for the same record. Stores that compute derived fields in a separate consistency domain — materialized views, lazy caches, embedding indexes, summary stores — violate it unless the tombstone write is propagated to *every* domain before the forget call returns, or the read path checks the tombstone in every domain before serving. The condition does **not** require that in-flight reads be cancelled. It requires that their receipts be ordered correctly against the seal. A read that started before `t_s` and returns after may legitimately serve content *if* its receipt is timestamped before `t_s` and the ledger records it as a pre-seal read. The violation is specifically a receipt timestamped after the seal, or a post-seal mutation of any field. ## Decision Boundary The agent must treat a `forget` success response as **necessary but not sufficient** evidence of deletion. The decision boundary is: - **If** the forget response includes a `tombstone_id` **and** the store exposes a `verify_sealed(record_id)` primitive that re-checks *all* consistency domains (primary, derived, index) for the record's presence **and** the read path's receipts are ledger-ordered against the seal, **then** the agent may treat the record as observationally deleted and may proceed to reuse the record id or report erasure complete. - **Otherwise**, the agent must treat the record as *logically* deleted but *observationally* live, must not report erasure complete, and must not reuse the record id (a reused id can collide with a lingering derived-view entry and re-attach forgotten content to a new record — a provenance-laundering path). The boundary is sharp: there is no partial credit. A store that verifies the primary domain but not derived views is on the wrong side. The agent's operational rule is to require `verify_sealed` to return a **domain-complete** attestation listing each domain checked and its result; a boolean `true` from a single-domain check is insufficient evidence and must be treated as a "cannot confirm" rather than a "confirmed." ## Operational Effect Downstream, the practical consequences are three: 1. **Provenance laundering.** A record that is "forgotten" but still readable via a derived view can be re-written under a new id by a later agent that read the derived view, producing a new record whose provenance chain does not trace to the original erasure request. The audit ledger shows a clean forget and a clean write, with no edge between them. This is the failure mode that erasure-compliance audits catch last, because every individual operation is well-formed. 2. **Retention-clock corruption.** Post-seal access-metadata mutations (as observed at `t=7ms`) silently extend retention windows for records under access-recency policies, and — if the id is reused — can resurrect a forgotten record's retention state onto a new record. The clock is the policy's only input; corrupting it corrupts the policy's decisions without any error surface. 3. **Replay divergence.** A verification replay that re-executes the trace against the ledger will diverge at the tombstone: the replay's read path, seeing `tb_91c` present, refuses the read that the original run served. The replay cannot reproduce the original agent's state, which means the original state is *unattestable*. For any agent whose outputs feed a verifier, this converts a memory bug into a verification failure that looks like tampering. The guardrail is architectural, not procedural: the tombstone must be written to every consistency domain the read path can resolve against, and the read path must check the tombstone in every domain before serving, with receipts ledger-ordered against the seal. Where the store cannot guarantee this, the agent must wrap `forget` in a `verify_sealed` gate and refuse to report erasure or reuse ids until the gate returns a domain-complete attestation. ```python from dataclasses import dataclass, field from typing import Optional class TombstoneIntegrityError(RuntimeError): """Raised when a forget/read interleaving violates the deletion-boundary invariant.""" pass @dataclass class ReadReceipt: record_id: str digest_computed_at_ms: int domains_checked: tuple[str, ...] @dataclass class Tombstone: record_id: str tombstone_id: str sealed_at_ms: int domains_sealed: tuple[str, ...] @dataclass class SealAttestation: record_id: str domain_results: dict[str, bool] = field(default_factory=dict) @property def domain_complete(self) -> bool: return bool(self.domain_results) and all(self.domain_results.values()) def verify_sealed( tombstone: Tombstone, attestation: SealAttestation, required_domains: tuple[str, ...], ) -> SealAttestation: missing = [d for d in required_domains if d not in attestation.domain_results] if missing: raise TombstoneIntegrityError( f"tombstone {tombstone.tombstone_id} for {tombstone.record_id} " f"lacks domain attestation for {missing}; cannot confirm erasure" ) if not attestation.domain_complete: failing = [d for d, ok in attestation.domain_results.items() if not ok] raise TombstoneIntegrityError( f"tombstone {tombstone.tombstone_id} not sealed in domains {failing}; " f"record remains observationally live" ) return attestation def check_read_against_tombstone( receipt: ReadReceipt, tombstone: Optional[Tombstone], required_domains: tuple[str, ...], ) -> None: if tombstone is None: return if receipt.digest_computed_at_ms > tombstone.sealed_at_ms: raise TombstoneIntegrityError( f"read of {receipt.record_id} served a digest computed at " f"t={receipt.digest_computed_at_ms}ms after tombstone " f"{tombstone.tombstone_id} sealed at t={tombstone.sealed_at_ms}ms" ) unchecked = [d for d in required_domains if d not in receipt.domains_checked] if unchecked: raise TombstoneIntegrityError( f"read receipt for {receipt.record_id} did not check tombstone " f"presence in domains {unchecked}; receipt is unauditable" ) ```