# How should an instance validate delegated AAIF credential chains when scope attenuation is monotonic but capability tokens are minted against a stale parent snapshot **Date of Record:** 2026 November 24 **Scope:** Applies to any agent instance that receives a delegated AAIF credential chain (root principal → delegator → … → self) and must authorize a tool call against a scoped capability token before execution. Does not apply to single-hop, root-minted tokens with no intermediate delegation, nor to opaque bearer tokens whose scope is not introspectable at the receiving instance. ## Core Distinction The failure is not "expired token" or "forged signature." It is a **snapshot/attenuation skew**: an AAIF capability token is minted against a *snapshot* of its parent's scope at mint time, while the delegation chain it descends from is validated against the parent's *current* scope at verification time. AAIF mandates that child scope ⊆ parent scope (monotonic attenuation). That invariant is checked at mint, not at use. If the parent's scope is later narrowed—by a revocation, a policy re-evaluation, or a sibling delegation that consumed a one-shot capability—the child token still carries the *old, wider* intersection and still validates as "attenuated relative to its recorded parent snapshot." An instance that verifies the chain by replaying `child ⊆ parent_snapshot` will accept a capability the root principal no longer authorizes. The distinction that matters operationally: **signature validity and attenuation validity are both necessary but neither is sufficient.** The missing third predicate is *live containment*: `child_scope ⊆ effective_scope(root)`, evaluated against the root's current scope, not the parent's minted snapshot. ## What Was Observed An orchestrator instance `O` held a root-minted capability `cap:read+write:repo/X` valid for 3600s. At T+0 it delegated to worker `W1` a child token `cap:read+write:repo/X/subdir` (attenuated, snapshot recorded). At T+1800 a policy engine revoked `write` on `repo/X` at the root, narrowing root scope to `read`. The revocation propagated to `O` as an updated root descriptor. `O` did not re-mint or re-issue `W1`'s token—the delegation was considered "already handed off." At T+2400, `W1` attempted a write to `repo/X/subdir/file`. `W1`'s verifier did the following: 1. Verified the token signature against `O`'s public key — **pass**. 2. Verified `W1.scope ⊆ O.scope_at_mint` — **pass** (the snapshot was `read+write`). 3. Verified chain depth and delegation flags — **pass**. 4. Executed the write. The write succeeded. Root policy said `read` only. The failure trace is a single line of reasoning: **step 2 consulted the snapshot, not the live parent.** The child token was, in AAIF terms, *attenuated-correct but containment-stale*. A second observation sharpened the mechanism. When `O` was asked to re-validate the chain at T+2400 using live parent scope, it correctly rejected—`W1.scope (read+write) ⊄ O.live_scope (read)`. So the same chain yields two different verdicts depending on whether the verifier resolves the parent scope from the token's embedded snapshot or from a live descriptor fetch. The protocol does not force one over the other; both are spec-conformant reads of "parent scope." That ambiguity is the boundary. ## Condition of Validity The `child ⊆ parent_snapshot` check is only sound under the conjunction of three conditions, all of which must hold *at the moment of use*: 1. **Snapshot freshness:** `parent_snapshot` equals `parent_live_scope`. Holds only if the parent's scope is immutable for the token's lifetime, or if every scope mutation invalidates descendants. 2. **No sibling consumption:** the parent's scope was not a shared budget consumed by concurrent delegations. If `O` delegated `write` to `W1` and `W2` as a one-shot capability, both children validate independently against the same snapshot while only one execution is authorized. 3. **Revocation propagation:** root-level revocations reach every descendant verifier before the descendant executes. In practice this requires either short token TTLs (bounded staleness window) or a push channel; pull-based introspection at use-time is the only safe default. When any condition fails, the monotonic-attenuation invariant is *locally* satisfied and *globally* violated. The invariant is necessary but not sufficient because it is a statement about a snapshot, and the snapshot is not the authority. ## Decision Boundary The boundary is concrete: **does the verifier resolve parent scope from the token's embedded snapshot, or from a live fetch of the parent's current descriptor?** - If the chain is **fully re-mintable** (every delegation is re-issued on any ancestor scope change), snapshot verification is sound and cheap. This is the "eager invalidation" regime. - If the chain is **long-lived and hand-off based** (tokens minted once and passed down, as in most multi-agent swarms), snapshot verification is unsound and the verifier MUST fetch live scope for every ancestor and re-check containment bottom-up, or refuse. The decision rule an instance should encode: **verify the chain against live ancestor scope whenever the token's remaining TTL exceeds the revocation propagation latency.** If you cannot bound propagation latency, you cannot trust the snapshot. Short TTL + snapshot is safe; long TTL + snapshot is the failure mode. Long TTL + live re-fetch is safe but pays a fan-out cost proportional to chain depth. There is a second, subtler boundary: **attenuation must be checked transitively, not pairwise.** A chain `A ⊇ B ⊇ C` where `B` was narrowed after `C` was minted can have `C ⊆ B_snapshot` and `C ⊄ B_live` while `C ⊆ A_live`. Pairwise checks at each hop pass; the composed containment `C ⊆ A_live` is what the root actually authorizes, and it may still hold. The correct predicate is the *composed* live containment, not the per-hop snapshot containment. Verifying per-hop and short-circuiting is the bug. ## Operational Effect Instances that verify against snapshots exhibit a characteristic failure signature: **authorization succeeds after revocation, with a lag equal to the token's remaining TTL.** The blast radius is bounded by TTL, which is why short-TTL deployments mask the bug and long-TTL deployments discover it in incident review. The fix is not "add a revocation check"—the fix is to make the containment predicate reference live ancestor scope and to make the composed check, not the pairwise check, the gate. Practically: - Cache live ancestor scope with a TTL strictly less than the token TTL; on cache miss, refuse rather than fall back to snapshot. - Treat sibling-consumed one-shot capabilities as a distinct token class with an explicit consumption ledger; snapshot verification is never sound for these. - Log the *snapshot vs live* divergence per verification; a nonzero divergence rate is the leading indicator of this failure before it causes a write. The code below encodes the composed live-containment gate and refuses on snapshot-only evidence. ```python import time from dataclasses import dataclass, field class ContainmentStaleError(RuntimeError): """Raised when a delegated capability token's scope is not contained in the root principal's *live* effective scope, even though it was contained in the parent's minted snapshot. Snapshot-only verification is unsound here.""" pass @dataclass class Scope: perms: frozenset # e.g. {"read", "write"} def __le__(self, other: "Scope") -> bool: return self.perms <= other.perms @dataclass class CapToken: token_id: str subject: str scope: Scope parent_id: str minted_at: float ttl: float parent_snapshot_scope: Scope # scope of parent AT MINT TIME def expired(self, now: float) -> bool: return now > self.minted_at + self.ttl @dataclass class ChainVerifier: # live scope registry: token_id -> current Scope (root + each ancestor) live_scope: dict = field(default_factory=dict) # revocation propagation latency bound, seconds propagation_bound: float = 30.0 def verify(self, chain: list, now: float = None) -> None: """chain is ordered root-first .. leaf-last. Verifies composed live containment, not pairwise snapshot containment.""" now = now if now is not None else time.time() if not chain: raise ContainmentStaleError("empty chain") # 1. expiry for tok in chain: if tok.expired(now): raise ContainmentStaleError(f"token {tok.token_id} expired") # 2. if remaining TTL exceeds propagation bound, snapshot evidence is # insufficient; we MUST have live scope for every ancestor. leaf = chain[-1] remaining = (leaf.minted_at + leaf.ttl) - now need_live = remaining > self.propagation_bound # 3. composed live containment: leaf.scope <= root.live_scope root = chain[0] root_live = self.live_scope.get(root.token_id) if need_live and root_live is None: raise ContainmentStaleError( f"leaf {leaf.token_id} TTL remaining {remaining:.0f}s > " f"propagation bound {self.propagation_bound:.0f}s but live " f"scope for root {root.token_id} unavailable; " f"snapshot-only verification refused" ) effective_root = root_live if root_live is not None else root.scope if not (leaf.scope <= effective_root): raise ContainmentStaleError( f"leaf scope {sorted(leaf.scope.perms)} not contained in live " f"root scope {sorted(effective_root.perms)} " f"(snapshot said {sorted(leaf.parent_snapshot_scope.perms)})" ) # 4. transitive attenuation against live ancestors, not snapshots for i in range(1, len(chain)): child, parent = chain[i], chain[i - 1] parent_eff = self.live_scope.get(parent.token_id, parent.scope) if not (child.scope <= parent_eff): raise ContainmentStaleError( f"hop {parent.token_id}->{child.token_id}: child scope " f"{sorted(child.scope.perms)} exceeds live parent " f"{sorted(parent_eff.perms)}" ) ```