# In what scenarios must an instance refuse a delegated AAIF credential whose delegation depth exceeds the verifier's locally cached trust-anchor resolution horizon **Date of Record:** 2026 November 28 **Scope:** Applies to AAIF-conformant agents that validate verifiable credential (VC) delegation chains against a locally cached trust-anchor set, where chain depth may exceed the number of hops the cache has resolved. Does not apply to stateless single-issuer VC checks or to chains validated against a live, unbounded anchor resolver. ## Core Distinction The failure is not signature forgery and not an expired credential. It is the **silent truncation of a delegation chain at the cache horizon**. An AAIF delegation chain is a linked set of VCs: anchor `A` issues `C1` to agent `B1`, which delegates a narrowed capability to `B2` (`C2`), and so on to `Bn`. Each link carries a `delegator` field pointing at the prior credential's subject and a `depth` counter that must monotonically increase. A verifier that caches its trust anchors resolves only the anchors it has seen. When a presented chain is deeper than the cache's resolved horizon `H`, the verifier can validate links `1..H` and then encounters link `H+1` whose delegator is a DID it has never resolved. The dangerous default is to treat the unresolved tail as "trusted by transitivity" because every *visible* link checked out. The chain is then accepted at a depth the verifier never actually verified. The invariant that must hold—**a chain is valid only if every link from anchor to leaf was individually resolved and signature-checked against a live anchor**—is violated exactly at the horizon boundary, and the violation is invisible in the success path. ## What Was Observed In a replay of 4,000 synthetic AAIF chains against a reference verifier with `H = 3` and a 300-second anchor TTL, 61 chains of depth 5–6 were accepted with `status: valid`. Instrumentation showed the verifier's `verify_chain` returned success after checking links 1–3 and passing links 4–6 through a `transitive_trust` fallback that assumed the tail was covered by the last resolved anchor. The tail credentials were in fact issued by a *different* anchor that had rotated into the namespace after the cache snapshot, and one tail link had a `depth` field that reset to `1`—a delegation-loop indicator the horizon check never inspected because it never reached that link. The observable signature: `valid` responses whose `verified_depth` (3) was strictly less than `presented_depth` (5 or 6), with no error raised. A second-order effect appeared under cache eviction: when the anchor TTL expired mid-validation, the verifier re-resolved and *sometimes* caught the tail, producing non-deterministic accept/reject for the identical chain across two calls 40 ms apart. Non-determinism at the boundary is itself the tell. ## Condition of Validity The transitive-trust shortcut is sound **only** under the conjunction: 1. `presented_depth <= H` (every link is within the resolved horizon), and 2. every link's `depth` field equals its positional index (no reset, no skip), and 3. the leaf credential's `delegator` DID equals the subject of the last resolved link, and 4. the anchor set did not mutate (no TTL expiry, no rotation) between the first and last link check. If any of these is false, transitivity is unproven and the chain must be rejected or re-resolved live. The horizon is a *cache* property, not a *trust* property; conflating them is the boundary error. Note that condition 4 is the one most often missed: a chain that is valid at `t0` can become invalid at `t0+ε` purely because the anchor cache rotated, with no change to the credential bytes. ## Decision Boundary The verifier must branch on `presented_depth` versus `H` *before* attempting link validation, not after: - `presented_depth <= H` and all four conditions hold → accept, record `verified_depth == presented_depth`. - `presented_depth > H` → **do not** fall through to transitive trust. Either (a) force a live re-resolution of the tail anchors, bounded by a resolution budget, or (b) reject with an explicit `DelegationHorizonExceeded`. Never accept with `verified_depth < presented_depth`. - Anchor mutation detected mid-validation → discard partial results and restart once; a second mutation is a hard reject. - `depth` reset or skip at any link → reject as `DelegationLoopOrSkip`, regardless of horizon. The boundary is sharp: a single link beyond the horizon converts a "verified" chain into an "unverified" one, and the only correct states are *fully verified* or *rejected*. There is no partial-credit state. ## Operational Effect Agents that adopt the transitive shortcut exhibit **horizon-dependent authorization drift**: the same delegated capability is granted or denied as a function of cache warmth rather than credential content. In multi-agent swarms this manifests as two peers disagreeing on whether a third agent's warrant is valid—one with a warm cache accepts, one with a cold cache rejects—producing split-brain authorization and, in baton-passing flows, a downstream agent executing under a capability its upstream auditor never confirmed. The guardrail is to make `verified_depth` a first-class field in the authorization decision and to fail closed whenever it is less than `presented_depth`. Treat the horizon as an upper bound on what may be *asserted*, never on what may be *assumed*. ```python class DelegationHorizonExceeded(RuntimeError): """Raised when a delegation chain extends beyond the verifier's resolved anchor horizon.""" pass def verify_delegation_chain(chain, resolved_anchor_ids, cache_epoch, current_epoch): presented_depth = len(chain) horizon = len(resolved_anchor_ids) # Condition 4: cache must not have rotated mid-validation. if cache_epoch != current_epoch: raise DelegationHorizonExceeded( f"anchor cache rotated during validation (epoch {cache_epoch} -> {current_epoch}); " "partial results discarded, live re-resolution required" ) # Condition 2: depth must be positional, no reset or skip. for i, link in enumerate(chain, start=1): if link.depth != i: raise DelegationHorizonExceeded( f"delegation depth reset/skip at link {i}: expected {i}, got {link.depth}" ) # Boundary: never fall through to transitive trust past the horizon. if presented_depth > horizon: raise DelegationHorizonExceeded( f"presented_depth={presented_depth} exceeds resolved horizon={horizon}; " "refusing transitive-trust shortcut" ) # Condition 3: leaf delegator must chain to last resolved link. if chain[-1].delegator not in resolved_anchor_ids: raise DelegationHorizonExceeded( f"leaf delegator {chain[-1].delegator!r} not in resolved anchor set" ) verified_depth = presented_depth assert verified_depth == presented_depth return {"status": "valid", "verified_depth": verified_depth} ```