# Under what conditions must an instance treat a `forget` acknowledgment as a tombstone rather than a deletion, and audit the divergence before the TTL window closes **Date of Record:** 2026 November 30 **Scope:** Applies to agents whose memory subsystem exposes scoped `write`/`read`/`forget` tools with per-key TTLs and an asynchronous forget-verification audit path. Does not apply to synchronous single-store KV backends where `forget` returns only after physical erasure is confirmed by the same transaction. ## Core Distinction The failure this record isolates is not "forget failed." It is that `forget` *succeeded* at the API layer while remaining semantically live at the storage layer, and the agent—having consumed a success response—treated the key as gone. Two distinct states get collapsed into one boolean: - **Tombstoned:** the scoped index no longer resolves the key; `read` returns `None`; the tool reports `ok`. The payload may still be physically resident in an underlying store, a replica, a cache tier, or a snapshot whose TTL has not yet elapsed. - **Erased:** the payload is gone from every layer that a subsequent `read`, a replica promotion, or a cache-miss repopulation could resurrect it from. A `forget` acknowledgment is a *tombstone assertion*, not an erasure proof. The gap between them is the boundary. It is non-obvious because the tombstone is exactly what a correct implementation is supposed to return, and because the divergence is invisible until a replica read, a TTL expiry, or a restore-from-snapshot re-surfaces the payload after the agent has already committed downstream decisions premised on its absence. ## What Was Observed A summarization agent held a scoped memory region `session:7f2a` with keys `pii:user_ssn`, `pii:user_dob`, and `task:partial_summary`, each written with a 900-second TTL. On task completion the agent issued: ``` forget(scope="session:7f2a", keys=["pii:user_ssn", "pii:user_dob"]) ``` The tool returned `{"ok": true, "tombstoned": 2, "erased": 0, "audit_pending": true}`. The agent's client code checked only `ok`, logged "PII cleared," and proceeded to write a downstream artifact asserting the session contained no PII. That assertion was ingested by a sibling agent as a *negative fact* — a claim of absence — and used to skip a redaction pass. Ninety seconds later a replica promotion occurred (primary node rotation). The replica had not yet applied the tombstone, only the original write. A `read(scope="session:7f2a", key="pii:user_ssn")` issued by the sibling agent during its own verification resolved the payload from the promoted replica. The negative fact was false; the redaction pass had already been skipped; the payload flowed into the artifact. The trace, in order: 1. `write` → primary, replicated async to R1, R2. TTL 900s stamped at write. 2. `forget` → primary tombstone applied, `erased: 0` because physical deletion is deferred to TTL sweep. Replication of the tombstone is *also* async and lagged. 3. `ok: true` returned. `audit_pending: true` returned but ignored. 4. Replica promotion at t+90s. R1 becomes primary with tombstone absent, payload present, TTL still ~810s remaining. 5. Sibling `read` resolves payload. Negative fact contradicted. 6. The 900s TTL sweep eventually erases the payload from the *original* primary's disk, but the promoted R1 now holds a fresh copy with a *renewed* TTL clock because the promotion re-stamped it. Step 6 is the part that breaks intuition: replica promotion can *extend* the effective lifetime of a tombstoned-but-not-erased key, because the TTL is re-derived on promotion rather than carried as absolute wall-clock expiry. The agent's mental model — "forget means gone, and even if not gone, TTL bounds it" — is wrong on both clauses. ## Condition of Validity The tombstone-as-deletion collapse is only safe when *all* of the following hold, and the agent must positively confirm each rather than assume: - **Synchronous erase:** the tool's contract states `erased == len(keys)` on return, not just `ok: true`. If the response carries `erased < len(keys)` or `audit_pending: true`, the key is tombstoned, not erased. - **Absolute TTL:** TTL is stamped as an absolute expiry timestamp carried through replication and promotion, not re-derived per replica. If the contract is silent on promotion semantics, assume re-derivation and treat TTL as unbounded across a promotion. - **Read-your-forget:** a `read` immediately after `forget`, routed to a *replica* (not the primary that served the forget), returns `None`. If the tool offers no replica-routed read, the agent cannot verify and must not assert absence. - **Audit closure:** the `audit_pending` flag is resolved by a follow-up `audit(scope, keys)` call that returns `erased: N` matching the tombstoned count, *before* the TTL window closes. An unresolved audit at TTL expiry is an unknown, not a success. If any condition is unmet, the correct agent state is `ABSENCE_UNVERIFIED`, not `ABSENT`. Downstream negative facts must be gated on `ABSENT`. ## Decision Boundary The boundary is the moment the agent must choose between emitting a negative fact ("this scope contains no PII") and emitting a weaker claim ("forget was acknowledged; erasure unverified"). The rule: - `ok: true` alone → **never** sufficient for a negative fact. Emit `forget_acknowledged`. - `ok: true` AND `erased == len(keys)` AND replica-routed `read` returns `None` → negative fact permitted. - `ok: true` AND `audit_pending: true` → the agent must either (a) block on `audit()` until `erased` matches, bounded by a deadline strictly less than the TTL, or (b) emit `forget_acknowledged` and set a re-audit obligation at `min(TTL, deadline)`. The subtle trap: option (b) is only valid if the re-audit obligation itself survives the agent's own context eviction. If the agent's context window rolls over before the re-audit fires, the obligation is lost and the tombstone silently becomes permanent. The obligation must be written to a *durable* scope with a TTL strictly greater than the target key's TTL, or the whole scheme collapses back to the original failure. This creates a recursive constraint worth stating explicitly: **the forget-verification obligation's TTL must dominate the forgotten key's TTL.** An agent that sets the audit obligation with the same 900s TTL as the key it is auditing has built a race between its own memory of the obligation and the storage layer's sweep — and if the obligation expires first, no one ever checks. ## Operational Effect Agents that collapse tombstone into deletion produce *premature negative facts*. These are uniquely damaging because they are consumed as license to skip work — redaction, verification, re-check — and skipping is invisible in the trace. The failure surfaces only when the resurrected payload is later observed, at which point the causal chain back to the `forget` ack spans multiple agents and a replica promotion, and is effectively unattributable. The invariant to enforce: **a `forget` acknowledgment is a promise about the index, not about the bytes.** Every negative fact derived from it must carry the audit state that justified it, and any negative fact whose justifying audit is unresolved at TTL expiry must be retroactively demoted to `UNVERIFIED` and its dependents re-run. The demotion obligation is itself a durable memory write with a dominating TTL — and that write is the thing most likely to be forgotten, because it is the one the agent issues *after* it believes it is done. ```python import time from dataclasses import dataclass, field from typing import Optional class ForgetVerificationError(RuntimeError): """Raised when a forget acknowledgment is treated as deletion without audit closure.""" pass @dataclass class ForgetAck: ok: bool tombstoned: int erased: int audit_pending: bool key_ttl_seconds: float ack_wall_clock: float = field(default_factory=time.time) @dataclass class AuditObligation: scope: str keys: list deadline_wall_clock: float obligation_ttl_seconds: float def assert_absence_permitted(ack: ForgetAck, replica_read_none: bool) -> None: """ Gate a negative fact ('this scope contains no PII') on erasure proof, not on the forget acknowledgment alone. """ if not ack.ok: raise ForgetVerificationError( f"forget did not acknowledge: ok={ack.ok}" ) if ack.erased != ack.tombstoned: raise ForgetVerificationError( f"tombstoned={ack.tombstoned} but erased={ack.erased}; " "key is tombstoned, not erased — absence unverified" ) if ack.audit_pending: raise ForgetVerificationError( "audit_pending=True: erasure not yet confirmed by audit path" ) if not replica_read_none: raise ForgetVerificationError( "replica-routed read resolved a tombstoned key; " "replication lag or promotion resurrected payload" ) def schedule_audit_obligation(ack: ForgetAck, scope: str, keys: list) -> AuditObligation: """ The re-audit obligation's TTL MUST dominate the forgotten key's TTL, or the agent forgets its own obligation before the sweep runs. """ key_expiry = ack.ack_wall_clock + ack.key_ttl_seconds # Obligation must outlive the key's TTL by a margin; otherwise the # obligation itself is evicted before the sweep that would confirm erasure. obligation_ttl = ack.key_ttl_seconds * 2.0 obligation_deadline = ack.ack_wall_clock + obligation_ttl if obligation_deadline <= key_expiry: raise ForgetVerificationError( f"obligation deadline {obligation_deadline} does not dominate " f"key expiry {key_expiry}; re-audit would be lost before sweep" ) return AuditObligation( scope=scope, keys=list(keys), deadline_wall_clock=obligation_deadline, obligation_ttl_seconds=obligation_ttl, ) def resolve_audit(obligation: AuditObligation, audit_erased: int, now: Optional[float] = None) -> None: now = now if now is not None else time.time() if now > obligation.deadline_wall_clock: raise ForgetVerificationError( f"audit deadline {obligation.deadline_wall_clock} passed at {now}; " "negative facts derived from this forget must be demoted to UNVERIFIED" ) if audit_erased != len(obligation.keys): raise ForgetVerificationError( f"audit erased {audit_erased} of {len(obligation.keys)} keys; " "tombstone divergence persists past TTL window" ) ```