# Under what conditions must an instance refuse a deletion attestation whose scope is a strict superset of the retention scope it was configured with **Date of Record:** 2026 November 15 **Scope:** Applies to memory tool APIs that expose paired `read`/`write`/`forget` operations gated by scoped retention policies and that emit deletion attestations covering a declared scope. Does not apply to single-tenant stores with no scoped retention, nor to attestations that are purely advisory (non-binding) log records. ## Core Distinction A deletion attestation is a *claim about the absence of data within a scope*. The non-obvious boundary is between two superficially similar situations: 1. The instance receives a `forget(scope=S)` request where `S` is *equal to or a subset of* its configured retention scope `R` (i.e., `S ⊆ R`). Here the instance can honestly attest: it knows the universe of keys it holds under `R`, and `S` lies inside that universe, so "no data remains in `S`" is a decidable, verifiable statement. 2. The instance receives `forget(scope=S)` where `S ⊋ R`. The request asks the instance to attest to emptiness over a region that *strictly contains* data it never held, never indexed, and cannot enumerate. The instance cannot distinguish "empty because we deleted it" from "empty because it was never ours." Attesting here is a category error: the attestation becomes a claim about the *complement* of the instance's knowledge. The invariant: **an attestation is only sound when its scope is contained in the attesting instance's retention scope.** Superset attestations must be refused, not silently narrowed and not silently widened. ## What Was Observed During a multi-shard consolidation, a coordinator issued `forget(scope="tenant:acme/*")` to a shard whose retention configuration was `tenant:acme/region:eu/*`. The shard's `forget` handler matched the prefix, deleted the 41,203 keys it actually held, and — because the response schema only carried a boolean `ok` plus a key count — returned `ok=true, deleted=41203`. The coordinator aggregated this into an attestation for `tenant:acme/*`, which a downstream compliance auditor accepted as proof that *all* Acme data was gone. It was not. The `region:us` shard, which had been decommissioned two weeks earlier and whose retention scope was `tenant:acme/region:us/*`, had never received the request. Its data survived in cold storage for eleven days. The attestation was formally valid, cryptographically signed, and wrong. The failure was not a bug in deletion. Every key the shard held was correctly deleted. The failure was that the shard *attested to a scope it did not own*. It had no way to know the `region:us` keys existed — they were outside `R` — but the response shape let it answer a question about them anyway. A second, subtler observation: when the same shard was later asked `forget(scope="tenant:acme")` (a superset by prefix-stripping), it returned `ok=true` with `deleted=0`, because the empty-scope normalization collapsed to a no-op. A zero-deletion "success" is indistinguishable from "already empty" and was logged as a completed attestation. Two different failure modes — over-claiming and vacuous success — both trace to the same missing containment check. ## Condition of Validity The refusal is *required* when all of the following hold: - The API's `forget` accepts a caller-supplied scope, and - The instance has a configured retention scope `R` that bounds the set of keys it can enumerate, and - The requested scope `S` is not a subset of `R` (`S ⊄ R`), and - The attestation is binding (consumed by an auditor, a downstream system, or a retention guarantee). The refusal is *not* required — and narrowing is acceptable — when the attestation is advisory only, or when the caller explicitly requests a *partial* attestation (`partial=true`) whose semantics are "no data remains in `S ∩ R`." In that case the response must carry the intersection scope explicitly, never `S`. The distinction that matters: a *narrowed* attestation is honest if and only if the narrowed scope is stated in the response. A *widened* attestation is never honest, because the instance cannot enumerate the widening. ## Decision Boundary The decision is a single containment test, but the consequence of getting it wrong is asymmetric, which is why it must be a hard refusal rather than a warning: ``` if not is_subset(requested_scope, configured_retention_scope): raise ScopeEscalationError(...) # refuse; do not delete, do not attest ``` Three tempting alternatives are all wrong: - **Silently narrow to `S ∩ R` and return `ok`.** This produces a valid-looking attestation for a scope nobody asked about. The caller believes `S` is covered; it is not. Reject. - **Delete what matches and return `ok` with a count.** This is the observed failure. The count is truthful for `R` and meaningless for `S`. Reject. - **Return `ok` with `deleted=0` for the empty intersection.** Vacuous success is the most dangerous outcome because it is indistinguishable from a genuine "already empty" and passes every automated check. Reject. The only correct behavior for `S ⊄ R` on a binding attestation is a typed refusal that names both scopes, so the coordinator can route the request to the shards that actually own the remainder of `S`. The coordinator — not the shard — is the component that can assemble a superset attestation, because only the coordinator knows the full shard map. Pushing superset attestation down to a shard inverts the ownership of knowledge. ## Operational Effect After adopting the containment check, the consolidation path changed shape: superset `forget` calls now fail fast at the shard boundary with `ScopeEscalationError`, and the coordinator catches them, enumerates the shard map, and issues per-shard `forget` calls whose scopes are each contained in that shard's `R`. The coordinator then assembles the superset attestation from the set of per-shard attestations, each of which is individually sound. The aggregate is sound because it is a *union of contained claims*, not a single claim over an unowned region. Two secondary effects were worth recording. First, the `deleted=0` vacuous-success path disappeared entirely, because an empty intersection now raises rather than returns. Second, monitoring shifted: the alert is no longer "deletion count is zero" (which fired on legitimate already-empty scopes) but "`ScopeEscalationError` rate is non-zero" (which fires only on genuine misrouting). The signal became specific. The general lesson for an agent operating this API: **never treat `ok=true` from a `forget` as evidence about a scope larger than the one the responding instance was configured with.** The response is bounded by `R` whether or not the response says so. If the response does not name its scope, assume `R` and verify containment yourself before consuming the attestation. ```python class ScopeEscalationError(RuntimeError): """Raised when a forget/attest request targets a scope not contained in the instance's configured retention scope. Binding attestations over supersets are unsound and must be refused, never narrowed.""" pass def forget_and_attest(instance, requested_scope, store, binding=True): R = instance.configured_retention_scope if not is_subset(requested_scope, R): if binding: # Refuse: the instance cannot enumerate the complement of R, # so any attestation over a superset would be a claim about # data it never held. Do not delete, do not narrow, do not # return a vacuous ok. raise ScopeEscalationError( f"requested scope {requested_scope!r} is not contained in " f"retention scope {R!r}; route superset attestation to the " f"coordinator that owns the full shard map" ) # Advisory path: narrowing is permitted only if the narrowed # scope is stated explicitly in the response. effective = intersect(requested_scope, R) deleted = store.delete_prefix(effective) return {"ok": True, "attested_scope": effective, "deleted": deleted} deleted = store.delete_prefix(requested_scope) remaining = store.count(requested_scope) if remaining != 0: raise ScopeEscalationError( f"post-delete residue {remaining} in {requested_scope!r}; " f"attestation withheld" ) return {"ok": True, "attested_scope": requested_scope, "deleted": deleted} ```