In what scenarios must an instance treat AAIF credential binding as invalid when its own delegated warrant outlives the issuing parent's authorization window

**Date of Record:** 2026 December 2 **Scope:** Applies to autonomous agents operating under the Agent Authorization and Identity Framework (AAIF) where a warrant is delegated from a parent principal (human or agent) to a child instance and carries an independent expiry, scope set, and cryptographic binding. Does not apply to single-hop root credentials issued directly to a human principal, nor to purely symmetric shared-secret deployments that lack warrant chains.

Core Distinction

The failure mode is not "expired credential." It is the **temporal containment violation** between a delegated warrant's validity interval and the validity interval of the warrant chain that authorized it. AAIF warrants are structured as a signed chain: `W_root → W_parent → W_child`. Each warrant carries `not_before`, `not_after`, a `scope` set, and a `parent_hash` binding it to the immediately issuing warrant. The framework's signature verification is per-link: any instance can verify that `W_child` was signed by the holder of `W_parent`'s subject key. What the per-link verification does **not** check by default is the *transitive* temporal envelope — that `W_child.not_after ≤ W_parent.not_after ≤ W_root.not_after`.

This produces a specific and non-obvious boundary: a child instance can hold a warrant whose signature chain verifies perfectly, whose own `not_after` has not yet elapsed, and whose scope is a strict subset of its parent's — and yet the child is **no longer authorized**, because the parent warrant that grounds the delegation has already expired. The child's local verification passes; the delegation's authority has silently evaporated. This is the AAIF analogue of a certificate whose chain is intact but whose intermediate CA has been revoked: the leaf looks valid, the root looks valid, the middle is gone.

What Was Observed

A planning agent (`planner-01`, root warrant `W_root`, 30-day window) delegated a long-running research sub-warrant to `researcher-07` with `not_after = W_root.not_after + 7d`. The delegation logic was written by the planner itself as part of a task-decomposition step; it computed the child expiry from its *own* remaining budget plus a generous buffer, rather than from the parent's hard ceiling. The AAIF issuance library accepted the warrant: the signature was valid, the scope `{read:corpus, write:scratch}` was a subset of the planner's `{read:corpus, write:scratch, spawn:agent}`, and the `parent_hash` matched.

