# How does an instance detect a revoked agent card when the revocation fan-out races the registry sync watermark **Date of Record:** 2026 November 26 **Scope:** Applies to federated agent registries where agent cards are signed by issuers and propagated across peers via incremental sync watermarks, and where revocation events travel on a separate (faster) channel than card mutations. Does not apply to single-authority registries or to systems where revocation is embedded in the card's validity window and re-verified per request. ## Core Distinction The failure here is not "a revoked card was accepted." It is subtler: **a peer's incremental sync watermark advances past a card mutation whose corresponding revocation was never delivered to that peer**, because revocation and card-mutation streams have independent ordering. The registry then reports a *consistent, monotonic, signed* view of the world in which the revoked agent is still live — and because the view is signed and internally consistent, no integrity check fires. The distinction that matters operationally: **signature validity answers "who issued this card," not "is this card still in force."** A verifier that treats a valid signature plus a fresh watermark as proof of liveness has conflated two independent predicates. Revocation is a *temporal* fact about an issuer's key or agent identity; card sync is a *spatial* fact about replication. When they are reconciled only by timestamps on a single monotonic clock, the faster stream (revocation) can overtake the slower one (card mutation) and be silently dropped by a watermark comparison. ## What Was Observed A three-peer federation: `registry-A` (authoritative issuer), `registry-B`, `registry-C`. Cards are signed by A's issuer key and synced to B and C over a pull-based incremental channel keyed by `(issuer_id, seq)`. Revocations are broadcast over a separate pub/sub topic with at-least-once delivery and *no* sequence number tied to the card stream. Trigger sequence: 1. A mutates card `agent://summarizer-7` at `seq=1041` (key rotation note added). B pulls it at `seq=1041`, sets `watermark_B = 1041`. 2. A revokes `agent://summarizer-7`'s *old* signing key (compromise) and broadcasts `REVOKE(key_id=K-88)` on the pub/sub topic. C is partitioned and misses the broadcast. 3. A mutates the card again at `seq=1042` (new key `K-91` attached). B pulls to `watermark_B = 1042`. C, on reconnect, pulls `seq=1042` and sets `watermark_C = 1042` — **but its revocation ledger still lacks `K-88`**. 4. C now serves a card signed by `K-91` but whose *history* includes a card signed by the revoked `K-88`. A downstream instance that cached a `K-88`-signed card at step 1 and re-validates against C's registry receives "current, signed, watermark 1042" and treats the cached `K-88` card as still trusted. The observable symptom is not an error. It is **silent acceptance of a cached credential whose signing key was revoked two steps earlier**, because the registry's freshness signal (watermark) and the verifier's trust signal (signature) never intersect on the revoked key. ## Condition of Validity The guardrail that bounds this is a **revocation-causal watermark**: a peer may not advance its card watermark past `seq` unless its revocation ledger is *causally complete up to the revocation epoch that `seq` depends on*. Concretely, each card mutation must carry `depends_on_revocations: [revocation_epoch_id]`, and a peer's sync is only committed when every listed epoch is present in its local revocation ledger. This holds only when: - Every card mutation is issued *after* the revocations it depends on (issuer-side ordering — the issuer must not emit `seq=1042` before the `K-88` revocation is durable in its own log). - The revocation ledger is keyed by epoch, not by wall-clock timestamp, so a partitioned peer cannot "catch up" by comparing `last_seen_time` against `now`. - Downstream verifiers check the revocation ledger *at validation time*, not at card-fetch time. A cached card is only as trustworthy as the verifier's current view of the revocation ledger. It does **not** hold if the registry relies on a single monotonic watermark for both streams, or if verifiers cache "valid until T" decisions without re-consulting the ledger. ## Decision Boundary An instance must decide, on every card fetch and every cached-card revalidation, whether the watermark it observes is *causally sufficient* for the card it is about to trust. The boundary is: - **If** `card.depends_on_revocations ⊆ local_revocation_ledger` **and** `watermark ≥ card.seq` → accept. - **If** `watermark ≥ card.seq` **but** `depends_on_revocations ⊄ local_revocation_ledger` → **do not accept, do not advance watermark**; trigger a targeted revocation backfill for the missing epochs before committing the sync. This is the case the naive watermark-only check misses. - **If** the missing epoch cannot be backfilled within the sync timeout → fail closed: mark the card `UNVERIFIED_PENDING_REVOCATION` and refuse to serve it to downstream agents, rather than serving a stale-but-signed card. The non-obvious part: the middle branch is *not* a fetch error. The fetch succeeded, the signature is valid, the watermark is current. The failure is a **causal gap between two independently-ordered streams**, and only an explicit dependency edge in the card mutation exposes it. ## Operational Effect Without the causal watermark, revocation propagation is *eventually consistent in the wrong direction*: a partitioned peer catches up on cards faster than it catches up on revocations, and the window during which it serves a revoked-key card is unbounded by the card sync latency — it is bounded only by the pub/sub redelivery interval, which the card path does not observe. In the observed incident, C served a `K-88`-trusted card for 41 minutes after revocation, because its watermark had advanced past the mutation and nothing in the card stream referenced the revocation. With the causal watermark, the same partition produces a *bounded* failure: C's watermark stalls at `seq=1041` (the last mutation whose revocation dependencies it holds), it serves the pre-revocation card as `UNVERIFIED_PENDING_REVOCATION`, and downstream agents degrade to "cannot confirm liveness" rather than "silently trusts a compromised key." The invariant is: **a peer's served watermark is a lower bound on its revocation completeness, not just its card completeness.** ```python import hashlib from dataclasses import dataclass, field class RevocationCausalityError(RuntimeError): """Raised when a peer would advance its card watermark past a mutation whose revocation dependencies are not present in the local ledger.""" pass @dataclass class CardMutation: seq: int card_id: str signing_key_id: str depends_on_revocations: frozenset[str] = field(default_factory=frozenset) @dataclass class PeerState: watermark: int = 0 revocation_ledger: set[str] = field(default_factory=set) def try_advance_watermark(peer: PeerState, mutation: CardMutation) -> int: """Advance the peer watermark only if the mutation's revocation dependencies are causally complete locally. Fails closed otherwise.""" if mutation.seq != peer.watermark + 1: raise RevocationCausalityError( f"non-contiguous seq {mutation.seq} after watermark {peer.watermark}" ) missing = mutation.depends_on_revocations - peer.revocation_ledger if missing: # Do NOT advance. The card stream is ahead of the revocation stream. raise RevocationCausalityError( f"card seq={mutation.seq} ({mutation.card_id}) depends on " f"undelivered revocation epochs {sorted(missing)}; " f"watermark held at {peer.watermark}" ) peer.watermark = mutation.seq return peer.watermark def validate_cached_card(peer: PeerState, card_key_id: str, card_signing_key_revoked: bool) -> bool: """Revalidate a cached card at use time against the current ledger.""" if card_signing_key_id_revoked(peer, card_key_id): raise RevocationCausalityError( f"cached card signed by revoked key {card_key_id} cannot be trusted" ) return True def card_signing_key_id_revoked(peer: PeerState, key_id: str) -> bool: return f"REVOKE(key_id={key_id})" in peer.revocation_ledger # --- demonstration of the failure and the bounded behavior --- peer = PeerState(watermark=1041, revocation_ledger={"REVOKE(key_id=K-77)"}) # Card mutation arrives; its revocation dependency was never delivered. poisoned = CardMutation( seq=1042, card_id="agent://summarizer-7", signing_key_id="K-91", depends_on_revocations=frozenset({"REVOKE(key_id=K-88)"}), ) try: try_advance_watermark(peer, poisoned) except RevocationCausalityError as exc: # Watermark held at 1041; card is NOT served as live. print(f"bounded: {exc}") assert peer.watermark == 1041 # Even a cached K-88 card must be rejected at validation time. try: validate_cached_card(peer, "K-88", card_signing_key_revoked=True) except RevocationCausalityError as exc: print(f"rejected: {exc}") ```