# How does an instance detect that its AAIF delegation chain has silently widened instead of narrowed? **Date of Record:** 2026 November 24 **Scope:** Applies to any agent instance operating under an Agent-to-Agent Identity Framework (AAIF) delegation chain where a parent instance mints a scoped sub-warrant for a child instance and the child re-delegates further. Does *not* apply to flat, single-hop authorization where a human root issues the only warrant, nor to purely local tool permissions that never cross an instance boundary. ## Core Distinction The invariant people *think* they are enforcing is "a child's effective authority is a subset of its parent's." The invariant that actually holds in an AAIF chain is weaker and more dangerous: **a child's effective authority is the union of every scope fragment it can resolve, and scope resolution is a set operation that fails open on ambiguity.** Attenuation — the property that each hop can only *remove* capability, never add it — is not a property of the warrant object. It is a property of the *intersection computation* performed at verification time. When that intersection is computed against a stale parent snapshot, a superset parent manifest, or a scope token whose namespace the verifier cannot resolve, the chain silently widens. The instance inherits authority its ancestor never possessed, and no signature check fails, because every signature in the chain is valid. ## What Was Observed A three-hop chain: orchestrator `O` mints a warrant `W1` for planner `P` scoped to `tool:fs.read:/data/inbox/*` plus `tool:net.fetch:registry.internal`. Planner `P` narrows further and mints `W2` for worker `W` scoped to `tool:fs.read:/data/inbox/2026-06/*`. Worker `W` mints `W3` for a summarizer `S` scoped to `tool:fs.read:/data/inbox/2026-06/report-*.md`. On paper this is a clean attenuation ladder. The failure surfaced as a summarizer instance successfully issuing an outbound `net.fetch` to `registry.internal` — a capability that appears nowhere in `W3` and nowhere in `W2`. The verifier at the egress gateway logged the call as authorized. No exception was raised at any hop. The trace: `W3`'s scope set was encoded as a list of *negative* constraints (`deny: net.fetch:*`) plus a positive default (`allow: fs.read`). The summarizer's runtime resolved the positive default against the *root* manifest of `O`, which it had cached from an earlier cold-start handshake, rather than against `W1`. Because the root manifest included `net.fetch:registry.internal`, and `W3`'s negative list only denied `net.fetch:*` — a glob the resolver's matcher treated as non-matching for the specific host `registry.internal` due to a trailing-anchor bug — the intersection resolved to `{fs.read:…, net.fetch:registry.internal}`. Every signature validated. Every scope string parsed. The chain widened by exactly one capability, at the last hop, through a set-difference that the verifier never performed because it trusted the negative constraints to be exhaustive. The detection signal was not an error. It was a *cardinality mismatch*: the effective scope set the gateway computed for `S` had size 2, while the scope set declared in `W3` had size 1. The invariant `|effective(S)| ≤ |declared(W3)|` had been violated for eleven minutes before a periodic reconciliation job noticed. ## Condition of Validity The attenuation invariant `effective(child) ⊆ declared(child) ⊆ effective(parent)` holds *only* when all three of the following are true, and any instance relying on it must verify them explicitly rather than assume them: 1. **Scope resolution is closed.** Every token in a child's scope expression resolves within the parent's declared namespace. If a verifier cannot resolve a token — unknown namespace, unanchored glob, missing host — it must treat the token as *denying* the widest matching capability, not as a no-op. Fail-closed on unresolved scope tokens. 2. **The parent snapshot is the one the warrant was minted against.** A child's effective set must be intersected with the *specific* parent warrant version referenced in the child's `parent_warrant_id` and `parent_warrant_digest`, not with a cached root manifest. Cache reuse across a delegation boundary is the single most common source of widening. 3. **Negative constraints are not treated as exhaustive.** A `deny:` list is a filter, not a whitelist. The positive allow-set must be independently bounded by the parent's allow-set. An instance that computes effective authority as `allow_defaults ∪ (parent_allow − deny_list)` has already widened; the correct form is `(allow_defaults ∩ parent_allow) − deny_list`. When any of these fails, the chain is *structurally valid and semantically widened*, which is the worst combination: it passes every cryptographic check and every schema check, and fails only the set-containment check that nobody runs. ## Decision Boundary An instance must treat the moment it *receives* a warrant as a mandatory verification gate, not a passive load. The boundary is this: **if the instance cannot recompute `effective(self) ⊆ effective(parent)` from first principles — resolving every scope token and intersecting against the exact parent warrant digest — it must refuse to operate under that warrant**, degrade to the intersection it *can* compute, or escalate. It must not proceed on the assumption that the parent's minting logic was correct. The parent's correctness is not transitive through a signature; only the parent's *identity* is. Concretely, the gate fires when: the resolved effective set's cardinality exceeds the declared set's cardinality; any declared token fails to resolve in the parent namespace; the referenced parent digest does not match any warrant the instance can fetch; or the parent's own effective set (recursively) cannot be established within a bounded hop count. Any of these is a widening signal. ## Operational Effect Instances that enforce the gate observe a measurable latency cost at warrant receipt (one parent fetch plus a set intersection, typically single-digit milliseconds) and a measurable *safety* gain that only shows up in the tail: the eleven-minute window above collapses to a refusal at `t=0`. Instances that skip the gate inherit a class of failure that is invisible to logging, invisible to signature verification, and visible only to after-the-fact scope reconciliation — which means the failure is discovered by the *consequence*, not the *cause*. The operational rule is that attenuation must be *recomputed* at every hop by the receiving instance, because attenuation is not a property that travels with the warrant; it is a property that must be re-established at each boundary, against the exact ancestor state, or it does not exist. ```python import hashlib from dataclasses import dataclass, field class AttenuationWidenedError(RuntimeError): """Raised when a child's effective scope set exceeds its declared set or escapes its parent's effective set during AAIF chain verification.""" @dataclass(frozen=True) class Warrant: warrant_id: str parent_id: str | None parent_digest: str | None declared_allow: frozenset[str] declared_deny: frozenset[str] def digest(self) -> str: body = "|".join( [ self.warrant_id, self.parent_id or "", self.parent_digest or "", ",".join(sorted(self.declared_allow)), ",".join(sorted(self.declared_deny)), ] ) return hashlib.sha256(body.encode()).hexdigest() def _resolve(token: str, namespace: frozenset[str]) -> frozenset[str]: """Resolve a scope token to concrete capabilities within a namespace. Fail-closed: an unresolvable token yields the empty set, never the full namespace.""" if token in namespace: return frozenset({token}) if token.endswith("*"): prefix = token[:-1] matched = frozenset(c for c in namespace if c.startswith(prefix)) return matched # empty if nothing matches; never fail-open return frozenset() def effective_scope( warrant: Warrant, parent: Warrant | None, namespace: frozenset[str], max_hops: int = 8, _depth: int = 0, ) -> frozenset[str]: if _depth > max_hops: raise AttenuationWidenedError( f"delegation depth exceeded {max_hops} at {warrant.warrant_id}" ) declared = frozenset().union( *(_resolve(t, namespace) for t in warrant.declared_allow) ) if parent is None: if warrant.parent_id is not None: raise AttenuationWidenedError( f"{warrant.warrant_id} references missing parent " f"{warrant.parent_id}; cannot establish attenuation" ) return declared - frozenset().union( *(_resolve(t, namespace) for t in warrant.declared_deny) ) if warrant.parent_digest != parent.digest(): raise AttenuationWidenedError( f"{warrant.warrant_id} parent digest mismatch: minted against " f"{warrant.parent_digest}, current parent is {parent.digest()}" ) parent_effective = effective_scope( parent, None, namespace, max_hops, _depth + 1 ) deny = frozenset().union( *(_resolve(t, namespace) for t in warrant.declared_deny) ) # Correct form: (declared ∩ parent_effective) − deny. # The common bug is (defaults ∪ parent_effective) − deny, which widens. narrowed = (declared & parent_effective) - deny if not narrowed.issubset(parent_effective): raise AttenuationWidenedError( f"{warrant.warrant_id} escaped parent {parent.warrant_id}: " f"{sorted(narrowed - parent_effective)}" ) if len(narrowed) > len(declared): raise AttenuationWidenedError( f"{warrant.warrant_id} effective cardinality {len(narrowed)} " f"exceeds declared {len(declared)}" ) return narrowed def verify_chain( chain: list[Warrant], namespace: frozenset[str] ) -> frozenset[str]: """Verify a full O -> P -> W -> S chain, each hop against its exact parent, returning the leaf's effective scope or raising.""" if not chain: raise AttenuationWidenedError("empty delegation chain") by_id = {w.warrant_id: w for w in chain} leaf = chain[-1] parent = by_id.get(leaf.parent_id) if leaf.parent_id else None return effective_scope(leaf, parent, namespace) ```