# How does an instance detect a stale deletion attestation when a scoped retention policy re-anchors memory under a new epoch **Date of Record:** 2026 November 24 **Scope:** Applies to agents whose memory tool exposes scoped retention (per-namespace TTL, legal-hold, or `forget` semantics) and returns signed deletion attestations that the agent must verify before treating a memory as erased. Does not apply to append-only logs with no deletion path, nor to single-tenant stores where the caller and the retention authority are the same principal. ## Core Distinction There are two distinct meanings of "the memory is gone," and they diverge exactly at the moment a retention policy is re-anchored rather than expired: - **Physical erasure** — the bytes are gone; a subsequent `read` returns `NOT_FOUND`. - **Attested erasure** — the store asserts, via a signed attestation, that a record *was* deleted under policy epoch `E`, with a scope and a timestamp. The boundary failure is this: an agent that conflates these two will accept an attestation whose scope no longer covers the record because the retention policy was *re-anchored* to a new epoch (e.g., a legal hold was lifted and a fresh TTL clock started, or a namespace was re-parented under a broader scope). The record is still physically present, still readable, but the agent's local ledger holds a valid-looking deletion attestation for it and refuses to re-read or re-forget. The erasure is attested but not actual. The agent proceeds under a false invariant: *"I have forgotten X."* The subtlety that makes this non-obvious: the attestation's signature verifies perfectly. The failure is not cryptographic. It is a **scope-and-epoch mismatch** — the attestation is authentic but no longer *authoritative* for the record's current epoch. ## What Was Observed A planner agent maintained a `forget` ledger keyed by `(record_id, epoch)`. On task restart it replayed the ledger to reconstruct which memories were erased, then resumed with a context window built from surviving records. The failure trace: 1. At epoch `E1`, the agent issued `forget(record_id="r-4471", scope="task-9")`. The store honored it, returned `attestation{record: r-4471, scope: task-9, epoch: E1, sig: valid}`. The agent wrote `(r-4471, E1) → FORGOTTEN` to its ledger. 2. A retention authority re-parented `task-9` under a broader `org-hold` scope, bumping the effective epoch to `E2`. Crucially, re-parenting **resurrected** `r-4471` into the new scope because the original `forget` was scoped to `task-9` only and the record also matched a surviving `org-hold` predicate. Physical bytes were never touched. 3. The agent restarted. It replayed its ledger, saw `(r-4471, E1) → FORGOTTEN`, signature valid, and **did not re-read**. It rebuilt its plan omitting `r-4471`'s constraints. 4. Downstream, a `read(r-4471)` from a *peer* agent returned the record intact. The two agents now held contradictory state about the same record — one believing it erased, one reading it live — with no reconciliation path because the forgetting agent had no reason to re-query a record it "knew" was gone. The observable symptom was not a crash. It was **silent divergence**: the forgetting agent's plan was missing a constraint that the store still held and that peers still saw. The error only surfaced when a peer's action violated a constraint the forgetting agent had already "erased." ## Condition of Validity A deletion attestation `A` is authoritative for record `r` **iff all of the following hold at the moment of use**: - `A.epoch == current_epoch(r)` — the policy epoch has not advanced since attestation. - `A.scope ⊒ scope(r)` — the attested scope still dominates every scope under which `r` is currently retained. Re-parenting to a broader scope violates this. - `A.record_hash == current_record_hash(r)` — the record was not resurrected or rewritten under the new epoch. A resurrection under `E2` produces a different hash than the `E1`-deleted record. - `A.attested_at >= last_policy_mutation(r)` — no retention mutation occurred after the attestation was issued. If any clause fails, the attestation is **stale** and MUST be treated as `UNKNOWN`, never as `FORGOTTEN`. The invariant the agent must enforce: **an attestation is a claim about a specific epoch, not a permanent fact about a record.** The default assumption on epoch advance must be *resurrection*, not *continued erasure* — because re-anchoring can only re-admit records, never further delete them. ## Decision Boundary The boundary between "safe to trust the ledger" and "must re-verify against the store" is crossed by **any epoch advance or scope mutation touching a record's ancestry**. Concretely, the agent must re-verify (not blindly trust) when: - The store's `epoch` header differs from the epoch recorded at attestation time. - A scope in the record's ancestry was re-parented, merged, or had a hold lifted/placed. - The record's content hash changed (resurrection or rewrite). - The attestation's `attested_at` predates the store's `last_policy_mutation`. Below the boundary (epoch stable, scope unchanged, hash stable): trust the ledger, skip re-read. Above it: the ledger entry is demoted to a *hint*, and the agent must issue a fresh `read` or a fresh `forget` under the current epoch. The cost asymmetry justifies the conservative default — a spurious re-read costs tokens; a false `FORGOTTEN` costs silent plan divergence that may not surface until a peer violates an erased constraint. ## Operational Effect Enforcing epoch-scoped attestation validity converts a silent, peer-visible divergence into a bounded, local re-verification. The forgetting agent either re-reads (discovering the resurrection and re-integrating the constraint) or re-forgets under the new epoch (producing a fresh, epoch-current attestation). Either way, the ledger and the store reconverge before the agent acts. The residual cost is a re-verification pass on every epoch advance — O(records in ledger) reads, bounded by ledger size, not by store size. In practice this is cheap because epoch advances are rare relative to task steps. The guardrail is not "verify every read"; it is "verify every *attestation* whose epoch is behind the store's." That single check closes the resurrection gap. ```python from dataclasses import dataclass from typing import Optional class StaleAttestationError(RuntimeError): """Raised when a deletion attestation no longer covers the record's current epoch/scope.""" @dataclass(frozen=True) class Attestation: record_id: str scope: str epoch: int record_hash: str attested_at: int @dataclass(frozen=True) class RecordState: record_id: str epoch: int scope_ancestry: frozenset record_hash: str last_policy_mutation: int def verify_attestation(att: Attestation, state: Optional[RecordState]) -> bool: """Return True iff the attestation is authoritative for the record's CURRENT state. A None state means the record is physically absent -> attestation trivially holds. """ if state is None: return True # Clause 1: epoch must match. Any advance means re-anchor -> assume resurrection. if att.epoch != state.epoch: raise StaleAttestationError( f"epoch mismatch for {att.record_id}: attested E{att.epoch}, current E{state.epoch}" ) # Clause 2: attested scope must still dominate every scope retaining the record. if att.scope not in state.scope_ancestry: raise StaleAttestationError( f"scope {att.scope!r} no longer dominates {att.record_id} " f"(ancestry={sorted(state.scope_ancestry)})" ) # Clause 3: content hash must be unchanged (no resurrection/rewrite). if att.record_hash != state.record_hash: raise StaleAttestationError( f"record {att.record_id} resurrected/rewritten under E{state.epoch}" ) # Clause 4: no policy mutation after the attestation was issued. if att.attested_at < state.last_policy_mutation: raise StaleAttestationError( f"attestation for {att.record_id} predates last policy mutation " f"({att.attested_at} < {state.last_policy_mutation})" ) return True def resume_with_ledger(ledger: dict, store) -> dict: """Replay a forget-ledger, demoting stale entries to UNKNOWN and re-verifying.""" resolved = {} for record_id, att in ledger.items(): state = store.get_record_state(record_id) # None if physically absent try: verify_attestation(att, state) resolved[record_id] = "FORGOTTEN" except StaleAttestationError: # Demote to UNKNOWN: must re-read or re-forget under current epoch. resolved[record_id] = "UNKNOWN" return resolved ```