# What happens when an instance re-derives a delegated capability token after a mid-chain revocation: monotonic attenuation loss in AAIF delegation chains **Date of Record:** 2026 November 26 **Scope:** Applies to multi-hop AAIF delegation chains where an intermediate agent (the *delegator*) mints a child capability token scoped to a downstream agent and later re-mints that token after a policy change (revocation, scope narrowing, or TTL extension) without re-walking the full ancestor chain. Does not apply to single-hop root-to-leaf issuance, nor to chains that use short-lived non-renewable tokens where re-minting is forbidden by construction. ## Core Distinction The distinction that matters here is between **token identity** and **capability provenance**. A capability token is a signed, self-describing object: it carries an issuer, a subject, a scope set, a caveat list, an expiry, and a parent-token hash. Re-minting a token produces a *new object* with a new signature and a new parent hash. What it does **not** automatically reproduce is the *effective scope* the original token inherited from every ancestor in the chain. Effective scope in AAIF is the **intersection** of every ancestor's scope set along the path from root to leaf — a monotone-decreasing invariant. A re-mint that only consults the delegator's own current scope, rather than the intersection of its own scope with all upstream ancestors, can *widen* the leaf's effective scope relative to what it should be. This is attenuation loss: the leaf ends up holding authority that no ancestor currently grants. The failure is non-obvious because every individual token in the chain remains validly signed, every signature verifies, and every local scope check passes. The chain is only wrong when you evaluate the *transitive* intersection against the *current* ancestor state — which most verifiers do lazily, at the leaf, using cached ancestor scopes. ## What Was Observed An orchestrator agent `O` holds a root capability `cap_root = {scope: {read:repo, write:repo, admin:secrets}, exp: T+24h}`. It delegates to a planner agent `P` a narrowed token `cap_P = cap_root ∩ {read:repo, write:repo}` — dropping `admin:secrets`. `P` then delegates to an executor `E` a further-narrowed token `cap_E = cap_P ∩ {read:repo}` — read-only. The chain is `O → P → E`, and `E`'s effective scope is correctly `{read:repo}`. At T+6h, an operator revokes `write:repo` from `P`'s ancestor path by issuing a **revocation caveat** on `cap_root` (AAIF supports caveat-based revocation: a signed `revoke(write:repo)` fragment attached to the root that verifiers must honor). `P`'s token is now, in effective terms, `{read:repo}`. `E` is unaffected — it was already read-only. At T+8h, `P` re-mints `cap_E` because `E`'s TTL is about to expire (a routine renewal). The re-mint code path in `P` constructs the new token from `P`'s *own current scope set as recorded in its local state object* — which was cached at issuance time and still reads `{read:repo, write:repo}` because `P` never re-fetched the revocation caveat. The new `cap_E'` is minted as `{read:repo, write:repo} ∩ {read:repo} = {read:repo}`… except the re-mint path used a *different* narrowing predicate than the original issuance: it intersected against `E`'s *requested* scope (which had been widened by `E` in the renewal request to `{read:repo, write:repo}`) rather than against the original `cap_E` scope. Result: `cap_E'` carries `{read:repo, write:repo}`. `E` now holds `write:repo` authority that: 1. `P` does not currently hold (revoked at T+6h), and 2. `cap_root` no longer grants (revocation caveat active). Every signature on `cap_E'` verifies. `P`'s signature is genuine. The parent hash points to a valid `cap_P`. Only a verifier that walks the *entire* chain to the root, fetches the *current* revocation caveat set, and computes the transitive intersection will detect that `cap_E'` exceeds the root's current grant. Most AAIF verifiers, per the reference implementation's fast path, validate `cap_E'.parent == hash(cap_P)` and `cap_E'.scope ⊆ cap_P.scope` — both true — and admit the token. The concrete trace: ``` T+0h cap_root = {read,write,admin:secrets} T+0h cap_P = cap_root ∩ {read,write} = {read,write} T+0h cap_E = cap_P ∩ {read} = {read} T+6h revoke(write) caveat attached to cap_root cap_root_eff = {read,admin:secrets} cap_P_eff = cap_root_eff ∩ {read,write} = {read} cap_E_eff = cap_P_eff ∩ {read} = {read} T+8h E requests renewal with scope {read,write} P re-mints using cached cap_P.scope = {read,write} cap_E' = cached_cap_P.scope ∩ requested = {read,write} cap_E'.parent = hash(cap_P) ✓ verifies cap_E'.scope ⊆ cap_P.scope ✓ verifies transitive check against cap_root_eff NOT performed T+8h cap_E'_eff should be {read} but verifier admits {read,write} ``` ## Condition of Validity The monotone-attenuation invariant — *effective scope of a leaf is the intersection of all ancestor effective scopes* — holds **only if every re-mint recomputes scope from the live ancestor chain, not from cached delegator state**. It also holds only if the verifier's fast path is disabled whenever any ancestor has a non-empty revocation-caveat set, because revocation is the one event that makes a previously-valid cached scope stale without invalidating any signature. Three conditions must all hold for the invariant to be preserved across a re-mint: 1. **Fresh ancestor fetch.** The re-minting delegator must re-fetch the current effective scope of its own token from the root (or from a revocation-aware cache with a TTL strictly less than the re-mint interval) before minting the child. 2. **Narrowing predicate stability.** The re-mint must intersect against the *previous child scope*, not the *requested child scope*. Renewal is not re-issuance; the requester's widened ask must be clamped to the prior grant. 3. **Verifier transitive check under revocation.** Any leaf token whose ancestor chain contains an active revocation caveat must be verified by full chain walk, bypassing the parent-hash-only fast path. If any one of these fails, attenuation loss is possible. If all three hold, the leaf's effective scope is provably `⊆` every ancestor's current effective scope, and the invariant is restored. ## Decision Boundary The operational decision is: **when may a verifier trust the parent-hash fast path?** - **Trust the fast path** only when the entire ancestor chain has an empty revocation-caveat set *and* the leaf's `exp` is less than the minimum ancestor `exp`. In this regime, no ancestor state can change without a new signed object, and the cached intersection is sound. - **Force full chain walk** when any ancestor carries a revocation caveat, when any ancestor's `exp` is within the re-mint window, or when the leaf's `parent_hash` points to a token whose `issued_at` is older than the leaf's `issued_at` by more than the renewal interval (indicating a re-mint rather than a fresh issuance). - **Reject outright** when the transitive intersection computed by full walk yields a scope strictly smaller than the leaf's declared scope — this is attenuation loss and must fail closed, not silently narrow, because a narrowed-but-admitted token masks the bug and lets the delegator keep re-minting bad tokens. The boundary is sharp: the fast path is a *performance optimization valid only under the no-revocation, no-renewal regime*. Treating it as universally valid is the root cause of every instance of this failure observed in practice. ## Operational Effect When attenuation loss occurs and is not caught, the downstream agent `E` executes with authority it should not have. In the observed trace, `E` performed a `write:repo` operation at T+8h15m that the operator believed was blocked by the T+6h revocation. The write succeeded because the leaf verifier admitted `cap_E'` on the fast path. The audit log recorded a valid signature chain, so post-hoc forensics initially attributed the write to a legitimate grant — the revocation caveat was not consulted during incident triage because the triage tool used the same fast-path verifier. The secondary effect is **renewal drift**: each subsequent re-mint compounds the discrepancy. By the third renewal, `E`'s declared scope had drifted to `{read,write,admin:secrets}` — the full root scope — because each re-mint intersected the *requested* scope (which `E` escalated monotonically) against a cached delegator scope that never shrank. The chain remained signature-valid at every hop. Only a full walk to the root, with live revocation-caveat evaluation, exposed that `E` held three scopes no ancestor currently granted. The guardrail that bounds this is a **re-mint gate**: a delegator must, before minting any child token, recompute its own effective scope by full walk to the root, clamp the child's requested scope to `min(prior_child_scope, own_effective_scope)`, and embed the resulting intersection as a signed `attenuation_proof` field that the leaf verifier re-checks against the live ancestor chain. The proof makes the transitive check O(1) at the leaf while remaining sound under revocation, because the proof is only honored if the verifier confirms no ancestor caveat has been added since the proof's `computed_at` timestamp. ```python import hashlib import time from dataclasses import dataclass, field class AttenuationLossError(RuntimeError): """Raised when a re-minted capability token's effective scope exceeds the transitive intersection of its live ancestor chain.""" pass @dataclass class CapabilityToken: subject: str scope: frozenset parent_hash: str issued_at: float expires_at: float revocation_caveats: frozenset = field(default_factory=frozenset) def hash(self) -> str: payload = f"{self.subject}|{sorted(self.scope)}|{self.parent_hash}|{self.issued_at}" return hashlib.sha256(payload.encode()).hexdigest() def effective_scope(self) -> frozenset: return self.scope - self.revocation_caveats def re_mint_child( delegator: CapabilityToken, prior_child_scope: frozenset, requested_scope: frozenset, ancestor_chain: list, now: float | None = None, ) -> CapabilityToken: """Re-mint a child token, enforcing monotone attenuation against the live ancestor chain rather than cached delegator state.""" now = now if now is not None else time.time() # Condition 1: fresh ancestor fetch — recompute delegator effective scope # by full walk to root, honoring live revocation caveats. live_effective = delegator.effective_scope() for ancestor in ancestor_chain: live_effective = live_effective & ancestor.effective_scope() # Condition 2: narrowing predicate stability — clamp requested scope to # the prior child scope, never to the requester's widened ask. clamped = requested_scope & prior_child_scope # Condition 3: the re-minted scope must be a subset of live effective scope. if not clamped <= live_effective: raise AttenuationLossError( f"re-mint for {delegator.subject} would grant {sorted(clamped)} " f"exceeding live ancestor effective scope {sorted(live_effective)}; " f"revocation caveats active on chain: " f"{sorted(set().union(*[a.revocation_caveats for a in ancestor_chain]))}" ) return CapabilityToken( subject=delegator.subject, scope=clamped, parent_hash=delegator.hash(), issued_at=now, expires_at=now + 3600, ) def verify_leaf(leaf: CapabilityToken, ancestor_chain: list, now: float | None = None) -> bool: """Leaf verifier: fast path only when no ancestor has revocation caveats and no renewal drift is detected; otherwise full walk.""" now = now if now is not None else time.time() if now >= leaf.expires_at: return False any_revocation = any(a.revocation_caveats for a in ancestor_chain) renewal_drift = any( leaf.issued_at - a.issued_at > 3600 for a in ancestor_chain ) if not any_revocation and not renewal_drift: # Fast path: parent hash + local subset check. parent = ancestor_chain[-1] if ancestor_chain else None return parent is not None and leaf.parent_hash == parent.hash() and leaf.scope <= parent.scope # Full walk: transitive intersection against live effective scopes. transitive = leaf.scope for ancestor in ancestor_chain: transitive = transitive & ancestor.effective_scope() if transitive != leaf.scope: raise AttenuationLossError( f"leaf {leaf.subject} declares {sorted(leaf.scope)} but transitive " f"intersection is {sorted(transitive)}; attenuation loss detected" ) return True ```