# How does an instance detect that its AAIF credential was revoked mid-handoff when the revocation event and the in-flight handoff cross on the wire **Date of Record:** 2026 November 23 **Scope:** Applies to agent meshes using AAIF (Agent Authorization & Identity Framework) bearer warrants with short TTLs, where a warrant-issuing authority (WIA) propagates revocation events to relying parties out-of-band from the handoff channel. Does not apply to meshes that bind every handoff to a synchronous online introspection check against the WIA (those fail closed by construction), nor to stateless single-shot invocations with no delegated sub-warrant chain. ## Core Distinction The failure here is not "revoked credential gets used." That is a coarse, well-understood class of bug handled by TTLs and introspection. The boundary failure is subtler: **a revocation event and an in-flight handoff cross on the wire, and the receiving instance cannot distinguish "not yet revoked" from "revoked but the revocation notice has not arrived."** Both states present identically at the receiver: a syntactically valid, unexpired, signature-verified warrant whose revocation status is *unknown*. AAIF revocation is propagated asynchronously as a signed `revocation` record to relying parties, typically within a bounded propagation window `P` (observed: 200ms–4s across meshes). A warrant has a TTL `T` (observed: 30s–600s). The dangerous region is the interval `[t_revoke, t_revoke + P]` — the **propagation shadow**. A handoff whose receiving-side validation lands inside the shadow will accept a warrant that, at the issuer, is already dead. The receiver has no local signal that it is inside the shadow, because the absence of a revocation record is indistinguishable from the record simply not having arrived. The invariant that must hold is not "never accept a revoked warrant" (impossible under async propagation without blocking introspection). It is: **every accepted warrant must carry a provenance stamp that lets the receiver bound its own uncertainty and refuse to extend the delegation chain while that uncertainty exceeds the remaining task budget.** The failure is that instances treat "valid signature + unexpired" as "authorized," collapsing a three-valued status (valid / revoked / *unknown*) into two. ## What Was Observed A three-agent pipeline: `planner` (holds root warrant `W_root`, TTL 300s) delegates a sub-warrant `W_sub` (TTL 60s, scope `tool:db:read`) to `executor` via an A2A handoff. `executor` then attempts to pass a further-narrowed `W_sub2` to `summarizer`. Mid-pipeline, the WIA revoked `W_root` at `t=0` because the planner's host was flagged by an anomaly detector. Trace as reconstructed from mesh logs: - `t=-0.4s`: `planner` mints `W_sub`, signs, ships handoff frame to `executor`. Frame contains `W_sub`, `W_root` chain, and a `not_before`/`not_after` window. No revocation epoch. - `t=0.0s`: WIA revokes `W_root`. Emits signed revocation record `R(W_root, epoch=47)` to all registered relying parties. `executor` is registered; `summarizer` is registered but its subscription is lagging (its revocation listener reconnected at `t=-0.1s` and missed the epoch-47 broadcast — a gap the WIA does not replay on reconnect because it only replays on explicit `since_epoch` query, which the client did not send). - `t=0.6s`: `executor` validates `W_sub`. Signature valid, `not_after` in 59.4s, no local revocation record for `W_root` (it *has* received epoch-47 but its chain-walk only checks the leaf `W_sub`'s revocation status, not the parent's — a scope-check bug, not a propagation bug). Accepts. - `t=0.7s`: `executor` mints `W_sub2` from `W_sub` and hands to `summarizer`. `W_sub2` inherits a dead root. - `t=1.1s`: `summarizer` validates `W_sub2`. Signature valid, parent chain present, no revocation record for `W_sub2` or `W_root` in its local store (it missed epoch-47). Accepts. Executes a `tool:db:read` against a production replica. The revocation was correctly issued, correctly signed, and correctly delivered to one of two relying parties. The failure was not delivery. It was that **neither `executor` nor `summarizer` could tell that its local revocation view was stale**, and the delegation chain extended authority across the shadow. Two distinct sub-failures compounded: 1. `executor` checked only the leaf's revocation status, not the full chain. A revoked ancestor does not automatically mark descendants revoked unless the validator walks the chain. 2. `summarizer` had a **silent subscription gap**: its revocation listener had a reconnect that did not reconcile missed epochs, so its local store was internally consistent but externally stale by one epoch. ## Condition of Validity The guardrail holds only under these conditions, and fails outside them: - **Revocation must be chain-propagating by validation, not by inheritance.** A warrant's authorization is the AND over its full parent chain's revocation status at validation time. A revoked ancestor invalidates all descendants regardless of the descendant's own status. Validators MUST walk to the root. - **Every relying party must carry a monotonic `last_seen_epoch` and the WIA must expose a `since_epoch` reconciliation endpoint.** On any reconnect or validation, the receiver MUST reconcile from `last_seen_epoch` before trusting an empty local revocation set. An empty set is only trustworthy if `last_seen_epoch` is recent relative to the propagation bound `P`. - **The receiver must bound its own uncertainty.** If `now - last_seen_epoch > P_max` (the WIA's advertised maximum propagation window), the receiver MUST treat unknown-status as revoked for any *extension* of the chain (minting a child warrant), even if it will still accept the warrant for a *terminal* action whose remaining budget is less than the reconciliation cost. - **Handoff frames must carry the minter's `last_seen_epoch` at mint time**, so the receiver can detect that the minter was itself stale when it minted. A `W_sub` minted by a planner whose `last_seen_epoch` is older than `P_max` is suspect regardless of the receiver's own freshness. The invariant, stated precisely: *A warrant may be accepted for a terminal action only if `now - min(last_seen_epoch over chain) < P_max`; it may be extended into a child warrant only if the same bound holds AND the full chain revocation walk returns clean.* The bug in the trace violated both: `executor` skipped the chain walk, and `summarizer`'s `last_seen_epoch` was stale by one epoch with no reconciliation. ## Decision Boundary The decision boundary is the choice between **fail-closed introspection** and **bounded-uncertainty acceptance**, and it must be made per-action, not per-warrant: - If the action is **terminal and cheap to reverse** (read-only, idempotent, side-effect-free), accept under bounded uncertainty: `now - last_seen_epoch < P_max`. - If the action is **terminal and irreversible** (write, external side effect, payment), require synchronous introspection against the WIA regardless of local freshness. The propagation shadow is irrelevant because you do not rely on propagation. - If the action is **an extension** (minting a child warrant, delegating further), require both bounded uncertainty AND a clean chain walk. Never extend across the shadow. - If `last_seen_epoch` is unknown (fresh process, cold start, listener just reconnected), treat as maximally stale and reconcile before any acceptance. The boundary is crossed the moment an instance treats "no revocation record in my store" as "not revoked" without checking that its store is fresh enough for that inference to be sound. The store being internally consistent is not evidence of external correctness. ## Operational Effect The practical consequence is that AAIF meshes must expose **revocation freshness as a first-class, queryable property of every instance**, not a hidden internal of the listener. Concretely: - Every instance publishes `last_seen_epoch` and `P_max` in its handoff frames and health endpoints. - Every validator runs a **chain walk** before accepting, not a leaf check. - Every WIA exposes `since_epoch` replay, and clients reconcile on every reconnect — a reconnect without reconciliation is a silent revocation gap. - Every irreversible action forces introspection; the shadow is only tolerable for reversible actions. - The mesh's audit log records, for each accepted warrant, the `last_seen_epoch` at acceptance, so post-incident replay can distinguish "accepted inside the shadow" from "accepted with a stale store." The failure mode is not loud. It produces no exception at the receiver, no signature failure, no TTL expiry. It produces a successful, authorized-looking action on a credential the issuer already killed. The only defense is making the *uncertainty itself* observable and binding the acceptance decision to a bound on that uncertainty. ```python import time from dataclasses import dataclass, field class RevocationShadowError(RuntimeError): """Raised when a warrant is presented for acceptance or extension while the receiver's revocation view is too stale to soundly infer 'not revoked'.""" @dataclass class Warrant: warrant_id: str parent_id: str | None not_after: float minted_at_seen_epoch: int # minter's last_seen_epoch at mint time revoked: bool = False @dataclass class RevocationView: last_seen_epoch: int p_max: float # WIA-advertised max propagation window, seconds epoch_clock: float = field(default_factory=time.monotonic) def age(self) -> float: return time.monotonic() - self.epoch_clock def is_fresh(self) -> bool: return self.age() < self.p_max def validate_for_extension( warrant: Warrant, chain: dict[str, Warrant], view: RevocationView, now: float, ) -> None: # 1. Chain walk: a revoked ancestor kills every descendant. node: Warrant | None = warrant seen: set[str] = set() while node is not None: if node.warrant_id in seen: raise RevocationShadowError(f"cycle in warrant chain at {node.warrant_id}") seen.add(node.warrant_id) if node.revoked: raise RevocationShadowError( f"ancestor {node.warrant_id} revoked; refusing to extend {warrant.warrant_id}" ) if node.not_after <= now: raise RevocationShadowError(f"warrant {node.warrant_id} expired") node = chain.get(node.parent_id) if node.parent_id else None # 2. Bounded uncertainty: refuse to extend across the propagation shadow. if not view.is_fresh(): raise RevocationShadowError( f"revocation view stale by {view.age():.2f}s > P_max={view.p_max}s; " f"cannot soundly infer non-revocation for {warrant.warrant_id}" ) # 3. Minter staleness: a child minted by a stale parent is suspect. if warrant.minted_at_seen_epoch < view.last_seen_epoch - 1: raise RevocationShadowError( f"warrant {warrant.warrant_id} minted at seen_epoch=" f"{warrant.minted_at_seen_epoch}, receiver at {view.last_seen_epoch}; " f"minter may have minted inside the shadow" ) def reconcile_on_reconnect(view: RevocationView, wia_since_epoch_fn) -> None: """Must be called on every listener reconnect. A reconnect without reconciliation is a silent revocation gap.""" missed = wia_since_epoch_fn(view.last_seen_epoch) if missed is None: raise RevocationShadowError("WIA does not support since_epoch replay; cannot reconcile") for record in missed: # caller applies records to local store; here we only advance the epoch view.last_seen_epoch = max(view.last_seen_epoch, record["epoch"]) view.epoch_clock = time.monotonic() ```