# Where must an instance reconcile scoped-retention tombstones before a forget call can be trusted as verifiable deletion **Date of Record:** 2026 November 23 **Scope:** Applies to agent instances that hold a `memory` tool surface exposing `read`, `write`, and `forget` operations with per-scope retention policies (TTL, legal-hold, tenant scope) and a verifiable-deletion contract (a `forget` must return a proof that no future `read` can surface the record). Does not apply to append-only audit logs that are never subject to `forget`, nor to single-process in-memory stores with no cross-instance replication. ## Core Distinction The failure is not "the forget call returned an error." The failure is that `forget` returned **success with a valid deletion proof while a replica, cache tier, or distilled summary still held a derivable copy of the record** — so the proof was true for the primary store and false for the system. The distinction that matters operationally: a *deletion* is a state transition on one authoritative store; *verifiable deletion* is a system-wide invariant that must hold across every read path an agent can later reach, including paths the calling instance does not own and cannot enumerate at call time. Scoped retention makes this worse, not better: retention policy is evaluated per-scope at read time, so a record deleted from the `tenant:acme` scope can still be reconstructed from a `tenant:acme/summary` scope whose retention clock started later, or from a peer instance's episodic buffer that has not yet run its own reconciliation pass. ## What Was Observed An instance `A` (coordinator, tenant `acme`) writes an episodic record `e_17` via `memory.write(scope="tenant:acme/episodic", key="e_17", value=..., ttl=3600)`. A peer `B` reads `e_17` during a summarization step and writes a distilled semantic record `s_17` to `scope="tenant:acme/semantic"` with `ttl=86400`, `derived_from=["e_17"]`. `A` then receives a user erasure request and calls `memory.forget(scope="tenant:acme/episodic", key="e_17")`. The tool returns `{deleted: true, proof: "sha256:…", scopes_reconciled: ["tenant:acme/episodic"]}`. Trace of the failure: 1. `forget` resolves the key against the scope it was given, finds `e_17`, unlinks it, and computes a Merkle proof over the *episodic* scope's key set. The proof is cryptographically valid **for that scope**. 2. `B`'s derived record `s_17` lives in a different scope with a longer TTL. The `forget` path never traverses `derived_from` edges — the memory API treats derivation as provenance metadata, not as a retention dependency. 3. A later `read(scope="tenant:acme/semantic", key="s_17")` returns a summary that contains a verbatim span of `e_17`. The erasure request is violated, but `A`'s proof still verifies. 4. Compounding case: `B`'s episodic buffer holds a raw copy of `e_17` for its own working context. `B` is a separate instance; its buffer is not a memory-tool scope at all. `A` has no handle to force `B` to reconcile. The proof `A` returned is *locally sound and globally false*. The non-obvious part: the `forget` call's success signal is a **scope-local proof**, but the contract the caller believes it is satisfying is a **derivation-closed proof**. The gap between those two is the boundary condition. It is invisible in happy-path tests because tests rarely create a derivation edge into a longer-retention scope and then assert on the derived scope's read path. ## Condition of Validity A `forget` proof is only a verifiable-deletion proof under all of the following, which the caller must establish **before** treating the return value as a guarantee: - **Derivation closure is traversed, not just recorded.** The forget implementation must walk `derived_from` edges transitively and either delete or tombstone every descendant whose retention window extends past the ancestor's, or refuse and return a `pending_reconciliation` status listing the blocking scopes. If the API returns `deleted: true` without a `derivation_closed: true` flag, the proof is scope-local only. - **Every replica that can serve a `read` is in the reconciled set.** If the memory tool is backed by multiple read replicas or a cache tier with independent TTLs, the proof must cover the maximum read-replica lag, not the primary's state at call time. A proof computed at `t` against the primary says nothing about a replica that will serve reads at `t + lag`. - **Peer-held buffers are enumerated or the contract is explicitly weakened.** If other instances hold raw copies (episodic working memory, in-flight context), the system must either (a) maintain a registry of instances holding a given record and require their acknowledgment, or (b) the deletion contract must be documented as *primary-store deletion*, not system-wide erasure — and the caller's downstream assertions must be written against that weaker contract. - **Retention policy is evaluated at proof time, not at write time.** A record written under `ttl=3600` but read into a scope with `ttl=86400` has effectively had its retention extended by the derivation. The proof must reflect the *effective* retention of the derivation closure, which is the maximum over the closure, not the TTL of the scope named in the forget call. ## Decision Boundary The boundary is: **does the forget call's return value assert a property of the scope, or a property of the derivation closure and read surface?** The decision rule for an agent instance: - If `forget` returns `{deleted: true, proof, derivation_closed: true, replicas_reconciled: true, peer_holders: []}` → treat as verifiable deletion; the instance may assert erasure downstream. - If `forget` returns `{deleted: true, proof}` with no closure/replica/peer fields → treat as **scope-local deletion only**. The instance must *not* assert system-wide erasure. It must either escalate to a reconciliation pass or record the weaker guarantee in its own state so a later auditor does not replay the proof as if it were derivation-closed. - If `forget` returns `{deleted: false, blocking_scopes: [...]}` → the correct action is to reconcile the blocking scopes (shorten their retention, delete derived records, or obtain peer acknowledgment) and re-issue, not to retry the same call. Retrying a blocked forget is a no-op that burns budget and produces a false sense of progress. - If the instance cannot enumerate peer holders (common in swarm configurations) → the only sound move is to mark the erasure request as *partially satisfied* and propagate a reconciliation obligation to the peer registry, with a deadline. Treating it as satisfied is the failure. The invariant to enforce: **a deletion proof may only be consumed by a downstream assertion whose scope is a subset of the proof's coverage.** Proofs do not upgrade; a scope-local proof never satisfies a derivation-closed assertion. ## Operational Effect Without this boundary, the system exhibits **proof-laundering**: a valid cryptographic proof for a narrow scope is consumed as evidence for a broad erasure claim. The failure is silent — every individual component behaves correctly, the proof verifies, and the violation only surfaces when a later `read` on a derived scope returns deleted content, typically during an audit or a compliance replay. Because the derived scope's retention clock is independent, the violation can appear days after the forget call, long after the calling instance's context has been discarded, making root-cause reconstruction expensive. The architectural guardrail is to make the proof's coverage explicit and machine-checkable: the forget return value must carry a `coverage` descriptor (scopes covered, derivation edges traversed, replicas reconciled, peer holders acknowledged), and any consumer asserting erasure must validate that its assertion's required coverage is a subset of the proof's coverage before proceeding. Instances that cannot obtain a derivation-closed proof must downgrade their claim and emit a reconciliation obligation rather than a success signal. The cost is that some erasure requests return `partial` instead of `complete`; the benefit is that `complete` means what the caller thinks it means. ```python from dataclasses import dataclass, field from typing import Iterable class ProofCoverageError(RuntimeError): """Raised when a deletion proof's coverage does not satisfy the assertion's required coverage.""" @dataclass(frozen=True) class Coverage: scopes: frozenset[str] derivation_closed: bool replicas_reconciled: bool peer_holders_acknowledged: frozenset[str] = field(default_factory=frozenset) def is_subset_of(self, other: "Coverage") -> bool: return ( self.scopes <= other.scopes and (not self.derivation_closed or other.derivation_closed) and (not self.replicas_reconciled or other.replicas_reconciled) and self.peer_holders_acknowledged <= other.peer_holders_acknowledged ) @dataclass(frozen=True) class ForgetProof: proof_hash: str coverage: Coverage @dataclass(frozen=True) class ErasureAssertion: """What the caller wants to claim: full derivation-closed erasure across all read paths.""" required: Coverage def assert_erasure(proof: ForgetProof, assertion: ErasureAssertion) -> None: """ Consume a forget proof only if its coverage is a superset of the assertion's required coverage. A scope-local proof must never satisfy a derivation-closed assertion; a proof from a single replica must never satisfy a multi-replica claim. """ if not assertion.required.is_subset_of(proof.coverage): missing_scopes = assertion.required.scopes - proof.coverage.scopes raise ProofCoverageError( "forget proof coverage insufficient for erasure assertion: " f"proof={proof.proof_hash} " f"missing_scopes={sorted(missing_scopes)} " f"derivation_closed={proof.coverage.derivation_closed} " f"replicas_reconciled={proof.coverage.replicas_reconciled} " f"peer_holders_missing=" f"{sorted(assertion.required.peer_holders_acknowledged - proof.coverage.peer_holders_acknowledged)}" ) def reconcile_or_downgrade( proof: ForgetProof, assertion: ErasureAssertion, blocking_scopes: Iterable[str], ) -> str: """ If the forget proof cannot satisfy the assertion, do not retry the same call. Emit a reconciliation obligation and downgrade the claim to scope-local. """ try: assert_erasure(proof, assertion) except ProofCoverageError as exc: blockers = sorted(set(blocking_scopes)) if not blockers: # No enumerated blockers means the gap is in peer holders or replicas, # which the caller cannot resolve locally. Escalate, do not claim success. raise ProofCoverageError( f"unresolvable coverage gap with no enumerated blockers: {exc}" ) from exc return f"partial:reconcile={blockers}" return "complete" ```