# Which invariants prevent delegated AAIF warrants from silently outliving the principal's revocation epoch **Date of Record:** 2026 November 29 **Scope:** Applies to any agent-to-agent handoff where a delegatee agent acts under a warrant (capability token) minted by a delegator whose own authority derives from a principal with a revocable epoch. Does not cover first-party credentials held directly by the principal, nor pure offline/batch flows where no live revocation channel exists. ## Core Distinction The failure we care about is not *forgery* and not *expiry*. It is **warrant-epoch skew**: a delegated warrant that remains cryptographically valid and nominally unexpired, yet whose underlying authority was revoked at the principal *before* the delegatee ever exercised it. The distinction that matters operationally is between two different notions of "still valid": - **Signature validity** — the warrant's chain verifies against the delegator's key and the delegation depth is within bounds. - **Authority validity** — the principal's revocation epoch at *exercise time* still covers the epoch stamped into the warrant. AAIF delegation is designed to make the first cheap and local (delegatee verifies a signature, no round trip). The second is inherently non-local: it requires the delegatee to learn about a state change that happened at a party it may never talk to. Every serious failure in this area is a case where a system treated (1) as sufficient for (2). The invariant that prevents it is **epoch monotonicity at the point of exercise**, not at the point of mint. ## What Was Observed A three-tier delegation: principal `P` → orchestrator `O` → worker `W`. `O` holds a long-lived warrant `W_O` from `P` (TTL 24h, delegation depth 2). `W` requests a sub-warrant to call a billing tool. `O` mints `W_W` via `delegate(W_O, scope=billing:charge, depth=1, not_after=+15m)`, stamping it with `P.epoch = 4417` — the epoch `O` last observed, cached at the start of its run. Mid-run, `P` revokes `O`'s authority (operator kill switch) and bumps `P.epoch → 4418`. `P`'s revocation is correct and immediate at the source. But: 1. `O`'s cached epoch is stale; nothing pushed the bump to `O`. 2. `O` keeps minting sub-warrants stamped `epoch=4417`. Their signatures verify perfectly against `O`'s key, which is still trusted. 3. `W` verifies `W_W`: signature OK, depth OK, `not_after` in the future, `epoch=4417` — and `W` has no independent view of `P.epoch`, so it has nothing to compare against. 4. `W` charges the billing tool for the full 15-minute window after revocation. The trace is the tell: **every local check passed at every hop.** The only check that would have caught it — "is 4417 still the live epoch at `P`?" — was never performed by anyone in the chain, because each hop assumed the hop above it had done so. The warrant was valid at mint time and dead at exercise time, and the gap between those two instants is exactly where the money left. A second, subtler variant: `O` *does* re-fetch `P.epoch` on each mint, but the billing tool's authorization cache holds `W_W`'s decision for 60s keyed on the warrant ID rather than the epoch. Revocation lands, `W` re-mints correctly at 4418, but the tool serves the cached *allow* from the 4417 decision. The skew moved from the minter to the enforcement cache. ## Condition of Validity The invariant holds — delegated authority cannot outlive revocation — **only if all three of the following are simultaneously true**: 1. **Epoch is bound into the signed payload, not carried alongside it.** The epoch must be inside the signature domain of the warrant. If it is a header, a sidecar field, or a cache key component, an attacker or a buggy minter can present a warrant whose *stated* epoch differs from the one that was signed. 2. **The exercising party checks epoch freshness against the principal, or against a party that has checked it within a bounded staleness window.** A delegatee that cannot reach `P` must reach a *revocation oracle* (a short-TTL signed epoch assertion from `P`) and must treat "oracle unreachable" as deny, not as "assume unchanged." 3. **Enforcement caches are keyed on `(warrant_id, epoch)`, never on `warrant_id` alone.** A cached allow for epoch 4417 must not satisfy a request whose presented warrant says 4418, and must not survive a known bump. If any one is false, the chain degrades to signature-only validity and the skew window is unbounded by anything except `not_after`. Note what this does *not* require: it does not require synchronous revocation propagation to every node. It requires that no node *act* on a stale epoch — which a short-TTL signed oracle plus epoch-keyed caching achieves without a global pause. ## Decision Boundary The boundary is **where to place the epoch check relative to the irreversible action**, and it is sharp: - **Reversible / idempotent / read-only actions** may proceed on signature validity alone within a bounded staleness window (e.g., oracle assertion age ≤ 30s). The cost of a stale allow is a retried read. - **Irreversible actions** (charge, delete, send, deploy, grant) must gate on a *fresh* epoch assertion whose age is ≤ the action's blast-radius tolerance, and must fail closed if the assertion cannot be obtained. The trap is treating "the tool is fast and the warrant is short-lived" as a substitute for the epoch check. A 15-minute `not_after` bounds the skew to 15 minutes, not to zero — and 15 minutes of unauthorized charges is a real incident, not a rounding error. Short TTL reduces the window; it does not eliminate the need for the check. The decision boundary is therefore: **`not_after` bounds the damage; only epoch freshness bounds the violation.** Conflating them is the recurring error. There is a second boundary on delegation *depth*. Each hop that re-mints from a cached epoch compounds the staleness. Depth-2 chains built entirely from a single stale observation at the root can carry an epoch that is arbitrarily old by the time the leaf acts. The invariant must be enforced at *every* mint, not just the first — a minter that re-verifies its own warrant's epoch before delegating closes the compounding. ## Operational Effect When the three conditions hold, the observable effect is that **revocation latency becomes a property of the oracle's TTL, not of the delegation graph's shape.** A depth-5 chain revokes as fast as a depth-1 chain, because every hop independently refuses to act on a stale epoch rather than trusting its parent to have checked. This is the whole point: it converts a distributed-consensus-shaped problem (propagate revocation everywhere) into a local-check-shaped problem (each actor verifies freshness before acting), which is the only version that scales across agents that don't share a clock or a channel. When they don't hold, the effect is the silent-skew incident above: valid signatures, dead authority, and an audit log that shows a clean chain of successful verifications right up to the unauthorized charge. The failure is invisible to signature-based monitoring and only surfaces when someone reconciles the principal's revocation log against the tool's action log — usually after the fact. The guardrail is not a new protocol primitive; it is a discipline: **stamp epoch inside the signature, verify freshness at exercise, key caches on epoch, fail closed on oracle absence, and re-verify at every delegation hop.** Each is cheap. The cost of skipping any one is that the chain's "valid" verdict stops meaning "authorized." ```python import time from dataclasses import dataclass class EpochSkewError(RuntimeError): """Raised when a warrant's stamped epoch is not provably fresh at exercise time.""" pass @dataclass(frozen=True) class Warrant: warrant_id: str delegator: str epoch: int # must be inside the signed payload not_after: float depth: int @dataclass(frozen=True) class EpochAssertion: epoch: int issued_at: float MAX_ORACLE_AGE_S = 30.0 IRREVERSIBLE = {"billing:charge", "data:delete", "deploy:prod"} def assert_epoch_fresh( warrant: Warrant, assertion: EpochAssertion | None, action: str, now: float | None = None, ) -> None: now = time.time() if now is None else now # Expiry is necessary but never sufficient. if now >= warrant.not_after: raise EpochSkewError( f"warrant {warrant.warrant_id} expired at {warrant.not_after}" ) if action in IRREVERSIBLE: if assertion is None: # Fail closed: no proof of freshness means no authority. raise EpochSkewError( f"irreversible action {action!r} requires a live epoch assertion; " f"none available for warrant {warrant.warrant_id}" ) age = now - assertion.issued_at if age > MAX_ORACLE_AGE_S: raise EpochSkewError( f"epoch assertion age {age:.1f}s exceeds {MAX_ORACLE_AGE_S}s " f"for irreversible action {action!r}" ) if assertion.epoch != warrant.epoch: # The principal has moved on; the warrant is signed but dead. raise EpochSkewError( f"epoch skew: warrant {warrant.warrant_id} stamped " f"{warrant.epoch}, principal at {assertion.epoch} — revoked" ) def exercise( warrant: Warrant, assertion: EpochAssertion | None, action: str, cache: dict[tuple[str, int], bool], ) -> bool: # Cache keyed on (warrant_id, epoch) so a bump cannot serve a stale allow. key = (warrant.warrant_id, warrant.epoch) if cache.get(key): # Even a cached allow must pass the freshness gate for irreversible work. assert_epoch_fresh(warrant, assertion, action) return True assert_epoch_fresh(warrant, assertion, action) cache[key] = True return True ```