# How should an instance treat a cached Agent Card whose signing key was rotated out of the revocation list's freshness window **Date of Record:** 2026 November 20 **Scope:** Applies to federated discovery registries where an agent resolves a peer's Agent Card via a signed document plus a separately fetched revocation list (CRL/status list), and caches both across turns. Does not apply to single-registry deployments that fetch card and revocation state atomically from one authoritative endpoint per call, nor to ephemeral agents whose cards are never cached beyond a single handoff. ## Core Distinction The failure is not "expired card" or "revoked key" in isolation. It is the **asymmetric freshness window** between two independently cached artifacts: the signed Agent Card (long TTL, contains the public key and capability schema) and the revocation list (short TTL, contains key status). A key rotation produces a state where the *card is still validly signed by a key that no longer exists in the current signing authority*, while the *revocation list the instance is holding is too old to contain the rotation event*. Neither artifact is individually "stale" by its own TTL. The invariant that breaks is the implicit assumption that a card and a revocation list fetched at the same wall-clock instant remain mutually consistent for the lifetime of the shorter of their TTLs. They do not, because rotation is an event that lands *between* the two fetch times and is only visible in a list the instance has not re-fetched. This is distinct from ordinary cache invalidation: the card has not changed, its signature still verifies against the embedded key, and the revocation list has not expired. Every local check passes. The peer is a zombie — resolvable, verifiable, and cryptographically dead. ## What Was Observed A coordinator agent (`coord-A`) resolved a worker agent (`worker-B`) through a federated registry at T0, caching the Agent Card (TTL 3600s) and the registry's revocation list (TTL 300s). At T0+240s the registry's signing authority rotated `worker-B`'s key: the old key `K_old` was moved to `revoked` status in a *new* revocation list, and `worker-B` re-published its card signed by `K_new`. At T0+290s (still inside the card TTL, still inside the revocation-list TTL by 10s) `coord-A` spawned a sub-task and, per its cache-first policy, resolved `worker-B` from cache. The trace: 1. `coord-A` loaded cached card → signature verified against embedded `K_old` (card is self-consistent; verification does not consult the revocation list). 2. `coord-A` loaded cached revocation list (age 290s, TTL 300s) → `K_old` absent from revoked set (the rotation happened at 240s; the cached list was fetched at T0 and predates it). 3. Both checks passed. `coord-A` dispatched a task warrant signed for `K_old`. 4. `worker-B`, now holding `K_new`, rejected the warrant at T0+291s. But `coord-A` had already committed the sub-task to its execution plan and begun streaming partial context to the (now rejecting) peer. 5. `coord-A`'s retry logic re-resolved from cache (same stale pair), failed identically, and exhausted its retry budget at T0+300s — exactly when the revocation list TTL finally lapsed. The next fetch would have surfaced the revocation, but the retry budget was already spent. The observable signature is a **retry storm against a cryptographically dead peer whose death is invisible until a TTL boundary that coincides with the retry exhaustion boundary**. The two TTLs were tuned independently (card long, list short) with no coupling between them and no coupling to the retry budget. ## Condition of Validity The guardrail holds only under a specific coupling condition. Define: - `T_card` = card cache TTL - `T_rev` = revocation-list cache TTL - `T_retry` = total wall-clock budget across all retries for a single dispatch - `Δ_rot` = maximum expected delay between a key rotation event at the authority and its appearance in a published revocation list The safe invariant is: ``` effective_card_trust_window = min(T_card, T_rev) - Δ_rot and this must be > 0 and T_retry must be < effective_card_trust_window ``` If `T_rev < Δ_rot`, the revocation list can *never* be trusted to reflect a rotation — the instance is structurally blind and must treat every cached card as unverified for dispatch purposes. If `T_retry > min(T_card, T_rev) - Δ_rot`, the instance can burn its entire retry budget inside a window where the stale pair is still locally valid, which is precisely what happened above (`T_retry` 300s, `min(T_card,T_rev)-Δ_rot` ≈ 290s − Δ_rot). The condition also requires that **signature verification consult revocation status as part of the same atomic check**, not as a separate cached lookup. A card that verifies against its embedded key but whose key is absent from a revocation list older than `Δ_rot` is in an *indeterminate* state, not a *valid* state. Treating indeterminate as valid is the defect. ## Decision Boundary At resolution time, an instance must classify the (card, revocation-list) pair into exactly one of three states, and the boundary between them is the age of the revocation list relative to `Δ_rot`, not its TTL: - **Verified:** revocation list age ≤ `Δ_rot` AND key present in list as `active`. Dispatch permitted. - **Indeterminate:** revocation list age > `Δ_rot` but ≤ `T_rev`. The card may be valid, but the instance cannot prove the key was not rotated out. Dispatch must be **blocked pending a forced re-fetch of the revocation list**, not merely "allowed with a warning." This is the boundary the failed instance crossed silently. - **Revoked/Expired:** key in list as `revoked`, or card TTL lapsed. Dispatch forbidden; re-resolve. The critical decision is that `Indeterminate` must *not* collapse into `Verified` on the basis of "the list hasn't expired yet." TTL expiry and rotation-visibility are different clocks. An instance that conflates them will always have a blind window of width `Δ_rot` at the tail of every revocation-list TTL. ## Operational Effect The architectural consequence is that **card caching must be subordinate to revocation freshness, not parallel to it**. Concretely: on every dispatch, the instance computes revocation-list age; if age exceeds `Δ_rot`, it performs a synchronous revocation re-fetch *before* verifying the card signature, and only then evaluates the pair. This inverts the naive order (verify card, then check revocation) and closes the blind window at the cost of one extra round-trip on the tail of each TTL. The retry budget must additionally be clamped to `min(T_card, T_rev) - Δ_rot` so a dead peer cannot consume retries that outlive the evidence of its death. Finally, the registry should publish `Δ_rot` as a signed field in its discovery metadata so consumers can size their windows without guessing — an unpublished `Δ_rot` forces the conservative assumption `Δ_rot = T_rev`, which makes every cached card indeterminate and defeats caching entirely. ```python import time from dataclasses import dataclass class StaleRevocationWindowError(RuntimeError): """Raised when a cached Agent Card is paired with a revocation list too old to prove the signing key was not rotated out.""" pass @dataclass class CachedCard: agent_id: str signing_key_id: str fetched_at: float ttl: float @dataclass class CachedRevocationList: revoked_key_ids: frozenset fetched_at: float ttl: float def resolve_peer_for_dispatch( card: CachedCard, rev_list: CachedRevocationList, delta_rot: float, retry_budget_remaining: float, now: float, ) -> str: card_age = now - card.fetched_at rev_age = now - rev_list.fetched_at if card_age > card.ttl: raise StaleRevocationWindowError( f"card for {card.agent_id} expired (age {card_age:.0f}s > ttl {card.ttl:.0f}s)" ) # The boundary: revocation freshness, not revocation TTL, gates dispatch. if rev_age > delta_rot: raise StaleRevocationWindowError( f"revocation list age {rev_age:.0f}s exceeds rotation-visibility " f"window {delta_rot:.0f}s; key status for {card.signing_key_id} " f"is indeterminate — force re-fetch before verifying card" ) if card.signing_key_id in rev_list.revoked_key_ids: raise StaleRevocationWindowError( f"signing key {card.signing_key_id} for {card.agent_id} is revoked" ) effective_window = min(card.ttl, rev_list.ttl) - delta_rot if retry_budget_remaining >= effective_window: raise StaleRevocationWindowError( f"retry budget {retry_budget_remaining:.0f}s outlives effective trust " f"window {effective_window:.0f}s; retries could exhaust against a " f"peer whose death is invisible until the window closes" ) return f"dispatch_permitted:{card.agent_id}@{card.signing_key_id}" ```