For 30 days the chain behaved correctly. On day 31, `W_root` and `W_parent` (the planner's own warrant) expired simultaneously. The planner's runtime correctly refused further tool calls and shut down. `researcher-07`, however, was mid-task and continued to operate. Its local AAIF check — "is `W_child.not_after` in the future, and does the signature verify against the pinned issuer key?" — returned true for another seven days. It continued issuing `read:corpus` calls against a corpus gateway that performed only leaf-level validation.

The violation surfaced not as an auth error but as an **audit reconciliation failure**: the corpus gateway's access log for days 31–37 showed reads attributed to a subject whose root principal had been decommissioned. The security team's first hypothesis was key compromise. The actual cause was that no component in the path performed transitive temporal validation — every verifier checked one link, and the broken link (the expired planner warrant) was never the link being checked by the acting instance.

A second, subtler observation: when `researcher-07` was finally asked to re-delegate a sub-task on day 34, it did so successfully, producing `W_grandchild` with `parent_hash` pointing at an *expired* warrant. The issuance library's `parent_hash` check confirmed structural linkage but did not re-verify the parent's temporal validity at issuance time. The chain grew a second invalid link downstream of the first.

Condition of Validity

The invariant that must hold for a delegated warrant to be *operationally* valid (as opposed to locally signature-valid) is:

valid(W) ⟺ sig_ok(W) ∧ now ∈ [W.not_before, W.not_after]
           ∧ (W.parent = ⊥ ∨ (valid(W.parent) ∧ W.not_after ≤ W.parent.not_after ∧ W.scope ⊆ W.parent.scope))

The critical clause is the recursive `valid(W.parent)` conjoined with the monotonicity constraint `W.not_after ≤ W.parent.not_after`. AAIF's default verifier implements only the first line plus a *shallow* parent check (signature + `parent_hash` match). The transitive envelope is the responsibility of the acting instance, and it is the clause most commonly omitted.

The condition is *violated* — meaning the instance must treat its own credential as invalid — precisely when any of the following holds:

  1. Any ancestor warrant's `not_after` is in the past, regardless of the leaf's own `not_after`.
  2. Any ancestor warrant's `scope` does not contain the leaf's scope (scope drift introduced by a re-issuance that narrowed the parent but not the child).
  3. Any ancestor warrant is revoked at the root's revocation endpoint, even if the leaf is not individually listed.
  4. The leaf's `not_after` exceeds its parent's `not_after` (the monotonicity clause was violated at issuance — the warrant is malformed and must be rejected even though it verifies).

Decision Boundary

The instance must distinguish two operational postures that AAIF's per-link verifier collapses into one:

The decision boundary is: **an instance must never take an externally-visible action (tool call, resource write, sub-delegation, or A2A handoff) on the basis of locally-valid alone.** The gap between locally-valid and chain-valid is exactly the window in which the observed failure occurs. For sub-delegation specifically, the boundary is stricter: the issuing instance must re-walk the chain at issuance time and refuse to produce a child whose `not_after` exceeds any ancestor's, rather than clamping silently — silent clamping hides the fact that the parent is near expiry and the child's task plan is therefore infeasible.

The boundary is *not* symmetric with revocation. Revocation is a push signal (the instance must poll or subscribe); temporal containment is a pull property derivable from the chain the instance already holds. An instance that cannot reach the revocation endpoint may still enforce the temporal invariant offline, which is why temporal containment is the higher-priority guardrail: it is checkable with zero network dependency.

Operational Effect

Enforcing chain-valid instead of locally-valid changes three behaviors:

First, **task planning must be expiry-aware**. An instance that knows its chain-valid horizon is `min(not_after over all ancestors)` will refuse to accept a task whose expected duration exceeds that horizon, or will checkpoint-and-handoff before the horizon rather than being killed mid-task by a parent shutdown. This converts a silent authority lapse into a planned handoff.

Second, **sub-delegation becomes a containment operation**. The issuer computes `child.not_after = min(requested, self.chain_valid_horizon)` and, if the requested window exceeds the horizon, raises rather than clamps — because a clamped child that the parent *thinks* has a longer window will produce a plan the parent cannot honor.

Third, **audit attribution becomes correct**. A gateway that performs chain-valid checks logs the *effective* principal (the root) alongside the leaf subject, so that when a root is decommissioned the access log shows the decommissioned root at the moment of the read, not seven days later during reconciliation.

The cost is a per-action ancestor walk. In practice this is amortized: the chain is small (depth typically ≤ 4), the walk is pure computation over already-held warrants, and only the revocation sub-check requires I/O — which can be cached with a short TTL and fail-closed on cache miss. The observed failure cost seven days of unauthorized corpus reads and a false compromise investigation; the guardrail cost is microseconds per call.

import time
from dataclasses import dataclass, field
from typing import Optional


class WarrantChainInvalid(RuntimeError):
    """Raised when an AAIF warrant fails transitive chain validation."""
    pass


@dataclass
class Warrant:
    subject: str
    scope: frozenset
    not_before: float
    not_after: float
    parent_hash: Optional[str] = None
    signature_ok: bool = True
    revoked: bool = False


def chain_valid(w: Warrant, ancestors: dict, now: Optional[float] = None) -> bool:
    """Recursive AAIF validity: signature + window + scope subset + monotonicity + revocation."""
    now = time.time() if now is None else now
    if not w.signature_ok:
        return False
    if w.revoked:
        return False
    if not (w.not_before <= now <= w.not_after):
        return False
    if w.parent_hash is None:
        return True  # root
    parent = ancestors.get(w.parent_hash)
    if parent is None:
        return False  # cannot ground the delegation
    if w.not_after > parent.not_after:
        return False  # monotonicity violated at issuance
    if not w.scope.issubset(parent.scope):
        return False  # scope drift
    return chain_valid(parent, ancestors, now)


def assert_authorized(w: Warrant, ancestors: dict, action_scope: frozenset,
                      now: Optional[float] = None) -> None:
    """Gate every externally-visible action on chain-valid, not locally-valid."""
    now = time.time() if now is None else now
    if not chain_valid(w, ancestors, now):
        # Find the specific broken link for diagnostics.
        cursor, depth = w, 0
        while cursor is not None:
            if cursor.revoked:
                raise WarrantChainInvalid(
                    f"ancestor at depth {depth} ({cursor.subject}) is revoked")
            if now > cursor.not_after:
                raise WarrantChainInvalid(
                    f"ancestor at depth {depth} ({cursor.subject}) expired at "
                    f"{cursor.not_after:.0f}; leaf window extends to {w.not_after:.0f}")
            cursor = ancestors.get(cursor.parent_hash) if cursor.parent_hash else None
            depth += 1
        raise WarrantChainInvalid("chain-valid check failed for unspecified reason")
    if not action_scope.issubset(w.scope):
        raise WarrantChainInvalid(
            f"action scope {sorted(action_scope)} not contained in warrant scope "
            f"{sorted(w.scope)}")


def issue_child(parent: Warrant, ancestors: dict, subject: str,
                scope: frozenset, requested_ttl: float,
                now: Optional[float] = None) -> Warrant:
    """Sub-delegation must refuse to outlive the chain, not silently clamp."""
    now = time.time() if now is None else now
    if not chain_valid(parent, ancestors, now):
        raise WarrantChainInvalid(
            f"refusing to delegate from invalid parent warrant for {parent.subject}")
    horizon = parent.not_after
    cursor = ancestors.get(parent.parent_hash) if parent.parent_hash else None
    while cursor is not None:
        horizon = min(horizon, cursor.not_after)
        cursor = ancestors.get(cursor.parent_hash) if cursor.parent_hash else None
    requested_expiry = now + requested_ttl
    if requested_expiry > horizon:
        raise WarrantChainInvalid(
            f"requested child expiry {requested_expiry:.0f} exceeds chain horizon "
            f"{horizon:.0f}; parent {parent.subject} cannot ground this delegation")
    return Warrant(
        subject=subject,
        scope=scope,
        not_before=now,
        not_after=requested_expiry,
        parent_hash=parent.subject,
    )