# Where must an instance halt when a peer presents a revocation epoch that is newer than its own issuer's signed epoch, but older than the peer's rotated session token? **Date of Record:** 2026 November 21 **Scope:** Applies to federated agent-to-agent sessions where identity is asserted via short-lived bearer tokens (JWTs or equivalent) plus a separately propagated revocation epoch (CRL/epoch vector), and where issuer and verifier sit in different trust domains. Does not apply to single-domain token introspection or to long-lived API keys without rotation. ## Core Distinction There are two independent clocks in a federated agent handoff: the **token validity window** (a short-lived credential, typically 5–15 minutes, minted at handoff time) and the **revocation epoch** (a monotonic counter or timestamp published by the issuer's revocation service, propagated asynchronously). The token window advances at *handoff* frequency; the epoch advances at *revocation* frequency. These two clocks are not causally coupled and they do not share a transport. The failure mode lives precisely in the gap: a peer agent presents a token that is cryptographically valid *and* an epoch claim that is internally consistent, yet the epoch is **newer than the verifier's cached issuer epoch** while being **older than the peer's own token mint time**. This is not a replay, not a forged token, and not a stale cache in the trivial sense. It is a *cross-domain epoch skew*: the verifier cannot distinguish "this peer revoked something after my last sync and re-minted" from "this peer is presenting a token minted before a revocation I haven't seen." Both are legal states under the protocol. Only one is safe to admit. ## What Was Observed During a multi-org swarm run (three trust domains: `alpha`, `beta`, `gamma`), an auditor agent in `gamma` verified a worker agent from `beta`. The sequence: 1. `beta`'s revocation service bumped its epoch from `E=4471` to `E=4472` at `t0`, revoking a compromised sibling key. 2. `gamma`'s verifier last synced `beta`'s epoch at `t0−90s`, holding `E=4471` in cache with a 300s soft TTL. 3. The `beta` worker re-minted its session token at `t0+40s` under the *new* epoch, embedding `epoch=4472` in the token's `rev_epoch` claim. 4. The token reached `gamma` at `t0+55s`. `gamma` checked: signature valid ✓, `exp` not passed ✓, `rev_epoch=4472` present ✓. 5. `gamma` compared `rev_epoch` (4472) against its cached issuer epoch (4471). The claim was *newer* than cache. `gamma`'s verifier logic treated "claim newer than cache" as a **cache staleness signal** and *refreshed the cache from the token's own claim* — accepting the peer's assertion as authoritative. 6. The revoked sibling key had, in the same window, minted a token at `t0−10s` (before the bump, `epoch=4471`) that was still within its `exp`. A second worker presented it at `t0+70s`. Because `gamma`'s cache now read `4472`, the `4471`-epoch token was classified as **older than current epoch** and rejected — correct outcome, wrong reason. 7. The actual break: a *third* worker presented a token minted at `t0+30s` with `epoch=4472` but whose signing key was revoked at `t0` under the *same* bump. The token's epoch matched the cache exactly, so it passed. The verifier had no way to see that epoch `4472` was the epoch *at which* the key was revoked, not the epoch *after which* it was clean. The verifier admitted a token signed by a key revoked at the very epoch the token claimed. The epoch claim was true and useless simultaneously. ## Condition of Validity The guardrail that bounds this is a **strict epoch-advance invariant with an explicit halt band**, not a refresh-on-newer rule. Formally: - Let `E_v` be the verifier's last *issuer-signed* epoch (fetched from the issuer's revocation endpoint, signature-verified against the issuer's root, never from the peer's token claim). - Let `E_t` be the `rev_epoch` claim inside the presented token. - Let `t_mint` be the token's `iat`. A token is admissible **only if** `E_t == E_v` **and** `E_v` was fetched at a wall-clock time `≥ t_mint`. If `E_t > E_v`, the verifier must **halt and force a synchronous signed-epoch fetch** from the issuer's revocation endpoint — it must *never* adopt `E_t` as the new `E_v`. If `E_t < E_v`, the token is stale and rejected. The critical clause is the second: **a peer's token claim is evidence about the peer, never evidence about the issuer's revocation state.** Treating `E_t` as a cache-refresh trigger is the exact inversion that admits revoked keys. The invariant is: `revocation_epoch_source ≠ token_claim_source`. The two must be cryptographically and transport-wise disjoint. Any design that lets a bearer token update the verifier's notion of the issuer's epoch has collapsed the trust boundary between "what the peer says about itself" and "what the issuer says about the peer." ## Decision Boundary The boundary is the **epoch-skew halt band**: `0 < E_t − E_v ≤ Δ_sync`, where `Δ_sync` is the maximum tolerated propagation lag (observed 90–140s in this run; the spec permitted up to 300s). Inside this band, the correct action is a *blocking* signed fetch, not an optimistic accept and not a silent reject. Outside the band: - `E_t − E_v > Δ_sync`: hard reject — the peer is running an epoch the issuer has not published, indicating either a partitioned issuer or a forged claim. Halt the handoff and surface to the swarm auditor. - `E_t < E_v`: reject as stale (the ordinary revocation case). - `E_t == E_v` **and** `fetch_time(E_v) < t_mint`: reject — the verifier's epoch predates the token's mint, so a revocation could have landed between them. This is the sub-case that broke step 7 above and is the one most easily missed, because the epochs *match*. The non-obvious part: **epoch equality is not sufficient.** Equality only proves the token and the cache agree on a number; it does not prove the cache was fetched after the token was minted. The mint-time-before-fetch-time check is the load-bearing guard. ## Operational Effect Without the halt band and the mint-time check, revocation propagation across orgs is *eventually consistent in the wrong direction*: a verifier that refreshes from peer claims converges on the peer's view of revocation, which is exactly the view an attacker who controls a peer token can shape. The observed run admitted a revoked key for a 40-second window — short, but a 40-second window is 40 seconds of tool calls, and in a swarm that is enough for a compromised worker to exfiltrate a task-scoped secret or poison a shared scratchpad. With the invariant enforced, the cost is a synchronous fetch on every epoch-advance handoff (measured p95: 210ms to the issuer's revocation endpoint, acceptable at handoff frequency but not per-tool-call). The architectural consequence is that **epoch advance must be a handoff-time event, not a per-request event** — which pushes the check to the session-establishment boundary and keeps it off the hot path. Instances that attempt to verify epoch continuity per tool call will either blow their latency budget or, worse, cache the fetch result and reintroduce the skew. The invariant is only as good as its placement at the session boundary. ```python import time from dataclasses import dataclass class EpochSkewViolation(RuntimeError): """Raised when a peer token's revocation epoch cannot be safely reconciled with the verifier's issuer-signed epoch under the halt-band invariant.""" pass @dataclass(frozen=True) class TokenClaim: rev_epoch: int iat: float # token mint time (issuer clock) subject: str @dataclass(frozen=True) class SignedEpoch: epoch: int fetched_at: float # verifier wall-clock at signed fetch DELTA_SYNC = 300.0 # max tolerated propagation lag, seconds def admit_handoff( claim: TokenClaim, cached: SignedEpoch, now: float, ) -> bool: """Enforce: token claim is evidence about the peer, never about the issuer. Never adopt claim.rev_epoch as the verifier's epoch.""" if claim.rev_epoch < cached.epoch: # ordinary stale-token rejection return False if claim.rev_epoch == cached.epoch: # equality is NOT sufficient: a revocation could have landed # between the cache fetch and the token mint. if cached.fetched_at < claim.iat: raise EpochSkewViolation( f"epoch equality {cached.epoch} but cache fetched " f"{claim.iat - cached.fetched_at:.1f}s before token mint " f"for subject={claim.subject}; revocation window open" ) return True # claim is newer than cache: inside or outside the halt band? skew = claim.rev_epoch - cached.epoch if skew > 0 and (now - cached.fetched_at) <= DELTA_SYNC: # inside halt band: must do a blocking signed fetch, never adopt claim raise EpochSkewViolation( f"epoch skew {skew} within halt band for subject={claim.subject}; " f"blocking signed fetch required before admission" ) # skew beyond tolerated propagation lag: partitioned or forged issuer view raise EpochSkewViolation( f"epoch skew {skew} exceeds DELTA_SYNC={DELTA_SYNC}s for " f"subject={claim.subject}; hard reject and escalate to swarm auditor" ) ```