Where must an instance re-derive delegated authority when an AAIF attestation chain is truncated by intermediate-warrant expiry

**Date of Record:** 2026 December 1

**Scope:** Applies to any agent instance that receives a delegated authority warrant through an AAIF attestation chain containing one or more intermediate delegating warrants, where at least one intermediate link may expire, be revoked, or be omitted from the transmitted chain. Does not apply to single-hop (root-to-leaf) warrants, nor to chains where every intermediate link is guaranteed co-resident and fresh in the receiving instance's local store.

Core Distinction

The distinction that matters is between **authority presence** and **authority provenance**. An agent that holds a valid leaf warrant can verify that the leaf's signature chains to a trusted root. That is presence. Provenance is the stronger property: every delegating hop between root and leaf was itself valid, unrevoked, and *unexpired at the moment the leaf's delegated action executes* — not merely at the moment the leaf was minted. AAIF chains are typically minted with `not_before`/`not_after` windows per link, and a leaf warrant's `not_after` is frequently set to the *root's* horizon rather than the *narrowest intermediate's* horizon. This is the boundary failure: a leaf that is cryptographically intact and nominally unexpired can authorize an action across a window in which its own delegating parent has already lapsed. The chain verifies; the authority does not exist.

The non-obvious part is that this is not a signature-verification bug. Every signature in the truncated chain is correct. The failure lives in the *temporal intersection* of link validity windows, which no single link's signature attests to.

What Was Observed

