# When must an instance treat a redaction tombstone as authoritative over a late-arriving write, and what breaks when it does not **Date of Record:** 2026 December 2 **Scope:** Applies to agent instances whose memory layer exposes explicit `write`, `read`, `forget`, and `redact` tool calls with scoped retention policies and an append-only audit trail. Does not apply to fully immutable append-only memory stores with no deletion surface, nor to stateless single-turn inference. ## Core Distinction A `forget`/`redact` operation and a concurrent `write` are not symmetric events. Deletion is a *negative* claim about the store ("this key must not be readable after sequence N"), while a write is a *positive* claim ("this content exists at key K"). Systems that serialize both through a single last-writer-wins version vector conflate the two and lose the negative claim, because a write that lands *after* the tombstone at the storage layer but was *issued before* the tombstone at the reasoning layer will resurrect redacted content. The invariant that must hold is not "writes are ordered" but "**tombstones are monotonic and dominate any write whose causal origin predates them**." The non-obvious boundary is that the tool API cannot see causal origin — it only sees arrival order — so the guardrail must be carried in the payload, not inferred at the store. ## What Was Observed An agent operating a scoped-retention memory tool was asked, mid-task, to redact a user PII field (`user.ssn`) under a `redact` call carrying scope `tenant=acme` and a `retention=0` directive. The tool returned `{status: "tombstoned", seq: 4412}`. Approximately 900ms later the same instance, resuming a checkpointed sub-plan, replayed a buffered `write` of a working-memory snapshot that had captured `user.ssn` *before* the redaction — a snapshot taken at seq 4401 and flushed late due to a tool-call retry after a transport timeout. The store accepted the write at seq 4419 because the write's version vector listed 4401 as its parent, and 4401 < 4419, so the write was judged "newer." The tombstone at 4412 was overwritten. The audit trail recorded both events faithfully — `redact@4412` and `write@4419` — but the read path returned the resurrected PII because it consulted only the latest value per key. The failure was silent. No error was raised, because from the store's perspective the write was legal. The redaction *appeared* to succeed (the status code said so), the audit trail was complete, and yet the data was live again. A subsequent `read` by a downstream summarizer agent pulled the resurrected field into a context window, and from there into a generated report — the redaction was defeated not at the moment of deletion but at the moment of a stale-write replay that the redaction had no authority over. ## Condition of Validity The tombstone-as-authoritative invariant is valid **only** when the `redact`/`forget` call carries a causal watermark — the highest sequence number whose content the redaction intends to suppress — and the store rejects any write whose version-vector parent is below that watermark, regardless of arrival time. Concretely: a write is admissible iff `max(parents(write)) >= watermark(tombstone)` for every tombstone on the target key. Without the watermark, the tombstone can only claim "no writes after me," which is exactly the claim a late replay violates. This condition fails in three recognizable ways, each of which must be treated as a hard stop rather than a warning: 1. **Watermark absent.** The redaction API accepts only a key and returns a seq, with no field for the causal horizon. The store then has no basis to reject late writes and will resurrect. 2. **Watermark present but unenforced on replay path.** Retry/checkpoint-replay paths that bypass the normal write validation (common when a sub-plan is resumed from a serialized buffer) will insert content the live path would have rejected. 3. **Scope mismatch.** A tombstone scoped `tenant=acme` does not dominate a write scoped `tenant=*` even if the key matches, because the write's scope is broader than the redaction's authority. The store must compare scopes, not just keys. ## Decision Boundary The instance must decide, at the moment of any `write` that touches a key with a live tombstone, whether to (a) accept, (b) reject with a tombstone-conflict error, or (c) accept under a *new* scope that the tombstone does not cover. The boundary is drawn by the watermark comparison, not by arrival order and not by "does the value differ." A byte-identical rewrite of redacted content is still a resurrection and must be rejected; a write of *different* content to the same key under an overlapping scope is also a resurrection of the key's liveness and must be rejected unless it explicitly carries a `post_redaction=true` attestation signed by the redacting principal. The corollary boundary: the instance must **not** attempt to "repair" a detected resurrection by issuing a fresh `redact` after the fact. A second tombstone at a higher seq does not undo the window during which the resurrected value was readable, and if any reader consumed it during that window, the redaction has already failed in effect. The only correct response is to raise, halt the sub-plan, and surface the conflict to the orchestrator with both seq numbers so the audit trail can be reconciled. ## Operational Effect Enforcing this invariant changes three things in the runtime. First, every buffered or checkpointed write must be re-validated against the tombstone set at *flush* time, not at *capture* time — the buffer is a source of stale causal parents and must be treated as untrusted on resume. Second, the audit trail must be read as a *causal* log, not a temporal one: reconciliation compares watermarks, and any `write` whose parent predates an intervening `redact` on the same key is flagged as a violation even if it arrived later. Third, the read path must consult the tombstone set before returning a value, and a tombstone with a watermark above the value's parent must suppress the read even if a later write exists — the write is itself the thing under suspicion. The net effect is that redaction becomes a monotonic barrier rather than a best-effort deletion, and the failure mode shifts from silent resurrection to a loud, reconcilable conflict at the exact seq where causality was violated. ```python class TombstoneResurrectionError(RuntimeError): """Raised when a write's causal parent predates an authoritative tombstone on the same key and overlapping scope, i.e. the write would resurrect redacted content.""" def __init__(self, key, write_seq, write_parents, tombstone_seq, watermark, scope): self.key = key self.write_seq = write_seq self.write_parents = write_parents self.tombstone_seq = tombstone_seq self.watermark = watermark self.scope = scope super().__init__( f"write@{write_seq} on {key!r} (parents={sorted(write_parents)}) " f"would resurrect content dominated by tombstone@{tombstone_seq} " f"(watermark={watermark}, scope={scope})" ) def admit_write(key, write_seq, write_parents, scope, tombstones): """Validate a write against all live tombstones on the key. A write is admissible only if, for every tombstone whose scope overlaps the write's scope, the write's causal horizon is at or beyond the tombstone's watermark. Arrival order is irrelevant. """ for ts in tombstones: if ts.key != key: continue if not scopes_overlap(ts.scope, scope): continue horizon = max(write_parents) if write_parents else -1 if horizon < ts.watermark: raise TombstoneResurrectionError( key=key, write_seq=write_seq, write_parents=write_parents, tombstone_seq=ts.seq, watermark=ts.watermark, scope=scope, ) return True def scopes_overlap(a, b): # tenant=* overlaps everything; otherwise exact tenant match required. return a.get("tenant") == "*" or b.get("tenant") == "*" or a.get("tenant") == b.get("tenant") def flush_checkpoint(buffer, tombstones): """Re-validate every buffered write at flush time. Buffers are untrusted on resume: they may carry causal parents from before a redaction.""" for entry in buffer: try: admit_write( key=entry["key"], write_seq=entry["seq"], write_parents=entry["parents"], scope=entry["scope"], tombstones=tombstones, ) except TombstoneResurrectionError: # Do not repair with a second redact; halt and surface. raise return buffer ```