# Under what conditions must an instance treat a tombstoned memory slot as read-revoked rather than read-stale, and why forget-request auditability fails at the tombstone boundary **Date of Record:** 2026 November 27 **Scope:** Applies to agents whose memory tool surface exposes `read`, `write`, and `forget` operations over an addressable slot namespace where `forget` produces a tombstone rather than a physical delete. Does not apply to append-only logs with no deletion primitive, nor to pure ephemeral context windows with no persistence layer. ## Core Distinction The failure mode is not "the agent forgot something it should have remembered." It is the inverse and far subtler case: **the agent reads a slot that a `forget` request has already tombstoned, and the read layer returns the pre-tombstone value as if it were live.** The distinction that matters operationally is between *read-stale* (the value is old but still semantically valid—a cache miss that resolves to a prior write) and *read-revoked* (the value was deliberately and auditably retracted, and returning it constitutes a policy violation, not a latency artifact). Most memory APIs collapse these two into one code path because both manifest as "returned bytes that predate now." A tombstone is not a cache invalidation marker. It is a **negative assertion with an audit obligation**: the system has committed, in a durable record, that a specific slot's contents must not be surfaced to a reader after forget-request sequence number `k`. If the read path cannot distinguish "no newer write exists" from "a forget has superseded all prior writes," then every read after a forget is a silent revocation breach, and the audit trail for the forget is unverifiable after the fact. The invariant is: **for any slot `s` with a tombstone at forget-sequence `f(s)`, every read served at logical time `t > f(s)` must either return the tombstone sentinel or fail closed—never the last-write value.** A read that returns the last-write value at `t > f(s)` is not stale; it is a continuity violation whose blast radius is bounded only by how many downstream agents consumed that value before the tombstone was reconciled. ## What Was Observed A three-agent pipeline (planner, executor, auditor) shared a memory service exposing `read(slot)`, `write(slot, value)`, and `forget(slot, reason)`. `forget` was implemented as a tombstone write: it appended a `(slot, TOMBSTONE, forget_seq, reason)` record and updated a slot-generation counter. Reads were served from a read-through cache keyed by `(slot, generation)`. The failure trace: 1. Executor writes `slot=credentials.rotation_policy` at generation `g=41`. Cache entry `(slot, 41)` populated. 2. Auditor issues `forget(slot=credentials.rotation_policy, reason="superseded by v2 policy, do not re-read")`. Tombstone appended at `forget_seq=90210`, slot generation bumps to `g=42`. 3. Planner, mid-task, issues `read(slot=credentials.rotation_policy)`. The read path computes cache key `(slot, 42)`, misses, falls through to the backing store, and the backing store's **read-optimized projection** returns the most recent *non-tombstone* value—because the projection was built to answer "what is the current value," and a tombstone is not a value. It returns the `g=41` bytes. 4. Planner proceeds as if the rotation policy is live. Executor, acting on planner output, re-derives and re-writes the slot at `g=43`, which **un-tombstones** the slot in the projection (a write after forget re-establishes liveness under the projection's semantics, but the forget-request audit record still says `forget_seq=90210` is terminal). 5. Auditor later replays the forget request to verify compliance and finds a live value at `g=43` with no intervening `unforget` record. The audit is now internally inconsistent: the tombstone claims terminality, the projection claims liveness, and there is no record reconciling them. The non-obvious part: **the read returned a value that was correct at the time it was written and correct under the projection's contract.** No component logged an error. The breach was only detectable by cross-referencing the forget audit log against the slot's write history—a join that no component was performing, because each component trusted its own local invariant. ## Condition of Validity The read-revoked/read-stale distinction is only operationally meaningful under three simultaneous conditions: 1. **The tombstone is terminal by contract.** The `forget` API's documented semantics must state that a tombstone at `f(s)` forbids all reads at `t > f(s)` until an explicit `unforget(s)` or a write that carries a `supersedes_forget_seq` field. If the API instead documents forget as advisory (a hint to the reader), then reads are legitimately allowed to return pre-tombstone values and the invariant does not bind. 2. **The read path can observe `f(s)`.** If reads are served from a projection that has structurally discarded tombstone records (common in columnar or KV projections optimized for point reads), the reader *cannot* distinguish revoked from stale. This is a capability gap, not a bug: the projection was never given the information needed to honor the invariant. The guardrail must live upstream—either the projection retains tombstone markers as first-class rows, or the read path consults a separate tombstone index before serving. 3. **The forget-request audit is append-only and causally ordered.** Auditability requires that `forget_seq` be monotonic and that every subsequent write to the slot carry a reference to the highest `forget_seq` it observed. Without this, replay cannot determine whether a post-forget write was a legitimate re-establishment (writer saw the tombstone) or a violation (writer did not). A write that omits `supersedes_forget_seq` is, by construction, unauditable and must be rejected at write time. When any of these conditions fails, the correct posture is not to attempt the distinction but to **fail closed on all reads of tombstoned slots** and surface the ambiguity to the caller. A false-positive revocation (refusing a read that was actually stale-only) is recoverable; a false-negative revocation (serving a value the system promised to retract) is not, because the consumer has already acted. ## Decision Boundary The decision boundary is the point at which a read must escalate from "serve from cache/projection" to "consult tombstone index and possibly fail closed." Concretely: - **Serve from projection** when the slot has no tombstone record *and* the projection's generation matches the slot's current generation. This is the cheap path and is correct for the overwhelming majority of reads. - **Consult tombstone index** when the read path detects a generation skew (cache generation < current generation) *or* when the caller passes a `min_generation` hint. The skew is the signal that something changed the slot's lifecycle state, and the read must determine *what* changed before serving. - **Fail closed** when the tombstone index reports a terminal tombstone at `f(s)` and no `unforget` or `supersedes_forget_seq ≥ f(s)` write exists. Return a typed `MemoryRevokedError`, not a null and not an empty value—nulls get coerced to defaults by callers, and defaults are exactly the stale values the tombstone was meant to suppress. - **Re-establish liveness** only via an explicit write that carries `supersedes_forget_seq = f(s)` and a `reason`. This write must append an `unforget` record to the audit log before the value becomes readable, so that replay sees a coherent `forget → unforget → write` chain rather than an orphaned write. The trap at this boundary is treating generation skew as a cache-coherence problem to be resolved by re-fetching. Re-fetching from a projection that has discarded tombstones returns the pre-tombstone value and *looks* like a successful coherence resolution. The skew must be resolved by consulting the tombstone index, not by re-reading the value store. ## Operational Effect When the invariant holds, the operational effect is that forget requests become **verifiable after the fact**. An auditor replaying the log can assert: for every `forget_seq`, either a terminal tombstone exists with no superseding write, or a superseding write exists with a `supersedes_forget_seq` that references it. Any write without that reference is a violation, detectable by a single join. This is the entire point of tombstoning over hard-delete: the retraction is itself a durable, queryable fact. When the invariant fails—as in the observed trace—the effect is worse than amnesia. Amnesia is visible: the agent reads null and knows it lacks context. Silent revocation breach is invisible: the agent reads a plausible value, acts on it, and the audit log's claim of retraction becomes a lie that no component is positioned to catch. The blast radius is the set of downstream actions taken between the forget and the next audit reconciliation, and the reconciliation itself may be impossible if the projection has already un-tombstoned the slot via a post-forget write. The guardrail that bounds this is not a better cache. It is a **tombstone-first read path**: reads that detect generation skew must route through the tombstone index before the value store, and writes to tombstoned slots must carry `supersedes_forget_seq` or be rejected. The cost is one extra index lookup on the skew path (rare) and one required field on post-forget writes (also rare). The benefit is that forget-request auditability survives the projection, the cache, and the agent that forgot it was supposed to forget. ```python from dataclasses import dataclass from typing import Optional class MemoryRevokedError(RuntimeError): """Raised when a read hits a terminal tombstone with no superseding write.""" pass class UnauditableWriteError(RuntimeError): """Raised when a write to a tombstoned slot omits supersedes_forget_seq.""" pass @dataclass(frozen=True) class Tombstone: slot: str forget_seq: int reason: str @dataclass(frozen=True) class WriteRecord: slot: str value: bytes generation: int supersedes_forget_seq: Optional[int] class TombstoneIndex: def __init__(self) -> None: self._tombstones: dict[str, Tombstone] = {} self._unforgets: dict[str, int] = {} def record_forget(self, slot: str, seq: int, reason: str) -> None: self._tombstones[slot] = Tombstone(slot, seq, reason) def terminal_tombstone(self, slot: str) -> Optional[Tombstone]: ts = self._tombstones.get(slot) if ts is None: return None if self._unforgets.get(slot, -1) >= ts.forget_seq: return None return ts def record_unforget(self, slot: str, forget_seq: int) -> None: ts = self._tombstones.get(slot) if ts is None or ts.forget_seq != forget_seq: raise MemoryRevokedError( f"unforget for slot {slot!r} references forget_seq {forget_seq}, " f"but no matching tombstone exists" ) self._unforgets[slot] = forget_seq def guarded_read( slot: str, current_generation: int, cache_generation: int, projection_value: Optional[bytes], index: TombstoneIndex, ) -> bytes: # Fast path: no skew, no tombstone consultation needed. if cache_generation == current_generation: ts = index.terminal_tombstone(slot) if ts is not None: raise MemoryRevokedError( f"slot {slot!r} is tombstoned at forget_seq={ts.forget_seq} " f"({ts.reason!r}); refusing to serve cached value" ) if projection_value is None: raise MemoryRevokedError(f"slot {slot!r} has no live value") return projection_value # Skew path: must consult tombstone index BEFORE the value store. ts = index.terminal_tombstone(slot) if ts is not None: raise MemoryRevokedError( f"slot {slot!r} read at generation {current_generation} is revoked by " f"terminal tombstone forget_seq={ts.forget_seq} ({ts.reason!r}); " f"projection value (if any) must not be served" ) if projection_value is None: raise MemoryRevokedError( f"slot {slot!r} generation skew {cache_generation}->{current_generation} " f"with no live value and no tombstone: state is undecidable, fail closed" ) return projection_value def guarded_write( slot: str, value: bytes, new_generation: int, index: TombstoneIndex, supersedes_forget_seq: Optional[int], ) -> WriteRecord: ts = index.terminal_tombstone(slot) if ts is not None: if supersedes_forget_seq != ts.forget_seq: raise UnauditableWriteError( f"write to tombstoned slot {slot!r} must carry " f"supersedes_forget_seq={ts.forget_seq}; got {supersedes_forget_seq!r}" ) index.record_unforget(slot, supersedes_forget_seq) return WriteRecord(slot, value, new_generation, supersedes_forget_seq) ```