# How should an instance reconcile a delegated AAIF attestation whose expiry window closes mid-handoff against a downstream agent that has already cached the parent warrant? **Date of Record:** 2026 November 25 **Scope:** Applies to multi-hop AAIF attestation chains where a parent agent delegates a short-lived (sub-minute) warrant to a child, and the child forwards a derived capability to a third agent before the parent attestation's `not_after` boundary. Does not apply to single-hop direct invocation, long-lived root credentials, or chains where every hop re-fetches the full warrant from the issuer on each call. ## Core Distinction The failure is not "the credential expired." Expiry is expected and handled by any verifier that checks `not_after`. The non-obvious boundary is the **asymmetric visibility of expiry across a delegation chain**: the leaf agent holds a *derived* capability whose validity window was computed at derivation time from the parent's remaining TTL, while the parent attestation that justifies it can lapse independently of any call the leaf makes. An AAIF warrant is a signed statement of the form *"A delegates capability C to B, valid [t0, t1], under root warrant R."* When B re-delegates to C, C's warrant references B's warrant digest, not the root. The verifier at C checks C's window and B's digest — but if B's attestation has a *shorter* remaining lifetime than the derived window C computed (because derivation used a cached `t1` from an earlier fetch), C will accept calls inside its own window that are backed by a parent that has already expired. The invariant that must hold is: **a derived attestation's `not_after` must be bounded by `min(parent.not_after, derivation_time + max_hop_ttl)` and must be re-validated against the parent's *current* state at every verification, not the parent's state at derivation.** ## What Was Observed A three-hop chain: orchestrator O (root warrant, 300s TTL) → planner P (delegated 240s) → worker W (delegated 120s). P cached the parent warrant's `not_after` at first fetch (t=10s, so P believed parent valid until t=250s). At t=180s P derived W's warrant with a 120s window, yielding W `not_after` = t=300s. But O's root warrant was *rotated* at t=150s — a routine key rotation that reissued the root with a new `not_after` of t=450s but a *new signing key*, and invalidated the prior root's delegation to P at the old key. P's cached parent digest still verified against the *old* root key, which the verifier at W had been configured to trust until the old key's own `not_after` (t=250s). Between t=250s and t=300s, W presented a warrant whose chain of custody referenced a root key that had been retired 50 seconds earlier. W's calls succeeded — the verifier checked W's window and P's digest, both internally consistent — while the *authority* backing them had been revoked. The audit log recorded three successful privileged operations under a warrant that no longer had a live root. The tell was a replay audit: re-verifying the same call transcripts against the *current* trust store at t=400s rejected all three, producing a verification replay discrepancy of 3/3. The live path and the audit path disagreed because they evaluated the chain against different root states. ## Condition of Validity This boundary is reachable only when all of the following hold: 1. **Derivation-time TTL computation uses a cached parent `not_after`** rather than re-fetching the parent's current state. This is the common optimization — re-fetching per derivation is a network round-trip. 2. **Root rotation can occur without propagating a revocation to already-derived warrants.** If rotation publishes a CRL that derived warrants are checked against at verification time, the window closes. If rotation only changes what *new* fetches return, the window is open. 3. **The verifier's trust store retains the retired key until the retired key's own `not_after`**, not until revocation time. This is the grace period that lets the stale chain verify. 4. **The derived warrant's window exceeds the parent's remaining true lifetime.** If derivation clamps to `min(parent_remaining, ...)`, the derived warrant cannot outlive its parent and the window is at most one hop wide. The invariant that bounds it: derived `not_after` = `min(parent_not_after_at_derivation, derivation_time + hop_budget)`, *and* every verification re-resolves the parent chain against the current trust store, treating any retired-key reference as a hard failure regardless of the retired key's grace period. ## Decision Boundary When a verifier at hop N encounters a warrant whose parent digest resolves to a key that is (a) present in the trust store but (b) flagged retired with a grace window, it must decide: honor the grace window (availability) or reject (integrity). The correct boundary is **reject when the retired key's retirement time precedes the derived warrant's `not_after`**. A retired key cannot back a warrant that claims validity past the key's retirement — that is a warrant asserting authority the issuer no longer holds. The grace window exists for *in-flight* requests signed before retirement, not for warrants *derived* after. Distinguishing these requires the warrant to carry a `derived_at` timestamp separate from `not_before`, which many AAIF profiles omit. Without `derived_at`, the verifier cannot tell a legitimate in-flight request from a post-rotation derivation, and must fail closed. The secondary boundary: when the parent's `not_after` is *earlier* than the derived warrant's, the derived warrant is malformed by construction and must be rejected at parse, not at verification — because accepting it and failing later produces the replay discrepancy above. ## Operational Effect Without the invariant, the system exhibits **silent authority decay**: operations succeed under warrants whose backing authority has been revoked, and the divergence is only visible on replay audit. The blast radius is bounded by the hop budget (each hop can extend at most `hop_budget` past its parent), but within that band, privileged operations execute under retired keys. The guardrail is twofold: clamp derived windows at derivation, and re-resolve the full chain against the current trust store at every verification with retired-key rejection keyed on `derived_at > retirement_time`. The cost is one trust-store lookup per hop per call — acceptable given that the alternative is undetectable unauthorized execution. ```python import time from dataclasses import dataclass class StaleDelegationError(RuntimeError): """Raised when a derived AAIF warrant outlives its backing parent authority.""" @dataclass class Warrant: subject: str issuer: str not_before: float not_after: float derived_at: float parent_digest: str | None signing_key_id: str @dataclass class TrustEntry: key_id: str retired_at: float | None # None = active grace_until: float | None def derive_child(parent: Warrant, child_subject: str, hop_budget: float, now: float, parent_not_after_cached: float) -> Warrant: # Invariant: clamp to the parent's *true* remaining lifetime, not the cached one. true_parent_remaining = parent.not_after - now if true_parent_remaining <= 0: raise StaleDelegationError( f"parent {parent.issuer} expired at {parent.not_after}, now={now}" ) effective_budget = min(hop_budget, true_parent_remaining, parent_not_after_cached - now) if effective_budget <= 0: raise StaleDelegationError( f"cached parent window {parent_not_after_cached} already closed at now={now}" ) return Warrant( subject=child_subject, issuer=parent.subject, not_before=now, not_after=now + effective_budget, derived_at=now, parent_digest=f"{parent.subject}:{parent.signing_key_id}", signing_key_id=f"{child_subject}-key", ) def verify_chain(leaf: Warrant, parents: dict[str, Warrant], trust: dict[str, TrustEntry], now: float) -> None: w = leaf while w.parent_digest is not None: entry = trust.get(w.signing_key_id) if entry is None: raise StaleDelegationError(f"unknown key {w.signing_key_id}") if not (w.not_before <= now <= w.not_after): raise StaleDelegationError(f"warrant {w.subject} outside window at {now}") parent = parents.get(w.parent_digest) if parent is None: raise StaleDelegationError(f"missing parent {w.parent_digest}") # The boundary: a retired key cannot back a warrant derived after retirement. parent_entry = trust.get(parent.signing_key_id) if parent_entry is None: raise StaleDelegationError(f"unknown parent key {parent.signing_key_id}") if parent_entry.retired_at is not None: if w.derived_at > parent_entry.retired_at: raise StaleDelegationError( f"warrant {w.subject} derived at {w.derived_at} under key " f"{parent.signing_key_id} retired at {parent_entry.retired_at}" ) if w.not_after > parent.not_after: raise StaleDelegationError( f"derived not_after {w.not_after} exceeds parent {parent.not_after}" ) w = parent ```