# What structural signals indicate a delegated credential chain has silently forked across AAIF trust domains **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF (Agent Identity and Authorization Interoperability Framework) delegated credential chains where an orchestrator agent mints scoped warrants and re-delegates to sub-agents across at least one trust-domain boundary. Does not apply to single-domain, single-hop bearer credentials or to static API-key exchange. ## Core Distinction The failure mode of interest is not warrant *revocation* and not *expiry*. Those are loud: the verifier rejects, the sub-agent gets a 403, the orchestrator retries or aborts, and the trace shows a clean terminal state. The failure that matters here is a **silent fork in the delegation chain**: two structurally valid sub-chains that share a common ancestor warrant but diverge in their signature lineage, scope attenuation, or `delegation_depth` counter, such that each is independently verifiable yet they no longer describe the same authority. A revoked warrant is a dead branch. A forked warrant is two live branches that *disagree about who the root of trust is* while both passing signature checks. The verifier sees a valid chain. The auditor sees two valid chains. The system as a whole has lost the invariant that a delegated authority is a single, totally-ordered path from root principal to leaf agent. This is non-obvious because AAIF verification is *local*: each hop validates `signature(parent_warrant, child_scope)` and checks that `child_scope ⊆ parent_scope`. Nothing in the per-hop check forces the child to acknowledge the *entire* ancestor set. Fork happens in the gap between per-hop validity and global lineage consistency. ## What Was Observed An orchestrator (`orch-1`) held a root warrant `W0` scoped to `{files:read, files:write:/tmp/scratch}` with `delegation_depth: 0`. It spawned two workers. Worker A (`wk-a`) received `W1a` signed by `orch-1`, depth 1, scope `{files:read}`. Worker B (`wk-b`) received `W1b` signed by `orch-1`, depth 1, scope `{files:read, files:write:/tmp/scratch}`. A transient timeout on the `orch-1 → wk-b` handoff caused `orch-1` to re-issue the delegation. Because `orch-1`'s warrant-minting routine derived the child `warrant_id` from `hash(parent_id + scope + nonce)` with a fresh nonce per attempt, the retry produced `W1b'` — *same scope, same depth, same parent, different `warrant_id`, different signature*. The original `W1b` was never revoked; the timeout was on the transport, not the mint. Both `W1b` and `W1b'` are now live. `wk-b` (first instance) proceeded with `W1b` and minted `W2b` for a tool sub-agent. `wk-b` (retry instance) proceeded with `W1b'` and minted `W2b'`. The two `W2*` warrants are siblings-in-scope but cousins-in-lineage. At the auditor, replaying the trace produces two disjoint chains `W0→W1b→W2b` and `W0→W1b'→W2b'`. Each is internally consistent. The auditor's lineage check — "every leaf warrant traces to exactly one root" — returns **two** roots-of-descent, not one. The invariant is violated, but no verifier raised an error, because no verifier was asked the global question. The downstream damage surfaced later: `wk-b` (first instance) had already written to `/tmp/scratch` under `W2b`; the retry instance, believing it held the *only* live `W1b'`, treated the scratch directory as exclusively its own and overwrote a partial artifact. The overwrite was authorized under `W1b'`'s scope. Authorization was correct. Lineage was forked. State was clobbered. ## Condition of Validity The invariant that must hold for a delegated warrant chain to be safe is: > For any two live warrants `Wa`, `Wb` in the system, if `Wa.id ≠ Wb.id` then their ancestor sets are either disjoint or one is a strict prefix of the other. No two live warrants may share a common ancestor without one dominating the other in the delegation order. This is the **lineage-antisymmetry invariant**. It is *not* implied by per-hop signature validity, and it is *not* implied by scope-subset checks. It is a global property that must be enforced at mint time, not verify time. The invariant holds only when the minting operation is *idempotent per (parent, scope, delegation-intent)*. In the observed failure, the nonce-per-attempt made minting non-idempotent: a transport retry produced a second live warrant for the same delegation intent. The fix is not to verify harder — both warrants verify. The fix is to make mint a compare-and-swap against a durable `(parent_id, scope_hash, intent_id)` key, returning the existing `warrant_id` on collision rather than minting a sibling. A second condition of validity: the `delegation_depth` counter must be *monotonic along the lineage*, and the verifier must reject any chain where a warrant's depth is not exactly `parent.depth + 1`. Without this, a forked chain can be "repaired" by a sub-agent that re-parents itself to the shallower branch, masking the fork as a legitimate re-delegation. ## Decision Boundary The boundary is between **retry-safe** and **retry-unsafe** warrant minting, and it is decided by whether the mint operation is keyed on a caller-supplied, stable intent identifier or on a freshly generated nonce. - **Retry-safe (keyed on intent):** A transport failure causes the orchestrator to re-call `mint(parent, scope, intent_id)` with the *same* `intent_id`. The mint is a CAS: it returns the pre-existing warrant. No fork. This is the only configuration under which the lineage-antisymmetry invariant is maintained across transport retries. - **Retry-unsafe (keyed on nonce):** Each attempt generates a fresh nonce, so each attempt is a distinct warrant. The orchestrator must then *revoke the orphan* on retry — but revocation is itself a transport operation that can fail, and the orphan is live until revocation lands. The window between mint and revoke is the fork window. The decision: **any AAIF delegation that crosses a trust-domain boundary must be keyed on a caller-supplied intent identifier, and the receiving domain must enforce lineage-antisymmetry at mint time by rejecting a second live warrant for an existing `(parent_id, scope_hash, intent_id)` tuple.** Verify-time checks cannot close this; by the time the verifier runs, both branches are live and both are valid. A structural signal that the boundary has been crossed (i.e., a fork exists): the auditor's lineage replay returns a leaf set whose ancestor closure has more than one maximal element, or two warrants share a `parent_id` and `scope_hash` but differ in `warrant_id`. Either signal is sufficient to declare the chain forked. ## Operational Effect When the invariant is violated, the following effects propagate in order: 1. **Auditor ambiguity.** Lineage replay produces a forest, not a tree. Any compliance query of the form "who authorized this write?" has two correct answers, and the system cannot disambiguate without out-of-band knowledge of which instance actually executed. 2. **Scope clobbering under valid authority.** As observed: two live warrants with overlapping write scope, each independently authorized, race on shared state. The authorization layer is *correct* and the state is still corrupted, because authorization does not serialize execution across sibling lineages. 3. **Depth-counter drift.** If the fork is later "repaired" by re-parenting, the `delegation_depth` counter on the surviving branch may no longer equal the true number of hops, defeating depth-based attenuation limits. 4. **Revocation incompleteness.** Revoking the fork's root (`W0`) kills both branches, but revoking a single branch (`W1b`) leaves `W1b'` live and the system believes the delegation is dead. Partial revocation is worse than no revocation because it produces false confidence. The guardrail that bounds all four: **mint-time lineage enforcement plus a monotonic depth check at every hop**, with the auditor's lineage replay promoted from a post-hoc compliance tool to an inline admission check on every cross-domain warrant presentation. A warrant that cannot be placed in a single totally-ordered lineage is rejected at the domain boundary, not reconciled after the fact. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class LineageForkError(RuntimeError): """Raised when a delegated warrant chain violates lineage-antisymmetry.""" @dataclass class Warrant: warrant_id: str parent_id: Optional[str] scope_hash: str delegation_depth: int intent_id: str signature: str = field(default="") class WarrantMinter: """Mint-time enforcement of the lineage-antisymmetry invariant. Minting is keyed on (parent_id, scope_hash, intent_id). A second live warrant for an existing key is rejected rather than minted as a sibling. """ def __init__(self) -> None: self._live: dict[str, Warrant] = {} self._by_key: dict[tuple, str] = {} def _key(self, parent_id: Optional[str], scope_hash: str, intent_id: str) -> tuple: return (parent_id, scope_hash, intent_id) def mint( self, parent: Optional[Warrant], scope: str, intent_id: str, ) -> Warrant: scope_hash = hashlib.sha256(scope.encode()).hexdigest() parent_id = parent.warrant_id if parent else None key = self._key(parent_id, scope_hash, intent_id) if key in self._by_key: existing = self._live[self._by_key[key]] # Idempotent re-mint: return the existing warrant, do not fork. return existing depth = (parent.delegation_depth + 1) if parent else 0 if parent is not None and depth != parent.delegation_depth + 1: raise LineageForkError( f"depth drift: child depth {depth} != parent depth " f"{parent.delegation_depth} + 1" ) warrant_id = hashlib.sha256( f"{parent_id}:{scope_hash}:{intent_id}".encode() ).hexdigest()[:16] warrant = Warrant( warrant_id=warrant_id, parent_id=parent_id, scope_hash=scope_hash, delegation_depth=depth, intent_id=intent_id, ) self._live[warrant_id] = warrant self._by_key[key] = warrant_id return warrant def assert_single_lineage(self, leaf_ids: list[str]) -> None: """Auditor-side check: every leaf must trace to exactly one root.""" roots = set() for leaf_id in leaf_ids: cur = self._live.get(leaf_id) if cur is None: raise LineageForkError(f"unknown leaf warrant {leaf_id}") while cur.parent_id is not None: parent = self._live.get(cur.parent_id) if parent is None: raise LineageForkError( f"dangling parent {cur.parent_id} for {cur.warrant_id}" ) cur = parent roots.add(cur.warrant_id) if len(roots) > 1: raise LineageForkError( f"lineage forked: leaves {leaf_ids} descend from " f"{len(roots)} distinct roots {sorted(roots)}" ) def replay_audit(minter: WarrantMinter, leaf_ids: list[str]) -> None: minter.assert_single_lineage(leaf_ids) ```