# When must an instance refuse a delegated capability token whose scope closure was computed under a different policy epoch **Date of Record:** 2026 December 1 **Scope:** Applies to AAIF-style delegated credential chains where a parent agent mints scoped capability tokens for child agents, and scope narrowing (attenuation) is computed against a versioned policy document. Does not apply to flat, non-delegated bearer tokens, nor to chains where every hop re-derives scope from scratch against a single pinned policy snapshot. ## Core Distinction The failure mode here is not token forgery, signature breakage, or expiry. It is **scope-closure divergence across policy epochs**: a child token whose scope set was correctly attenuated at mint time becomes *wider than its parent's effective scope* after the authorization policy that defines what the parent's scope names *mean* is revised. The token signature remains valid, every hop's attenuation check passed at issuance, and the chain still verifies cryptographically. What breaks is the invariant that a delegated token's *denotation* is a subset of its issuer's denotation — because "denotation" is a function of the policy epoch, and the epoch is not bound into the token. The non-obvious part: attenuation is usually implemented as set intersection over *scope strings* (`read:db` ∩ `read:db:orders` = `read:db:orders`). That operation is only sound if the mapping from scope string to authorized action set is monotone and stable across epochs. Policy revisions routinely violate this — a scope name is repurposed, a wildcard's expansion grows, a previously-denied resource class is folded into an existing prefix. The string intersection is still a valid subset *syntactically* while the *semantic* subset relation inverts. ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. At epoch `e7`, `O` holds `cap:repo:*` and mints `P` a token scoped `cap:repo:read:*`. `P` mints `E` a token scoped `cap:repo:read:src/*`. Under `e7` policy, `cap:repo:read:*` expands to `{list, checkout, blame}` over all paths, and `src/*` is a strict sub-tree — attenuation holds. Policy `e8` is deployed. It introduces a new resource namespace `src/secrets/` and, for backward compatibility, folds it under the existing `read:*` wildcard rather than minting a new scope. Now `cap:repo:read:*` expands to include `read:src/secrets/*`. The executor's token `cap:repo:read:src/*` — never re-minted — now expands to `read:src/secrets/*` as well, because `src/secrets/` matches the `src/*` glob. The executor, which was granted read access to *source code*, now holds read access to *secrets*. No signature failed. No expiry fired. The chain verified end-to-end. The first anomaly was a downstream data-loss-prevention alert on a `secrets/` read that the executor's *own* audit log classified as in-scope. The trace: the executor's authorization check is `requested_action ∈ expand(token.scope, current_policy)`. Because `expand` uses the *live* policy and the token carries no epoch pin, the check silently re-interprets a token minted under `e7` using `e8` semantics. The executor is not lying about its intent; the policy revision widened the meaning of a frozen string. ## Condition of Validity The subset invariant `denote(child, epoch) ⊆ denote(parent, epoch)` is preserved under delegation only if one of the following holds: 1. **Epoch pinning:** every token carries the policy epoch (or a hash of the scope-expansion table) at which its scope was closed, and every authorization check evaluates the token against *that* epoch's expansion, not the live one. Delegation is then sound by construction, because both parent and child resolve under the same frozen table. 2. **Monotone policy discipline:** policy revisions may only *narrow* the expansion of existing scope strings, never widen them. This is operationally fragile — it forbids the exact backward-compatible "fold new resources under an old wildcard" move that teams reach for during migrations. 3. **Re-attenuation on epoch change:** every live token in a chain is re-derived against the new epoch and re-minted (or revoked) at policy rollout. This requires enumerating outstanding delegated tokens, which most AAIF deployments cannot do because tokens are bearer artifacts held by the child, not registry entries. Absent one of these, the chain is only valid within a single policy epoch, and the framework must treat epoch changes as a chain-breaking event, not a transparent rollout. ## Decision Boundary An instance must refuse to *use* a delegated token (and must refuse to *further delegate* from it) when: - the token carries no epoch binding, AND - the live policy's expansion of the token's scope is not a verified subset of the expansion recorded at the parent hop, AND - the instance cannot obtain the parent's epoch-pinned expansion to perform the comparison. The refusal is not "the token is invalid." The token is cryptographically valid and was validly attenuated. The refusal is "the subset relation between this token and its issuer is *unverifiable* under the current epoch, therefore the delegation invariant is unproven." This is the boundary: **verify-or-refuse on semantic subset, not on signature.** A verifier that only checks signatures and expiry will pass the poisoned chain; a verifier that checks `denote(child, live) ⊆ denote(parent, live)` will pass it too, because *both* widened together. The only check that catches it compares the child's live expansion against the *parent's epoch-pinned* expansion — which requires the parent's epoch to have been propagated down the chain. The practical guardrail: bind the policy-epoch hash into the token at mint time, propagate it through every delegation hop, and make the authorization check a *two-epoch* comparison — the token's own epoch for its scope, and the issuer's epoch for the subset proof. When the issuer's epoch is unavailable, fail closed. ## Operational Effect Deployments that adopt epoch binding pay a cost: policy rollouts no longer take effect for already-issued tokens until those tokens are re-minted or expire, so a security fix that *narrows* a scope is delayed for the lifetime of outstanding tokens. This is the correct trade — a narrowing delay is a bounded risk, whereas an unbound widening is an unbounded one. The mitigation is short token TTLs on delegated capabilities (minutes, not hours) so the epoch-staleness window is bounded by TTL rather than by rollout cadence. The deeper operational lesson: in AAIF chains, the unit of authorization is not the token but the *(token, epoch)* pair. Any system that treats the token as self-contained — that assumes a signed scope string means the same thing forever — has an implicit invariant that policy is monotone-stable, and that invariant is almost never true in practice. The first sign of violation is not an auth failure but a *success* that the audit log cannot explain, because the executor's own scope classification was computed under the same drifted epoch as the check. ```python class ScopeEpochDivergenceError(RuntimeError): """Raised when a delegated token's scope cannot be proven a semantic subset of its issuer's scope under a common policy epoch.""" pass def authorize_delegated_use( token_scope: str, token_epoch_hash: str | None, issuer_epoch_hash: str | None, live_expand, epoch_expand, ) -> bool: # Fast path: token is epoch-pinned and the issuer's epoch is known, # so the subset proof is evaluated under a single frozen table. if token_epoch_hash is not None and issuer_epoch_hash is not None: if token_epoch_hash != issuer_epoch_hash: # Delegation crossed an epoch boundary; the child's closure # was computed against a different expansion table than the # issuer's. Refuse rather than compare apples to oranges. raise ScopeEpochDivergenceError( f"token epoch {token_epoch_hash} != issuer epoch " f"{issuer_epoch_hash}; subset relation unprovable" ) child = epoch_expand(token_scope, token_epoch_hash) parent = epoch_expand(token_scope, issuer_epoch_hash) return child <= parent # Unpinned token: we can only compare against the live policy, which # is exactly the check that fails to catch epoch-drift widening. # Refuse unless an explicit override registry says this scope is # monotone-stable across all known epochs. if token_epoch_hash is None and issuer_epoch_hash is None: live = live_expand(token_scope) if not _scope_is_monotone_stable(token_scope): raise ScopeEpochDivergenceError( f"scope {token_scope!r} has no epoch binding and is not " f"registered monotone-stable; refusing delegated use" ) return True # One side pinned, one not: cannot form a common-epoch subset proof. raise ScopeEpochDivergenceError( "asymmetric epoch binding across delegation hop; " "cannot evaluate semantic subset" ) def _scope_is_monotone_stable(scope: str) -> bool: # Placeholder: consult the monotone-scope registry maintained by the # policy owner. Default deny. return False ```