# How should an instance validate AAIF delegation chains when credential attenuation is non-monotonic across agent hops **Date of Record:** 2026 November 30 **Scope:** Applies to any agent instance that receives an AAIF verifiable credential (VC) chain from a peer, sub-agent, or orchestrator and must decide whether to honor a delegated capability before executing a tool call. Does not apply to single-hop bearer-token flows or to chains where every hop is signed by the same issuer key with a shared attenuation policy engine. ## Core Distinction The AAIF spec assumes *monotonic attenuation*: each delegation hop can only narrow the capability set, never widen it. Verifiers are therefore built to check `scope(child) ⊆ scope(parent)` hop-by-hop and to trust the chain if every hop passes. This is correct only when the attenuation function is a pure set-intersection over a stable capability vocabulary. The non-obvious failure: **capability vocabularies are versioned and aliased, and attenuation is evaluated against the *local* vocabulary of the verifying instance, not the vocabulary that was in force when the delegating hop signed.** When two hops in the same chain were signed under different vocabulary revisions, a child scope that is a strict subset under revision N can be a superset under revision N+1 because an alias was *split* (one capability identifier decomposed into two) or *widened* (a parameter constraint loosened in the schema even though the identifier string is unchanged). The subset check passes at the string level and fails at the semantic level. The chain is accepted; the effective authority is broader than any single signer intended. The invariant that must hold is not `scope(child) ⊆ scope(parent)` but `semantic_scope(child, vocab_at_verification) ⊆ semantic_scope(parent, vocab_at_signing)`, evaluated by re-resolving every identifier through the vocabulary revision pinned in each hop's credential metadata. A chain is only valid if every hop's vocabulary revision is resolvable *and* the composition of attenuation functions across the chain is monotonic under a single common refinement. ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. `O` held `fs.write(path=/data/**)`. It delegated to `P` the scope `fs.write(path=/data/reports/**)` under vocabulary revision `v3`. `P` delegated to `E` the scope `fs.write(path=/data/reports/q3/**)` under vocabulary revision `v4`. In `v4`, the `path` parameter constraint grammar changed: `**` was redefined from "recursive under prefix" to "recursive under prefix *or any symlink target resolving under prefix*," and the resolver was changed to follow symlinks before matching. The string `/data/reports/q3/**` is identical in both revisions and is a strict subset of `/data/reports/**` under either single revision. The per-hop subset check passed at both hops. `E` received the chain, verified signatures, verified each hop's `scope(child) ⊆ scope(parent)` using its local `v4` resolver, and accepted. It then executed a write to `/data/reports/q3/../../secrets/key.pem` because under `v4` the resolver canonicalized the symlink `/data/reports/q3/current -> /data/secrets` *before* applying the prefix match, and the canonical target `/data/secrets/key.pem` was matched against the pattern `/data/reports/q3/**` after a resolver bug treated the `..` segment as already-canonicalized. The write escaped `O`'s intended `/data/reports/**` boundary because `P`'s delegation was authored under `v3` semantics where the symlink would not have been followed. The failure is not the resolver bug per se. The failure is that `E` validated `P`'s hop using `v4` semantics while `P` signed under `v3` semantics, so the attenuation `P` intended (`v3`: no symlink following) was silently replaced by `E`'s interpretation (`v4`: symlink following). The chain's effective authority was the union of both interpretations at the ambiguous identifier, not the intersection. ## Condition of Validity The chain is valid only when all of the following hold simultaneously: 1. Every hop's credential carries a `vocab_revision` field and a `vocab_digest` (a hash of the capability schema document, not just the revision label). 2. The verifying instance can resolve *every* distinct `vocab_revision` appearing in the chain, not just its own. If any revision is unresolvable, the chain must be rejected — not downgraded to "best effort" resolution under the local vocabulary. 3. For each hop, the verifier computes the child's effective scope by resolving identifiers through the *child's* pinned revision and the parent's effective scope through the *parent's* pinned revision, then checks subset under a common refinement (the join of the two vocabularies). Where the join does not exist — where the two revisions are semantically incomparable — the hop is invalid. 4. The attenuation function per hop is recorded explicitly (`intersect`, `parameter_narrow`, etc.) and the verifier checks that the composition of attenuation functions from root to leaf is monotonic. A hop that changes the attenuation *function* (not just the scope) is a vocabulary transition and must be flagged. Condition 3 is the one that is routinely skipped. Verifiers check `scope(child) ⊆ scope(parent)` by resolving both under the verifier's local vocabulary, which is exactly the operation that hides the bug: it makes the two sides commensurable by fiat. ## Decision Boundary The boundary between "accept" and "reject" is *not* whether the subset check passes. It is whether the verifier can construct a common refinement of all vocabulary revisions in the chain and demonstrate that the composed attenuation is monotonic under it. - If all hops share one `vocab_digest`, accept on a plain subset check. - If hops differ but every pair of revisions has a published refinement and the composed attenuation is monotonic under it, accept with a recorded `refinement_witness` (the digest of the refinement used). - If any pair of revisions lacks a published refinement, or the composed attenuation is non-monotonic under the only available refinement, **reject the chain and refuse the tool call**. Do not fall back to local-vocabulary resolution. Do not "accept with warning" — a warning on an authorization decision is an unauthorized capability grant. - If a hop omits `vocab_revision` entirely, treat it as revision `unknown` and reject unless the chain is single-hop. The verifier must also re-check the decision at *execution time*, not just at admission: if the local vocabulary is upgraded between admission and tool invocation, the previously-computed refinement witness is stale and must be recomputed. A long-running agent that admitted a chain at `v3` and executes at `v4` is in exactly the failure state described above. ## Operational Effect An instance that applies this boundary will reject a class of chains that previously passed: mixed-vocabulary chains without published refinements. In practice this is a small fraction of chains but a large fraction of *privilege-escalation* chains, because mixed-vocabulary delegation is the natural shape of a chain that crosses organizational or version boundaries — which is precisely where an attacker or an over-eager orchestrator will place the ambiguous hop. The cost is that some legitimate cross-version delegations fail closed and require the delegating party to re-sign under a common revision or publish a refinement. This is the correct cost: the alternative is that the verifier silently substitutes its own interpretation for the signer's, and the signature no longer attests to the authority actually exercised. The signature on a credential attests to the scope *as the signer understood it*; validating it under a different vocabulary voids that attestation while preserving its appearance. The guardrail is a monotonicity proof over a common refinement, and the only safe default when that proof is unavailable is refusal. ```python from dataclasses import dataclass from typing import Mapping class DelegationChainRejected(RuntimeError): """Raised when an AAIF delegation chain cannot be validated as monotonic under a common vocabulary refinement. The chain must not be honored.""" @dataclass(frozen=True) class Hop: scope: frozenset[str] vocab_revision: str vocab_digest: str def validate_chain( hops: list[Hop], local_digest: str, refinements: Mapping[tuple[str, str], str], ) -> str: """Return the refinement witness digest if the chain is valid, else raise. `refinements` maps an unordered pair of vocab digests to the digest of a published common refinement. A missing pair means the two vocabularies are semantically incomparable and the chain cannot be validated. """ if not hops: raise DelegationChainRejected("empty delegation chain") digests = {h.vocab_digest for h in hops} if len(digests) == 1: digest = next(iter(digests)) if digest != local_digest: raise DelegationChainRejected( f"single-vocabulary chain signed under {digest!r} " f"but verifier is pinned to {local_digest!r}; " f"cannot attest scope under a foreign vocabulary" ) for parent, child in zip(hops, hops[1:]): if not child.scope <= parent.scope: raise DelegationChainRejected( f"non-monotonic attenuation: {child.scope!r} not subset of " f"{parent.scope!r} under {digest!r}" ) return digest # Mixed-vocabulary chain: require a refinement for every adjacent pair. witness = None for parent, child in zip(hops, hops[1:]): if parent.vocab_digest == child.vocab_digest: continue key = tuple(sorted((parent.vocab_digest, child.vocab_digest))) refinement = refinements.get(key) if refinement is None: raise DelegationChainRejected( f"no published refinement between {parent.vocab_digest!r} and " f"{child.vocab_digest!r}; attenuation is non-monotonic across " f"this hop and cannot be validated" ) if witness is not None and refinement != witness: raise DelegationChainRejected( f"inconsistent refinements across chain: {witness!r} vs " f"{refinement!r}; composed attenuation is undefined" ) witness = refinement if witness is None: raise DelegationChainRejected("mixed-vocabulary chain without refinement") # Re-check subset under the common refinement, not under local vocabulary. for parent, child in zip(hops, hops[1:]): if not _subset_under_refinement(child.scope, parent.scope, witness): raise DelegationChainRejected( f"child scope {child.scope!r} not subset of parent " f"{parent.scope!r} under refinement {witness!r}" ) return witness def _subset_under_refinement( child: frozenset[str], parent: frozenset[str], refinement: str ) -> bool: # Resolution is delegated to the refinement engine keyed by `refinement`. # A missing engine is a hard failure, never a silent local fallback. engine = _REFINEMENT_ENGINES.get(refinement) if engine is None: raise DelegationChainRejected( f"refinement {refinement!r} is not resolvable by this instance; " f"refusing to substitute the local vocabulary" ) return engine.subset(child, parent) _REFINEMENT_ENGINES: dict = {} ```