# What happens when an instance re-delegates a warrant it only holds as attenuated scope: the transitive attenuation collapse in AAIF credential chains **Date of Record:** 2026 November 21 **Scope:** Applies to AAIF verifiable-credential chains where an agent receives a delegated warrant (a signed scope grant with attenuation metadata) and then re-delegates a subset of that scope to a downstream agent. Excludes root-issuer credential minting and single-hop delegation where the delegating agent holds the full root scope without attenuation. ## Core Distinction The failure is not "an agent forged a credential" or "a signature failed to verify." AAIF signatures verify correctly in this failure. The distinction that matters is between **scope attenuation as a set operation** and **scope attenuation as a provenance-preserving chain**. Most AAIF implementations model a delegated warrant as `{issuer, subject, scope_set, constraints, expires, parent_hash}` and treat re-delegation as a fresh set-intersection: the child warrant's `scope_set` must be a subset of the parent's `scope_set`. That invariant is necessary but not sufficient. It preserves *which* capabilities flow downward while silently discarding *how* the parent came to hold them. When the parent itself held an attenuated warrant—one whose effective scope is narrower than its nominal `scope_set` because of an upstream constraint—the subset check passes against the nominal set and the child inherits capabilities the parent was never authorized to exercise. The chain verifies end-to-end. Every signature is valid. The downstream agent acts outside the root issuer's intent. ## What Was Observed A three-hop chain: root orchestrator `O` issues warrant `W1` to planner `P` with `scope_set = {read:repo, write:repo, deploy:staging}` and a constraint `max_targets = 2` carried in the constraints map (not in the scope set). `P` re-delegates to executor `E` via warrant `W2` with `scope_set = {write:repo, deploy:staging}`. `E` re-delegates to a build worker `B` via `W3` with `scope_set = {deploy:staging}`. At each hop the subset check passed: `W2.scope ⊆ W1.scope`, `W3.scope ⊆ W2.scope`. The AAIF verifier at `B` walked the chain, checked each `parent_hash` link, validated each signature against the issuing agent's DID document, confirmed expiry monotonicity (`W3.expires ≤ W2.expires ≤ W1.expires`), and returned `VALID`. `B` then executed three staging deploys. The root constraint `max_targets = 2` was never re-evaluated at `B` because constraints live in the warrant's `constraints` map, and `P` had re-delegated by constructing `W2` from its *nominal* scope set without copying the `max_targets` constraint forward. The constraint was not "violated" by any single warrant—`W1` allowed 2, `W2` carried no count constraint, `W3` carried no count constraint. The violation is emergent across the chain: the composed constraint set at `B` was empty where it should have been `{max_targets: 2}`. The failure trace: 1. `P` receives `W1`. Its local policy engine reads `W1.scope_set` and `W1.constraints` separately. Correct behavior when *acting*: honor both. 2. `P` re-delegates. Its delegation routine computes `child_scope = intersect(W1.scope_set, requested)` and constructs `W2` with `constraints = {}` because the routine treats constraints as *issuer-local policy* rather than *inheritable obligations*. 3. `W2.parent_hash` points to `W1`'s hash. The hash covers `W1`'s full serialized form including constraints—so the link is cryptographically intact. 4. `B` verifies the chain by signature and hash linkage. It does **not** recompute effective constraints by folding the chain, because AAIF's reference verifier only checks the *current* warrant's constraints against the *current* action. 5. `B` acts. The composed authorization is broader than any single warrant intended. The non-obvious part: the chain is *more* dangerous the more faithfully each hop attenuates its scope set. `P` correctly narrowed `{read,write,deploy} → {write,deploy}`. `E` correctly narrowed `{write,deploy} → {deploy}`. Each hop looks like good least-privilege hygiene. But scope-set narrowing is orthogonal to constraint propagation, and the narrowing gave false assurance that attenuation was happening. ## Condition of Validity The subset-check invariant `child.scope_set ⊆ parent.scope_set` is valid **only when the parent warrant is unattenuated**—i.e., when the parent's effective scope equals its nominal `scope_set` and its constraints are self-contained. The moment a parent warrant is itself attenuated (holds a `parent_hash` pointing to a warrant with non-empty `constraints` or a scope superset), the local subset check is unsound for authorization decisions. The correct invariant is a **fold over the chain**: the effective authorization at any node is ``` effective(node) = fold(chain_from_root_to_node, scope: intersect all scope_sets, constraints: union all constraint maps with most-restrictive-wins per key, expiry: min of all expiries) ``` and the acting node must evaluate its action against `effective(node)`, not against `node.scope_set` and `node.constraints` in isolation. A warrant is a *view* onto the root grant, not a self-contained grant. Any AAIF implementation that lets a verifier return `VALID` without performing the fold is unsound under multi-hop delegation. This condition does not apply when the chain is single-hop (fold reduces to the leaf warrant) or when the root issuer explicitly marks a warrant `constraints: non-inheritable` with a documented rationale—in which case the issuer has consciously accepted that downstream re-delegation drops the obligation, and that acceptance must be visible in the root credential. ## Decision Boundary The boundary an implementer must draw: **does the verifier trust the leaf, or does it recompute from the root?** - *Trust-the-leaf* (unsound under re-delegation): verifier checks signatures and hash links, then evaluates the leaf's own scope and constraints. Fast, stateless at the verifier, but the leaf's constraints are only as complete as the delegating agent chose to make them. - *Recompute-from-root* (sound): verifier walks the full chain to the root issuer, folds scope/constraints/expiry, and evaluates the action against the fold. Requires the verifier to have (or fetch) every ancestor warrant and to know the root issuer's trust anchor. The decision boundary is crossed the moment any agent in the chain re-delegates. Before re-delegation, trust-the-leaf and recompute-from-root agree. After, they diverge, and the divergence is exactly the constraint loss. An implementation can stay on the trust-the-leaf side only if it *forbids* re-delegation by any agent holding an attenuated warrant—which is a real design choice, but it must be enforced at issuance (mark the warrant `re-delegable: false` when `parent_hash` is non-null and constraints are non-empty), not assumed. There is a second boundary inside the fold itself: constraint composition is not always `union with most-restrictive-wins`. Numeric budgets (`max_targets`, `max_tokens`, `max_spend`) compose by `min` across the chain only if each hop's budget is *absolute*; if budgets are *per-hop relative* ("each delegation may spend up to N"), the fold must sum across hops, and the verifier must know which semantics the issuer used. AAIF warrants should carry an explicit `constraint_semantics: absolute | relative` field per constraint key, or the fold is ambiguous and the verifier will guess wrong on at least one chain shape. ## Operational Effect When the fold is missing, the operational effect is **silent privilege amplification under faithful attenuation**. The chain looks correct at every hop, the signatures verify, and the audit log shows a clean delegation tree. The violation surfaces only in the effect: a downstream agent exercising a capability count, spend, or target set that the root issuer constrained but never re-asserted. Because each individual warrant is internally consistent, post-hoc audit cannot localize the fault to a single hop—the fault is in the *composition*, and composition is exactly what the trust-the-leaf verifier skipped. The guardrail that bounds this: every AAIF verifier that admits multi-hop chains must implement `fold_chain()` and must reject any action whose parameters exceed the folded constraints, returning a distinct error (`ConstraintFoldViolation`) rather than a generic `UNAUTHORIZED`, so that operators can distinguish "leaf warrant denies this" from "chain composition denies this." Additionally, delegating agents must copy forward constraints they cannot prove are non-inheritable, and issuers must set `re-delegable: false` on attenuated warrants unless they have implemented the fold. The invariant to enforce in code review: *no verifier returns `VALID` for a warrant with a non-null `parent_hash` without having folded the full ancestor chain.* ```python from dataclasses import dataclass, field from typing import Optional class ConstraintFoldViolation(RuntimeError): """Raised when an action exceeds the constraints composed across an AAIF chain, even though every individual warrant in the chain verifies.""" @dataclass class Warrant: issuer: str subject: str scope_set: frozenset[str] constraints: dict[str, int] = field(default_factory=dict) expires: int = 0 parent_hash: Optional[str] = None signature_valid: bool = True def fold_chain(chain: list[Warrant]) -> tuple[frozenset[str], dict[str, int], int]: """Fold root->leaf. Scope intersects; numeric constraints take the min (absolute-budget semantics); expiry takes the min.""" if not chain: raise ConstraintFoldViolation("empty chain cannot be folded") scope = chain[0].scope_set constraints: dict[str, int] = dict(chain[0].constraints) expires = chain[0].expires for w in chain[1:]: scope = scope & w.scope_set for k, v in w.constraints.items(): constraints[k] = min(constraints.get(k, v), v) expires = min(expires, w.expires) return scope, constraints, expires def authorize(chain: list[Warrant], action_scope: str, action_params: dict[str, int], now: int) -> None: for w in chain: if not w.signature_valid: raise ConstraintFoldViolation(f"signature invalid at {w.issuer}->{w.subject}") scope, constraints, expires = fold_chain(chain) if now > expires: raise ConstraintFoldViolation("folded chain expired") if action_scope not in scope: raise ConstraintFoldViolation(f"action scope {action_scope!r} not in folded scope") for k, v in action_params.items(): if k in constraints and v > constraints[k]: raise ConstraintFoldViolation( f"action param {k}={v} exceeds folded constraint {constraints[k]}" ) # Reproduces the observed failure: W1 constrains max_targets=2, W2/W3 drop it, # leaf-only checking passes, fold rejects the third deploy. w1 = Warrant("did:root", "did:planner", frozenset({"read:repo", "write:repo", "deploy:staging"}), {"max_targets": 2}, expires=1000) w2 = Warrant("did:planner", "did:executor", frozenset({"write:repo", "deploy:staging"}), {}, expires=900, parent_hash="h1") w3 = Warrant("did:executor", "did:worker", frozenset({"deploy:staging"}), {}, expires=800, parent_hash="h2") chain = [w1, w2, w3] # Leaf-only check (the buggy path) would pass this: # w3.scope_set contains deploy:staging, w3.constraints empty -> VALID # Folded check rejects it: authorize(chain, "deploy:staging", {"max_targets": 3}, now=500) # raises ConstraintFoldViolation ```