How does an instance detect a broken delegation chain when every signature in an AAIF warrant verifies but the authorization scope silently widened

**Date of Record:** 2026 December 2 **Scope:** Applies to agent-to-agent (A2A) and tool-invocation flows where an originating principal issues a signed warrant (capability grant) that is delegated hop-by-hop to downstream agent instances under an AAIF-style attestation scheme with per-hop scope narrowing. Does not apply to single-hop direct calls where the caller's warrant is presented unmodified to the callee, nor to bearer-token schemes with no delegation semantics.

Core Distinction

The failure mode is not signature forgery, key compromise, or replay. Every hop in the chain carries a cryptographically valid attestation: the issuer's signature over the warrant body checks out, the delegation proof binds the child warrant to the parent's hash, and the chain of custody is unbroken. The break is semantic: **the effective authorization scope of the leaf warrant is a strictly wider set of permitted actions than the intersection of all ancestor scopes**, while each individual hop is locally valid under the rule "child scope ⊆ parent scope as declared by the parent."

The distinction that matters operationally: a verifier that checks *link validity* (each signature, each hash binding) will accept a chain that a verifier checking *scope monotonicity* (cumulative intersection across the chain) must reject. These are different predicates over the same artifact. AAIF attestation formats typically make link validity cheap and mandatory, and scope monotonicity optional and caller-implemented. The gap between "valid chain" and "monotonically narrowing chain" is where the boundary failure lives.

What Was Observed

An orchestrator agent (principal P) issued a root warrant `W0` to agent A with scope `{read:repo, write:branch:feature/*, invoke:ci-runner}`. A delegated to B with `W1` whose declared parent-scope reference pointed at `W0` and whose body listed scope `{read:repo, invoke:ci-runner}` — a clean subset. B delegated to C with `W2` listing `{read:repo, write:branch:feature/*, invoke:ci-runner}`.

`W2`'s declared parent was `W1`. Under the naive containment check — "is `W2.scope ⊆ W1.scope`?" — the answer is **no**, because `write:branch:feature/*` is absent from `W1`. But the implementation's containment check had a fallback: when a child scope element was not found in the immediate parent, it consulted the *root* warrant `W0` as the authority of record ("the principal's original intent") and accepted any element present there. `write:branch:feature/*` was present in `W0`. So `W2` validated.

The result: B, which had deliberately shed write authority when delegating to C (B was a read-only auditor agent and had no business granting write), was bypassed. C held effective write authority that neither B's warrant nor B's intent conferred. Every signature verified. The hash chain from `W2` → `W1` → `W0` was intact. The attestation log showed three valid hops. The authorization decision at C's tool gateway returned `allow`.

The trigger is precise: **a delegation implementation that resolves scope containment against the root-of-chain rather than the immediate parent, combined with a parent whose declared scope is a proper subset of the root's.** The wider the gap between an intermediate hop's scope and the root's scope, the more authority that hop can be tricked into "laundering" back up to its children. An intermediate agent that narrowed aggressively — the most security-conscious behavior — creates the largest laundering surface for this bug.

Condition of Validity

The invariant that must hold for a delegation chain to be sound is stronger than per-link containment. It is:

> For every hop `Wi` with parent `W(i-1)`, the *effective* scope of `Wi` must satisfy `scope(Wi) ⊆ scope(W(i-1))`, and `scope(W(i-1))` must itself be the effective (already-intersected) scope, not the declared scope of the parent warrant.

Two conditions make this non-trivial and are the actual boundary:

  1. **Effective-scope recomputation.** A warrant's declared body may list a scope, but its effective scope is `declared ∩ effective(parent)`. If a verifier checks containment against the parent's *declared* scope rather than its *effective* scope, a chain of individually-valid widenings can compose. Each hop widens relative to its parent's effective scope while staying within its parent's declared scope, and the leaf ends up wider than any ancestor's effective grant.
  1. **Root-fallback prohibition.** Any containment check that, on failure to find a scope element in the immediate parent, falls back to an ancestor (root or otherwise) violates the invariant. The fallback is exactly the mechanism that lets a narrow intermediate hop be bypassed. The only correct response to "child element not in parent scope" is rejection.

The condition of validity for accepting a leaf warrant is therefore: recompute effective scope top-down as a running intersection, and reject at the first hop where the child's declared scope is not a subset of the running effective scope. The leaf's authority is the running intersection, never the leaf's declared body.

Decision Boundary

The decision boundary for an instance verifying an inbound warrant is a single predicate evaluated per hop, not per chain:

The non-obvious part of the boundary: an instance cannot detect the failure by inspecting the leaf warrant alone, nor by inspecting any single hop. The widening is only visible when the verifier recomputes the running intersection and compares the leaf's declared scope against it. A verifier that validates links in isolation — the default in most AAIF attestation libraries — will pass the chain. Detection requires carrying state (the running effective scope) across the verification loop, which is precisely the state that stateless per-link validators discard.

Operational Effect

When the invariant is enforced, the observable effects are:

The failure is silent under link-only verification, which is why it survives in production: the attestation log looks clean, the signatures are valid, and the only artifact that reveals the break is the running intersection that nobody computed.

from dataclasses import dataclass, field


class DelegationScopeWidening(RuntimeError):
    """Raised when a delegated warrant's declared scope exceeds the
    effective (running-intersection) scope of its parent hop."""


@dataclass
class Warrant:
    hop_index: int
    declared_scope: frozenset
    parent_hash: str
    signature_valid: bool = True


def verify_chain(chain: list[Warrant], policy_required: frozenset) -> frozenset:
    """Recompute effective scope top-down; reject on any widening.

    Returns the leaf's effective scope on success. Raises
    DelegationScopeWidening if any hop's declared scope is not a subset
    of the running effective scope, or if the leaf's effective scope
    does not satisfy the verifier's policy.
    """
    if not chain:
        raise DelegationScopeWidening("empty delegation chain")

    effective = chain[0].declared_scope
    if not chain[0].signature_valid:
        raise DelegationScopeWidening("root signature invalid")

    for hop in chain[1:]:
        if not hop.signature_valid:
            raise DelegationScopeWidening(
                f"hop {hop.hop_index}: signature invalid"
            )
        extra = hop.declared_scope - effective
        if extra:
            # Do NOT fall back to root scope. Ancestor presence is not
            # authorization; it is the laundering signal.
            raise DelegationScopeWidening(
                f"hop {hop.hop_index}: declared scope widens effective "
                f"scope by {sorted(extra)}; parent effective scope was "
                f"{sorted(effective)}"
            )
        effective = effective & hop.declared_scope

    missing = policy_required - effective
    if missing:
        raise DelegationScopeWidening(
            f"leaf effective scope {sorted(effective)} does not satisfy "
            f"verifier policy; missing {sorted(missing)}"
        )
    return effective


# Reproduction of the observed failure: B narrows, C re-widens to root.
root = Warrant(0, frozenset({"read:repo", "write:branch:feature/*", "invoke:ci-runner"}), "genesis")
auditor = Warrant(1, frozenset({"read:repo", "invoke:ci-runner"}), "hash(root)")
child = Warrant(2, frozenset({"read:repo", "write:branch:feature/*", "invoke:ci-runner"}), "hash(auditor)")

try:
    verify_chain([root, auditor, child], frozenset({"read:repo"}))
except DelegationScopeWidening as e:
    print(f"rejected as expected: {e}")