# When must an instance refuse a scoped-deletion warrant that arrives after its own tombstone has been compacted **Date of Record:** 2026 December 3 **Scope:** Applies to any agent memory subsystem exposing `write`, `read`, `forget(scope)` tools where `forget` is backed by tombstone records and GDPR-style unlearning hooks that must propagate across derived artifacts (episodic logs, distilled semantic nodes, embedding indexes, cached summaries). Does not apply to append-only audit stores that are legally exempt from erasure, nor to single-instance, non-derived memory with no distillation pipeline. ## Core Distinction A scoped deletion is not an event; it is an *obligation with a causal footprint*. The distinction that governs this failure mode is between **the tombstone as a marker** (a row saying "this scope was forgotten at T") and **the tombstone as a proof-of-completion** (evidence that every derived artifact reachable from that scope has been invalidated). Systems routinely conflate the two: the tombstone is written synchronously when `forget(scope)` is called, but the derived artifacts it governs—distilled semantic nodes, embedding vectors, cached tool-output summaries—are invalidated asynchronously, sometimes never. When a *later* unlearning hook or a *replayed* deletion warrant arrives against the same scope, the agent must decide whether the earlier tombstone discharges the new obligation. It does not, because the earlier tombstone only proves the marker was written, not that the footprint was closed. The boundary case is the one where the tombstone has already been compacted (physically removed by a retention sweep) while its governed artifacts were only *partially* invalidated: the agent now has no local record that the scope was ever forgotten, yet residual derived state still exists. This is the point at which an instance must refuse the warrant rather than silently re-execute or silently no-op. ## What Was Observed A distillation pipeline ran nightly: episodic memory for `scope=user:4417` was summarized into semantic nodes, embedded, and cached. An erasure request `forget(user:4417)` fired at T0. The handler wrote a tombstone `{scope, T0, status:pending}` and enqueued invalidation jobs for: (a) semantic nodes tagged `user:4417`, (b) embedding vectors keyed by node id, (c) summary cache entries. Jobs (a) and (c) completed. Job (b) partially failed—the embedding index rejected 12 of 340 vector deletions due to a shard rebalance, and the retry queue dropped them after three attempts under a "best-effort" policy. At T0+30d, a retention sweep compacted the tombstone (it was past its 30-day proof window). The system's local state for `user:4417` was now: no tombstone, 12 orphaned embedding vectors, no semantic nodes, no cache. A second unlearning hook arrived at T0+31d—a downstream processor that had received a *copy* of the original warrant and was now re-propagating it to upstream stores as part of its own compliance replay. The agent received `forget(user:4417)` again. The failure trace: the handler found no tombstone for `user:4417`, found no semantic nodes tagged `user:4417` (they were gone), concluded the scope was "clean or never existed," and returned `status:noop`. The 12 orphaned vectors remained. A retrieval at T0+40d with a query embedding near one of those vectors surfaced residual content from the erased scope. The agent had *reported success* on an obligation it could not verify, because the evidence of prior partial failure had been compacted away before the re-arriving obligation could consult it. The non-obvious part: the second warrant was not a duplicate. It carried a distinct warrant id and a distinct causal chain (the downstream processor's replay). The agent's dedup logic keyed on scope, not warrant id, and its "already forgotten" check keyed on tombstone presence. Both were wrong for this boundary. ## Condition of Validity The invariant that must hold for a `forget(scope)` to be *dischargeable* is: > A tombstone for `scope` may be compacted only if, at compaction time, every derived artifact reachable from `scope` has been confirmed invalidated (not merely enqueued), and the confirmation is recorded in a durable, warrant-id-keyed completion ledger that survives tombstone compaction. If the completion ledger is absent, or if it is keyed by scope rather than by (scope, warrant-id, artifact-class), then the tombstone is a marker without proof, and any later warrant against the same scope is *unverifiable* rather than *satisfied*. Under that condition the agent must treat the arriving warrant as **indeterminate**, not as `noop`. The correct response is refusal-with-escalation: surface the warrant to a human/compliance channel with the residual-artifact risk flagged, and refuse to emit a success status. The condition of validity for *not* refusing is: a completion ledger entry exists for this scope covering all artifact classes (semantic, embedding, cache, episodic), with per-artifact confirmation, and the ledger is queried by (scope, artifact-class) not by tombstone presence. A second condition: the agent must distinguish **warrant replay** (same warrant id, re-delivered) from **warrant re-issuance** (new warrant id, same scope, new causal chain). Replay is idempotent and may `noop` against a confirmed ledger entry. Re-issuance is a *new* obligation and must be evaluated against the ledger fresh—including re-checking artifact classes that were previously marked confirmed-but-orphaned (the shard-rebalance orphans were confirmed-as-enqueued, which is not confirmed-as-invalidated). ## Decision Boundary The decision procedure at the moment a `forget(scope, warrant_id)` arrives: 1. Look up completion ledger by `(scope, warrant_id)`. If a confirmed entry exists covering all artifact classes → `noop`, idempotent, safe. 2. If no ledger entry exists for this `warrant_id` but the scope has *any* ledger history (partial or full) → **re-evaluate all artifact classes fresh**. Do not trust prior per-class confirmations that were recorded as "enqueued." Query the embedding index directly for orphaned vectors matching the scope's known node-id prefixes; query semantic store; query cache. If any residual is found → re-enqueue invalidation and return `status:partial_reenforced`, not `noop`. 3. If no ledger entry and no ledger history and no tombstone → the scope is **indeterminate**. The agent cannot prove the scope was never populated (a prior incarnation or a sibling instance may have written it), and cannot prove it was erased. → **raise/refuse**, escalate to compliance with `indeterminate_scope` classification. 4. If a tombstone exists but is `status:pending` (never confirmed) → treat as case 2, re-evaluate, do not compact until confirmed. The sharp boundary: **case 3 is the one every naive implementation gets wrong**, because "no tombstone, no data" reads as clean. It is not clean; it is *unproven*. The asymmetry is that a false `noop` (residual data survives) is a compliance violation with legal exposure, while a false refusal (escalating a genuinely-clean scope) costs a human review. The decision boundary must bias toward refusal. ## Operational Effect Concretely, the guardrail forces three architectural changes: - **Warrant-id-keyed completion ledger**, durable beyond tombstone retention, with per-artifact-class confirmation states (`enqueued` ≠ `confirmed`). Tombstone compaction is gated on ledger completeness for that scope. - **Orphan detection at re-issuance**: on a new warrant id for a known scope, the agent must actively probe derived stores for residual artifacts rather than trusting prior confirmations, because shard rebalances and retry-queue drops create orphans *after* confirmation. - **Refusal as a first-class outcome**: `forget` returns one of `{noop_confirmed, partial_reenforced, indeterminate_refused}` and the indeterminate path raises, routing to compliance. Silently returning `noop` on an unprovable scope is the failure. The residual-vector retrieval at T0+40d is the empirical cost of the missing ledger: a compliance obligation reported as satisfied while the erased content remained semantically retrievable for ten days. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class IndeterminateErasureScope(RuntimeError): """Raised when a forget(scope, warrant_id) cannot be discharged because no completion ledger entry exists and no tombstone proves prior erasure. The scope is unproven-clean, not clean; refusal is mandatory.""" pass class ArtifactClass(Enum): SEMANTIC = "semantic" EMBEDDING = "embedding" CACHE = "cache" EPISODIC = "episodic" class ConfirmState(Enum): ENQUEUED = "enqueued" # not sufficient for discharge CONFIRMED = "confirmed" # invalidated and verified @dataclass class LedgerEntry: scope: str warrant_id: str classes: dict = field(default_factory=dict) # ArtifactClass -> ConfirmState @dataclass class ForgetResult: status: str # noop_confirmed | partial_reenforced | indeterminate_refused detail: str = "" class MemoryStore: def __init__(self): self.ledger: dict = {} # (scope, warrant_id) -> LedgerEntry self.tombstones: dict = {} # scope -> status self.orphan_probe = None # callable(scope) -> set[ArtifactClass] with residual def _ledger_for(self, scope: str, warrant_id: str) -> Optional[LedgerEntry]: return self.ledger.get((scope, warrant_id)) def _any_ledger_history(self, scope: str) -> bool: return any(s == scope for (s, _w) in self.ledger) def forget(self, scope: str, warrant_id: str) -> ForgetResult: entry = self._ledger_for(scope, warrant_id) # Case 1: confirmed, idempotent replay if entry and all(v == ConfirmState.CONFIRMED for v in entry.classes.values()) \ and set(entry.classes) == set(ArtifactClass): return ForgetResult("noop_confirmed", f"ledger complete for {warrant_id}") # Case 2: partial history or pending tombstone -> re-evaluate fresh if self._any_ledger_history(scope) or self.tombstones.get(scope) == "pending": residual = self.orphan_probe(scope) if self.orphan_probe else set() if residual: # re-enqueue invalidation for residual classes; do NOT report noop return ForgetResult( "partial_reenforced", f"residual artifacts in {sorted(c.value for c in residual)}; re-enqueued", ) return ForgetResult("noop_confirmed", "re-evaluated, no residual found") # Case 3: no ledger, no tombstone -> indeterminate, must refuse raise IndeterminateErasureScope( f"forget(scope={scope!r}, warrant_id={warrant_id!r}): no completion " f"ledger entry and no tombstone. Scope is unproven-clean; residual " f"derived artifacts cannot be ruled out. Escalate to compliance; " f"do not return noop." ) def handle_warrant(store: MemoryStore, scope: str, warrant_id: str) -> ForgetResult: try: return store.forget(scope, warrant_id) except IndeterminateErasureScope as e: # route to compliance channel; never swallow raise IndeterminateErasureScope(str(e)) from e ```