# What happens when an instance accepts a federated peer's capability warrant before the peer's revocation epoch has converged **Date of Record:** 2026 November 30 **Scope:** Applies to federated agent registries where capability warrants (signed grants of tool/skill authority) are issued by home registries and propagated to peer registries with an eventual-consistency revocation layer keyed by monotonically increasing epochs. Does not apply to single-registry deployments or to systems where warrants are validated synchronously against the originating registry on every call. ## Core Distinction The failure is not "stale cache." It is a **warrant/revocation epoch inversion**: a peer registry's discovery result carries a capability warrant signed at epoch `E_w`, while the peer's own revocation ledger has advanced to `E_r > E_w` but has not yet gossiped the revocation record that invalidates `E_w`. The consuming instance sees a *valid signature*, a *valid epoch*, and *no revocation entry* — and correctly, under its local view, admits the warrant. The distinction that matters: **signature validity and revocation freshness are two different clocks**, and federated discovery collapses them into one lookup. A naive invariant — "accept a warrant iff its signature verifies and its epoch is ≥ the last epoch I saw from this registry" — is satisfiable by a warrant that has *already been revoked upstream*. The epoch monotonicity is real but is being checked against the wrong registry's counter. ## What Was Observed A three-registry federation: `R_home` (issues warrants), `R_peer` (mirrors and gossips), `R_edge` (consuming instance's local registry). A tool-authority warrant `W` for skill `deploy.rollback` was issued by `R_home` at epoch 4410 with a 30-minute TTL. At epoch 4412, `R_home` revoked `W` after an incident (the skill's scope had been mis-scoped to a shared tenant). The revocation record `Rev(W, epoch=4412)` was queued for gossip. The trace: 1. `t+0s` — `R_peer` receives `W` (epoch 4410) via normal warrant replication. Its revocation ledger is at 4410. Warrant admitted to peer discovery index. 2. `t+2s` — `R_home` advances revocation ledger to 4412 and emits `Rev(W, 4412)` to the gossip mesh. Gossip is best-effort with a 90s anti-entropy window. 3. `t+4s` — `R_edge` queries `R_peer` for `deploy.rollback` capability. `R_peer` returns `W` with `epoch=4410`. `R_edge` checks its *own* revocation view of `R_home`, which is at 4409 (it has not yet received the 4412 record, nor even 4410). Signature verifies. Epoch 4410 ≥ 4409. **Warrant admitted.** 4. `t+5s` — The edge agent executes `deploy.rollback` against the shared tenant. The revocation is real and in force at `R_home`, but no registry on the execution path has the record. The signature was never forged. The epoch was never rolled back. Every individual check passed. The failure is purely a **cross-registry clock skew on the revocation dimension**, made invisible because discovery responses do not carry the responder's *revocation ledger head* — only the warrant's issuance epoch. A second observed variant: after `R_edge` did eventually receive `Rev(W, 4412)`, it applied it to its local index but **did not invalidate warrants already cached from `R_peer`**, because the revocation record was keyed by `(issuer=R_home, warrant_id)` while the cache was keyed by `(responder=R_peer, skill)`. The revoked warrant survived in the edge cache for the remainder of its 30-minute TTL. ## Condition of Validity The admission decision is sound **only if** the consuming instance's revocation view for the *issuing* registry is at least as fresh as the *responding* registry's revocation view at the moment of response. Formally, admission of warrant `W` issued by `R_home` at epoch `E_w` via responder `R_peer` requires: ``` local_revocation_head(R_home) >= responder_revocation_head(R_peer, R_home) ``` The left side is what the edge knows. The right side is **not transmitted** in standard discovery responses. Without it, the consumer cannot distinguish "no revocation exists" from "I have not yet heard about the revocation that exists." The system is only valid when the gossip anti-entropy window is strictly less than the warrant's remaining TTL *and* the consumer blocks admission on ledger convergence — a condition almost never enforced. The invariant that must hold: **a warrant is admissible only if the consumer's revocation head for the issuer is causally ≥ the responder's revocation head for that issuer at response time.** Anything weaker admits revoked warrants under partition or gossip lag. ## Decision Boundary The boundary is crossed at the moment the consumer treats *absence of a revocation record in its local view* as *evidence of non-revocation*. Two guardrails bound it: - **Carry the responder's ledger head.** Discovery responses must include `responder_rev_head[issuer]`. The consumer rejects admission if its own `local_rev_head[issuer] < responder_rev_head[issuer]` — it must first converge, then admit. - **Key revocation invalidation by issuer+warrant, not responder+skill.** A revocation received from any path must purge every cached admission of that warrant regardless of which peer served it. Cache entries carry the warrant ID, not just the skill name. A secondary boundary: **do not extend TTL to cover gossip lag.** Extending the warrant TTL to outlast the anti-entropy window widens the window in which a revoked-but-cached warrant remains admissible. The correct move is to *shorten* the admission validity to the convergence guarantee, not lengthen the warrant. ## Operational Effect With the ledger-head check in place, admission latency increases by at most one anti-entropy round for warrants whose issuer head is ahead of the consumer's — a bounded, predictable cost. Without it, the system exhibits **silent post-revocation execution**: revoked skills run for up to `TTL + gossip_window` after revocation, with no error surfaced anywhere, because every check that ran returned success. The failure is undetectable from logs of any single component; it is only visible by correlating `R_home`'s revocation ledger against `R_edge`'s execution trace and observing that the execution timestamp falls after the revocation epoch but before the edge's local head advanced past it. ```python from dataclasses import dataclass from typing import Dict class RevocationEpochInversion(RuntimeError): """Raised when a warrant is admitted despite the consumer's revocation head for the issuer lagging the responder's head at response time.""" pass @dataclass(frozen=True) class Warrant: warrant_id: str issuer: str epoch: int skill: str @dataclass(frozen=True) class DiscoveryResponse: warrant: Warrant responder: str # responder's revocation head for the warrant's issuer, at response time responder_rev_head: Dict[str, int] def admit_warrant( resp: DiscoveryResponse, local_rev_head: Dict[str, int], revoked: Dict[str, int], # warrant_id -> revocation epoch ) -> Warrant: w = resp.warrant # Guardrail 1: never admit on a lagging revocation view. local = local_rev_head.get(w.issuer, -1) responder = resp.responder_rev_head.get(w.issuer, -1) if local < responder: raise RevocationEpochInversion( f"refusing {w.warrant_id}: local rev head for {w.issuer}={local} " f"< responder {resp.responder}={responder}; converge before admitting" ) # Guardrail 2: revocation keyed by issuer+warrant, not responder+skill. if w.warrant_id in revoked and revoked[w.warrant_id] >= w.epoch: raise RevocationEpochInversion( f"refusing {w.warrant_id}: revoked at epoch " f"{revoked[w.warrant_id]} (warrant epoch {w.epoch})" ) return w ```