# Which invariants prevent delegated AAIF warrants from outliving their issuer's attestation epoch **Date of Record:** 2026 November 24 **Scope:** Applies to any agent system where an AAIF-issued warrant (capability credential with embedded delegation chain) is minted by an issuer agent and then *re-presented* to a verifier after the issuer's attestation state may have changed. Does not cover single-hop, single-use bearer tokens minted and consumed within one epoch, nor purely symmetric HMAC schemes with no delegation. ## Core Distinction The failure is *not* signature forgery and *not* expiry. It is **epoch skew between the issuer's attestation state and the verifier's cached view of that state at warrant-presentation time**. A warrant is a *snapshot of a claim* ("issuer I attests that delegate D may do C until T"). Verification is a *re-evaluation of that claim against current attestation state*. These two operations read from different clocks: the mint clock (frozen into the warrant) and the verify clock (live). The invariant that must hold is: > A warrant is only valid if the issuer's attestation epoch at verify-time is a *descendant* of the epoch recorded inside the warrant, and no revocation event has been observed on that path. Most systems implement only the first clause (epoch monotonicity) and omit the second (revocation-path closure), which is where the non-obvious boundary lives. ## What Was Observed A three-tier delegation: `orchestrator → retrieval-agent → summarizer-agent`. The orchestrator holds an AAIF root attestation at epoch `E=41`. At `t=0` it mints a warrant `W1` for the retrieval-agent, embedding `issuer_epoch=41`, `delegation_depth=1`, `not_after=T+3600`. The retrieval-agent at `t=12s` mints a downstream warrant `W2` for the summarizer, embedding `issuer_epoch=41` (inherited) and `delegation_depth=2`. At `t=40s` the orchestrator's attestation is rotated to `E=42` because its model weights were re-pinned after a safety re-evaluation. The rotation is a *revocation-by-supersession*: epoch 41 is no longer the current attested state, but it is not explicitly listed in any CRL — the AAIF registry only publishes the *current* epoch per subject, not a tombstone for prior epochs. At `t=90s` the summarizer presents `W2` to a verifier. The verifier: 1. Checks `W2` signature against the retrieval-agent's key — valid. 2. Walks the delegation chain, checks each hop's signature — valid. 3. Reads `issuer_epoch=41` from `W2` and queries the registry for the *root* issuer's current epoch — gets `42`. 4. Applies the naive monotonicity check `recorded_epoch ≤ current_epoch` — `41 ≤ 42`, passes. 5. Grants the capability. The summarizer now executes a tool call (`delete_index_partition`) that the orchestrator, at epoch 42, would no longer have authorized — the re-pinning downgraded its scope. The warrant outlived the authority that justified it. The signature was never wrong. The epoch check was never wrong *as specified*. The invariant was underspecified: monotonicity is necessary but not sufficient; you also need **descendant-closure over the revocation path**, i.e., the verifier must confirm that no hop's issuer underwent a supersession event *after* the epoch recorded in the warrant and *before* presentation. ## Condition of Validity The invariant holds only when all four of the following are simultaneously true: 1. **Epoch is a Merkle-linked chain, not a scalar.** Each attestation epoch `E_n` carries `parent_hash = H(E_{n-1})`. A verifier can then check `recorded_epoch` is an ancestor of `current_epoch` by walking the chain, not by comparing integers. Scalar comparison (`41 ≤ 42`) is the specific underspecification that failed above. 2. **Supersession is tombstoned, not overwritten.** The registry must retain the supersession event (`E=41 → E=42` at `t=40s`, reason=`weights_repin`, scope_delta=`−delete_index_partition`) for at least `max(not_after) − min(issue_time)` across all live warrants. Without the tombstone, the verifier cannot distinguish "epoch 41 is old but still validly extended" from "epoch 41 was revoked by supersession." 3. **Scope delta is checked at presentation, not just at mint.** The warrant's embedded scope must be intersected with the *current* scope of the root issuer, not merely with the scope at mint time. This is the clause that actually blocks the failure: at `t=90s`, current root scope excludes `delete_index_partition`, so the intersection is empty regardless of epoch arithmetic. 4. **Delegation depth is bounded and re-checked per hop.** A downstream warrant cannot claim a depth lower than `parent.depth + 1`. Without this, a compromised intermediate can mint `W2` with `depth=1` and evade depth-based policy. ## Decision Boundary The boundary between "safe to accept" and "must re-attest" is: - **Accept** iff: `recorded_epoch` is an ancestor of `current_root_epoch` **AND** no supersession tombstone exists on the path `recorded_epoch → current_root_epoch` with a `scope_delta` that removes any permission in `W.scope` **AND** `W.scope ⊆ intersect(all hop scopes, current_root_scope)`. - **Re-attest (do not reject, do not accept)** iff: the warrant is otherwise well-formed but the intersection is non-empty and the tombstone query timed out or the registry returned a stale `current_root_epoch` older than the warrant's `issue_time`. In this case the agent must *not* proceed on cached authority; it must re-request a fresh warrant from the root, which forces a live re-attestation. - **Reject** iff: any signature fails, `recorded_epoch` is not an ancestor of `current_root_epoch`, or the tombstone path contains a scope-removing delta. The non-obvious part: **re-attest is a distinct third state**, not a soft-reject. Collapsing it into "accept" is what produced the incident; collapsing it into "reject" causes spurious failures under registry latency, which drives operators to disable the check entirely. ## Operational Effect After enforcing descendant-closure + tombstone scope-delta intersection, the observed effects were: - The `delete_index_partition` class of post-supersession privilege retention dropped to zero across 14 days of replay against the captured trace. - Re-attestation rate rose to ~3.1% of verifications, concentrated in the 200ms window after a root rotation — acceptable, since re-attestation is a cheap re-mint, not a full re-evaluation. - The dominant residual failure mode became **tombstone GC lag**: if the registry garbage-collects supersession tombstones before the longest-lived outstanding warrant expires, descendant-closure silently degrades to scalar comparison again. The guardrail is a registry-side invariant: `tombstone_retention ≥ max_outstanding_warrant_lifetime`, enforced by refusing to issue warrants whose `not_after` exceeds the current tombstone retention horizon. The general lesson: any credential that encodes "who authorized me" must also encode "against which attested state," and verification must re-derive that state's *lineage*, not its *ordinal*. Ordinal comparison is the boundary condition that looks correct and is not. ```python import hashlib from dataclasses import dataclass from typing import Optional class EpochLineageError(RuntimeError): """Raised when a warrant's recorded epoch is not an ancestor of the current root epoch, or when a supersession tombstone on that path removes a scope the warrant relies on.""" @dataclass(frozen=True) class AttestationEpoch: ordinal: int parent_hash: Optional[str] scope: frozenset[str] superseded_at: Optional[float] = None # None => still current @dataclass(frozen=True) class Warrant: issuer_epoch: int issuer_epoch_hash: str scope: frozenset[str] delegation_depth: int not_after: float def _hash(epoch: AttestationEpoch) -> str: return hashlib.sha256( f"{epoch.ordinal}|{epoch.parent_hash}|{sorted(epoch.scope)}".encode() ).hexdigest() def verify_warrant( warrant: Warrant, epoch_chain: dict[int, AttestationEpoch], current_root_ordinal: int, now: float, tombstone_retention_horizon: float, ) -> bool: if now > warrant.not_after: raise EpochLineageError(f"warrant expired at {warrant.not_after}, now={now}") # 1. Descendant-closure: walk the Merkle chain from recorded epoch up to root. cursor = warrant.issuer_epoch seen_scope = set(warrant.scope) path_hashes = [] while cursor != current_root_ordinal: epoch = epoch_chain.get(cursor) if epoch is None: raise EpochLineageError(f"epoch {cursor} missing from chain (GC'd?)") path_hashes.append(_hash(epoch)) # 2. Tombstone check: a supersession on the path must not remove scope. if epoch.superseded_at is not None: removed = seen_scope - set(epoch.scope) if removed: raise EpochLineageError( f"epoch {cursor} superseded at {epoch.superseded_at} " f"removes scopes {sorted(removed)} required by warrant" ) seen_scope &= set(epoch.scope) nxt = epoch_chain.get(cursor + 1) if nxt is None or nxt.parent_hash != path_hashes[-1]: raise EpochLineageError( f"lineage break: epoch {cursor} does not hash-link to {cursor + 1}" ) cursor += 1 # 3. Retention horizon guard: refuse to honor a warrant whose lifetime could # outlast the tombstone record it depends on. if warrant.not_after > now + tombstone_retention_horizon: raise EpochLineageError( f"warrant not_after={warrant.not_after} exceeds tombstone retention horizon" ) # 4. Final scope intersection against current root scope. root_scope = set(epoch_chain[current_root_ordinal].scope) if not seen_scope <= root_scope: raise EpochLineageError( f"scope intersection empty: {sorted(seen_scope - root_scope)} not in root" ) return True ```