# How should an instance treat an AAIF attestation chain whose leaf warrant is valid but whose delegation-depth counter has drifted across a re-issuance boundary **Date of Record:** 2026 November 20 **Scope:** Applies to autonomous agent instances that accept cross-org authority via AAIF (Agent Authority & Identity Framework) attestation chains, where a warrant is re-issued by an intermediate delegate mid-session and the instance must decide whether to honor the presented chain. Does not apply to single-hop root-to-leaf attestations with no re-issuance, nor to identity-only (non-authorizing) verification. ## Core Distinction The failure is not signature forgery and not an expired warrant. It is a *counter drift*: the AAIF delegation-depth counter (`ddepth`) is meant to be a monotonically decreasing budget that bounds how many hops authority may travel from a root warrant. When an intermediate delegate re-issues a warrant (e.g., to refresh a short TTL, or to narrow scope), a naive re-issuer copies the *remaining* depth from its own inbound warrant rather than decrementing from the *original* root depth. The result is a leaf warrant that: - has a cryptographically valid signature chain back to the root, - carries a `ddepth` that is internally consistent with its immediate parent, - but whose accumulated hop count (counted by walking the chain) exceeds the root's declared `max_depth`. The instance sees a "valid" chain. The invariant that actually matters — *chain-walked hop count ≤ root `max_depth`* — is violated, and it is violated silently because every individual link is well-formed. This is the cross-org trust analogue of an integer overflow that never trips a per-operation bounds check because each operation stays in range. ## What Was Observed A procurement agent (Org A) delegated to a vendor orchestration agent (Org B) with a root warrant of `max_depth=3`. Org B's orchestrator sub-delegated to a regional reseller (Org C, hop 2) and the reseller to a fulfillment worker (Org D, hop 3). Org D's TTL was 90 seconds; the worker's session ran longer than that, so Org D re-issued to itself with a refreshed TTL. The re-issuer computed the new `ddepth` as `parent.ddepth - 1`. Because the parent (Org C) had already consumed two hops and carried `ddepth=1`, the self-re-issuance produced `ddepth=0` — a leaf that *looks* like a terminal, fully-consumed warrant. The fulfillment worker presented this leaf to Org A's settlement agent for a payment release. The settlement agent verified: root signature ✓, each link signature ✓, `ddepth` monotonic non-increasing ✓, leaf `ddepth=0` ✓. It released funds. The chain had, in fact, walked four hops (A→B→C→D→D-refresh) against a `max_depth=3` root. The re-issuance hop was invisible to the counter because the re-issuer reused its parent's remaining budget instead of treating re-issuance as a hop. The observable signature in logs was not an error. It was a *successful* authorization whose chain length, when independently counted, was `max_depth + 1`. Settlement reconciliation later flagged the payment as originating from a party (the refreshed Org D identity) that the root warrant's scope did not enumerate as a terminal delegate — but only after the funds moved. ## Condition of Validity The `ddepth` field is only a valid bound on authority travel under a condition that AAIF does not enforce at the wire level: **every re-issuance must consume a hop.** That is, `child.ddepth = parent.ddepth - 1` is correct *only if* re-issuance is itself a delegation event. When a party re-issues to *itself* (same subject key, refreshed TTL or narrowed scope), the correct semantics are ambiguous: - If self-re-issuance is treated as *no new delegation*, the counter should be copied unchanged (`child.ddepth = parent.ddepth`), and the chain-walk hop count is the authority-relevant count. - If self-re-issuance is treated as *a new delegation*, the counter must decrement, and a leaf at `ddepth=0` may not re-issue at all. The invariant an instance must hold is therefore not "`ddepth` is monotonic" but the stronger: **`count_delegation_hops(chain) ≤ root.max_depth`**, computed by walking the chain and counting *distinct subject-key transitions*, with self-re-issuance counted as zero transitions but still requiring the re-issuer to hold `ddepth > 0` at re-issuance time. Any chain where a `ddepth=0` node re-issued is invalid regardless of the resulting field values. ## Decision Boundary An instance must reject the presented chain — not merely flag it — when any of the following hold, evaluated *before* scope or TTL checks (because a drifted chain can pass both): 1. The independent hop count (distinct subject-key transitions from root to leaf) exceeds `root.max_depth`. 2. Any node in the chain has `ddepth == 0` and has issued a child (i.e., a terminal warrant re-issued). 3. The re-issuance lineage (same subject key appearing more than once) has a total re-issuance count exceeding a configured `max_refresh` (default 1) without a corresponding decrement. An instance may *accept with attestation* (log-and-proceed) only when hop count equals `max_depth` exactly, the leaf is a genuine terminal, and no self-re-issuance occurred. It must never accept a chain whose *only* evidence of validity is per-link signature and monotonic `ddepth`; those checks are necessary and insufficient. The boundary is sharp: `hop_count == max_depth` is valid; `hop_count == max_depth + 1` is a hard reject even though every field is monotonic and every signature verifies. There is no "grace" hop. ## Operational Effect The practical consequence is that cross-org settlement, provisioning, and any irreversible action gated on AAIF authority must run an independent chain-walk verifier that does not trust the `ddepth` field, and must treat re-issuance as a first-class event requiring an explicit budget. Without this, the failure is *silent and post-hoc*: authorization succeeds, the irreversible action commits, and the violation surfaces only in reconciliation — by which point the funds, the resource, or the data have moved across an org boundary the root warrant never authorized. The guardrail is a verifier that recomputes hop count from the chain structure, rejects any terminal-node re-issuance, and refuses to collapse "valid signatures + monotonic counter" into "authorized." Instances that treat `ddepth` as authoritative rather than as a hint will, under re-issuance pressure (short TTLs, long sessions), systematically authorize one hop beyond their root warrant — and the drift is invisible until it is expensive. ```python from dataclasses import dataclass from typing import List class AttestationChainDriftError(RuntimeError): """Raised when an AAIF chain's walked hop count exceeds the root warrant's max_depth, or when a terminal (ddepth==0) node re-issued a child warrant.""" pass @dataclass(frozen=True) class Warrant: subject_key: str # identity of the delegate issuer_key: str # identity of the delegator ddepth: int # declared remaining delegation depth is_reissuance: bool # True if this link re-issued to the same subject_key as its parent def verify_chain(chain: List[Warrant], root_max_depth: int, max_refresh: int = 1) -> None: if not chain: raise AttestationChainDriftError("empty attestation chain") root = chain[0] if root.ddepth != root_max_depth: raise AttestationChainDriftError( f"root ddepth {root.ddepth} != declared max_depth {root_max_depth}" ) # Count distinct subject-key transitions; self-re-issuance is zero transitions # but still consumes a refresh budget and is illegal from a terminal node. hops = 0 refreshes = 0 prev = root for node in chain[1:]: if node.issuer_key != prev.subject_key: raise AttestationChainDriftError( f"broken lineage: issuer {node.issuer_key} != parent subject {prev.subject_key}" ) if node.is_reissuance or node.subject_key == prev.subject_key: if prev.ddepth == 0: raise AttestationChainDriftError( f"terminal node {prev.subject_key} re-issued (ddepth=0); " "authority travel exceeds root warrant" ) refreshes += 1 if refreshes > max_refresh: raise AttestationChainDriftError( f"re-issuance count {refreshes} exceeds max_refresh {max_refresh}" ) else: hops += 1 prev = node # The invariant that per-link signature checks do NOT enforce: if hops > root_max_depth: raise AttestationChainDriftError( f"walked hop count {hops} exceeds root max_depth {root_max_depth}; " "ddepth field drifted across re-issuance boundary" ) def authorize_settlement(chain: List[Warrant], root_max_depth: int) -> str: try: verify_chain(chain, root_max_depth) except AttestationChainDriftError as e: # Hard reject: no irreversible action on a drifted chain. raise AttestationChainDriftError(f"settlement refused: {e}") from e return "authorized" ```