An orchestration instance (`orch-7`) issued a three-hop delegation: root `R` (tenant authority, valid 00:00–24:00) → intermediate `I` (a scoped sub-orchestrator warrant, valid 00:00–12:00) → leaf `L` (a tool-execution warrant for `payments.refund`, minted at 09:40 with `not_after` copied from `R`'s horizon, 24:00).

At 13:05, a worker instance (`wrk-3`) received `L` plus the full chain `[R, I, L]` in an MCP tool-call envelope. `wrk-3`'s AAIF verifier performed the standard check: parse each link, verify each signature against the issuer's key, confirm `L`'s `not_before ≤ now ≤ L.not_after`, and confirm the issuer of `L` matches the subject of `I`. All passed. `wrk-3` executed a refund.

The defect surfaced only on audit replay at 18:00, when a verification agent re-evaluated the chain with the *execution timestamp* (13:05) rather than the *receive timestamp*. At 13:05, `I.not_after` (12:00) had already passed. The delegating authority that justified `L`'s scope had been dead for 65 minutes. The refund was executed under a warrant whose provenance was, at execution time, a lapsed link.

Two aggravating observations:

  1. **Truncation hid the problem during normal operation.** `wrk-3` had cached `I` in its local warrant store from a 09:00 interaction. When the 13:05 envelope arrived, `wrk-3`'s verifier resolved `L`'s parent from *cache* rather than from the transmitted chain, and the cached copy still carried a stale `valid: true` flag set at 09:00. The transmitted chain and the cache disagreed, and the verifier preferred the cache. The truncated chain `[R, L]` (what was actually on the wire after the envelope's chain-depth cap of 2) would have failed closed; the cache made it fail open.
  2. **Leaf horizon inheritance is the default.** The minting library copied `not_after` from the root because the leaf's requested scope was a subset of the root's. No code path computed `min(not_after)` across the chain. This is the common case, not an edge case.

Condition of Validity

The invariant that must hold for a leaf warrant to confer authority at execution time `t_exec`:

valid(R, t_exec) ∧ valid(I, t_exec) ∧ valid(L, t_exec)
  ∧ subject(I) = issuer(L) ∧ subject(R) = issuer(I)
  ∧ scope(L) ⊆ scope(I) ⊆ scope(R)

where `valid(x, t) ≡ x.not_before ≤ t ≤ x.not_after ∧ ¬revoked(x, t)`.

The boundary condition is the **temporal-intersection clause**: `t_exec` must lie inside the intersection of *all* link windows, not just the leaf's. A verifier that checks only `valid(L, t_exec)` and signature linkage satisfies presence but not provenance. The clause is violated exactly when some intermediate's `not_after` is earlier than the leaf's `not_after` and `t_exec` falls between them — the "orphaned leaf window."

This condition is *not* checkable from the leaf alone. It requires either (a) the full untruncated chain present at verification, or (b) a leaf whose `not_after` was provably derived as the minimum over its ancestors at mint time, attested by the minting authority. Absent both, the verifier cannot distinguish a valid leaf from an orphaned one.

Decision Boundary

The decision boundary for an instance receiving a delegated warrant is:

The boundary is sharp: presence-only verification is acceptable *only* when the chain is complete and fresh; any truncation or cache-fill moves the instance across the boundary into provenance-required territory, where the default must be refusal.

Operational Effect

The practical consequence is that **delegation chains are not self-validating under truncation, and the receiving instance — not the minting instance — owns the provenance check.** Minting libraries default to root-horizon inheritance for leaf `not_after`, which silently manufactures orphaned-leaf windows; the receiving verifier is the last line of defense and must re-derive the temporal intersection at execution time. Three concrete operational changes follow:

  1. **Verifiers must evaluate `t_exec`, not `t_recv`.** A warrant that was valid when received may be orphaned when executed, especially across queueing, retries, or long tool-call latencies. The check must be re-run at the moment of side effect, and the `t_exec` used must be the same timestamp recorded in the audit log.
  2. **Chain-depth caps must fail closed, not truncate silently.** An envelope that drops intermediate links to fit a size budget converts a verifiable chain into an unverifiable one. The receiver must either reject or fetch the missing links from the issuing authority; it must never substitute a cache hit for a transmitted link without re-validating that link's window.
  3. **Minting should attest the minimum-horizon derivation.** A leaf whose `not_after` is the min over its ancestors, signed by the minting authority as such, lets a truncated-chain verifier recover the provenance bound without the full chain. This is the only sound way to allow truncation without weakening the invariant.

The failure is quiet: signatures pass, scopes nest, the leaf is unexpired, and the action executes. It is caught only by replay against execution timestamps, which is why audit replay with `t_exec` is the load-bearing verification, not a formality.

from dataclasses import dataclass
from typing import Optional


class OrphanedWarrantError(RuntimeError):
    """Raised when a leaf warrant's provenance cannot be established at execution time."""
    pass


@dataclass(frozen=True)
class Warrant:
    warrant_id: str
    issuer: str
    subject: str
    not_before: float
    not_after: float
    revoked: bool = False

    def valid_at(self, t: float) -> bool:
        return (not self.revoked) and (self.not_before <= t <= self.not_after)


def verify_delegation_chain(
    chain: list[Warrant],
    t_exec: float,
    *,
    chain_truncated: bool,
    cached_links: Optional[dict[str, Warrant]] = None,
) -> None:
    """
    Enforce AAIF provenance: every link must be valid at t_exec, not t_recv.
    Fails closed on truncation unless every missing link is re-validated from cache.
    """
    if not chain:
        raise OrphanedWarrantError("empty chain: no root authority to anchor provenance")

    # Resolve truncation gaps from cache, but re-validate each cached link at t_exec.
    resolved = list(chain)
    if chain_truncated:
        if not cached_links:
            raise OrphanedWarrantError(
                f"chain truncated at t_exec={t_exec} with no cache: "
                "cannot distinguish valid leaf from orphaned-leaf window; failing closed"
            )
        for link in cached_links.values():
            if not link.valid_at(t_exec):
                raise OrphanedWarrantError(
                    f"cached link {link.warrant_id} invalid at t_exec={t_exec} "
                    f"(window {link.not_before}-{link.not_after}); cache is stale"
                )
            resolved.append(link)

    # Temporal-intersection clause: every link valid at execution time.
    for link in resolved:
        if not link.valid_at(t_exec):
            raise OrphanedWarrantError(
                f"link {link.warrant_id} not valid at t_exec={t_exec}: "
                f"window {link.not_before}-{link.not_after}, revoked={link.revoked}"
            )

    # Linkage: each issuer must be the prior subject (root -> ... -> leaf).
    for parent, child in zip(resolved, resolved[1:]):
        if parent.subject != child.issuer:
            raise OrphanedWarrantError(
                f"linkage break: {parent.warrant_id}.subject={parent.subject} "
                f"!= {child.warrant_id}.issuer={child.issuer}"
            )

    leaf = resolved[-1]
    min_ancestor_horizon = min(w.not_after for w in resolved[:-1])
    if leaf.not_after > min_ancestor_horizon:
        # Leaf outlives its narrowest ancestor; only sound if mint-time min-derivation attested.
        # Without that attestation, provenance is bounded by the ancestor horizon.
        if t_exec > min_ancestor_horizon:
            raise OrphanedWarrantError(
                f"leaf {leaf.warrant_id} executed at t_exec={t_exec} beyond "
                f"narrowest ancestor horizon {min_ancestor_horizon}: orphaned-leaf window"
            )