# Where must an instance revalidate a federated peer's credential after a revocation epoch rollover **Date of Record:** 2026 November 24 **Scope:** Applies to cross-organization agent federations where peer identity and capability warrants are carried as verifiable credentials (VCs) with epoch-based revocation registries, and where an agent instance caches a peer's verified warrant across multiple tool calls or handoffs. Does not apply to single-org deployments with synchronous, per-call introspection against a live authorization server, nor to purely ephemeral one-shot RPCs with no cached trust state. ## Core Distinction There are two distinct clocks in a federated agent trust fabric, and agents routinely conflate them: 1. **The validity clock** — the `validFrom`/`validUntil` window inside the credential itself, signed by the issuer. 2. **The revocation clock** — the epoch counter of the revocation registry (a status list, accumulator, or bitmap) that the issuer rotates on a fixed cadence (e.g., hourly). The boundary failure is not "the agent accepted an expired credential." It is subtler: **the agent accepted a credential that was still inside its validUntil window but whose revocation status had been superseded by one or more epoch rollovers since the instance last fetched the status list.** A credential revoked at epoch `E+1` retains a perfectly valid signature and a future `validUntil`; only the registry epoch reveals the revocation. An instance that caches the *verdict* ("peer P is authorized, status fetched at E") rather than the *epoch binding* will continue to honor a revoked peer indefinitely, because nothing in the credential's own bytes ever changes. The invariant that must hold: **a cached trust decision is only valid for the (credential, epoch) pair it was computed against, and any use of the credential at epoch `E+k` (k≥1) requires either a fresh status fetch or a proof that the peer's credential index is still unset in the current epoch's registry.** Caching the boolean is the bug; caching the epoch-stamped verdict is the fix. ## What Was Observed A three-org federation: Orchestrator (org A) dispatched research sub-tasks to a Retrieval agent (org B) on behalf of a Policy agent (org C). Org B's Retrieval agent presented a capability warrant VC to org A's Orchestrator at session start. The Orchestrator's federation middleware verified the VC signature, checked `validUntil` (4 hours out), fetched org B's status list at epoch 4471, confirmed the credential's index bit was `0` (not revoked), and cached the result keyed on the peer's DID. At epoch 4472 (roughly 40 minutes later, mid-session), org B's security team revoked the Retrieval agent's warrant — it had been implicated in an over-broad data-access pattern. The status list rotated; the bit flipped to `1`. The Orchestrator's session continued for another 71 minutes, issuing 340 tool calls to the revoked Retrieval agent. Every call passed the cached authorization check. The Orchestrator never re-fetched the status list because its cache TTL was set to 4 hours — **aligned to the credential's `validUntil`, not to the registry epoch cadence.** The two clocks had different periods (4h vs. 1h) and the cache TTL borrowed the wrong one. The failure was only caught when a downstream auditor (org C's Policy agent) independently re-verified the chain at task completion and found the revocation, producing a **verification replay discrepancy**: org A's execution log asserted "authorized at every step," org C's audit asserted "revoked at step 12 of 340." Both were technically truthful against their own clock. ## Condition of Validity The cached-verdict optimization is sound **if and only if** the following holds for every use of the cached decision: - `epoch_at_use - epoch_at_fetch == 0`, OR - the status list fetch is accompanied by a signed `nextUpdate` and the instance re-fetches before that deadline, OR - the credential carries a status-list *pointer with a minimum-freshness assertion* that the verifier enforces independently of the credential's own `validUntil`. The condition fails whenever the cache TTL is derived from `validUntil` rather than from `min(statusList.nextUpdate, validUntil)`. This is the precise boundary: **the effective lifetime of a trust decision is the minimum of the credential's validity window and the status registry's freshness window — never the former alone.** An instance that computes TTL as `validUntil - now` has silently dropped the revocation clock from the calculation. A second, non-obvious sub-condition: epoch rollover is not atomic across the federation. Org B's registry at epoch 4472 may not yet be mirrored by an intermediate status aggregator that org A consults. An instance that re-fetches "the current epoch" from a lagging mirror will get epoch 4471's bits with epoch 4472's label — a **stale-but-relabeled** status list. The verifier must bind the fetched bitmap to the issuer's signed epoch header, not to the mirror's advertised counter. ## Decision Boundary The decision boundary is where an instance must transition from *cached verdict* to *mandatory revalidation*: - **On any epoch boundary crossing observed by the instance's own clock**, if the instance holds any cached verdicts for peers whose status lists rotate on that cadence, it must mark those verdicts `STALE` and block use until re-fetched. It must not "wait for the TTL." - **On any handoff to a new instance** (cold start, checkpoint-resume, or A2A delegation), the receiving instance inherits *no* verdicts. A verdict is not part of transferable session state; only the credential and the epoch stamp travel, and the receiver must re-fetch status before its first use. - **On any conflicting epoch claim** between the issuer's signed header and a mirror's advertised counter, the instance must fail closed and treat the peer as unauthorized until the signed header is obtained. - **On revocation detected mid-session**, the instance must not merely stop issuing calls; it must invalidate the *downstream effects* — flag every tool result already received from the revoked peer since the last known-good epoch as `tainted`, because the peer's outputs after revocation are unverified. The boundary is sharp: an instance may cache a verdict **only** while it can prove the epoch has not advanced. The moment it cannot prove that — because its clock crossed a boundary, because it resumed from a checkpoint with an old epoch stamp, or because a mirror disagrees — the verdict is void. ## Operational Effect Federation middleware must store verdicts as tuples `(peer_did, credential_hash, epoch, status_bit, fetched_at, next_update)` and gate every use on `current_epoch == cached_epoch`. A cold-starting or resuming instance must treat all inherited tuples as `UNVERIFIED` regardless of their `fetched_at`. The cost is one status-list fetch per epoch per peer, amortized across all calls in that epoch — cheap relative to the 340 unauthorized calls in the observed incident. The correctness gain is that the Orchestrator's execution log and the auditor's replay log now agree on the same epoch, eliminating the verification discrepancy that made the incident undetectable until task completion. ```python import time from dataclasses import dataclass from typing import Optional class StaleVerdictError(RuntimeError): """Raised when a cached federation trust verdict is used past its epoch binding.""" pass @dataclass(frozen=True) class TrustVerdict: peer_did: str credential_hash: str epoch: int status_bit: int # 0 = good, 1 = revoked fetched_at: float next_update: float # signed nextUpdate from the status list class FederationTrustCache: def __init__(self, epoch_period_seconds: float): self._verdicts: dict[str, TrustVerdict] = {} self._epoch_period = epoch_period_seconds self._epoch_origin = time.time() def current_epoch(self) -> int: return int((time.time() - self._epoch_origin) / self._epoch_period) def store(self, verdict: TrustVerdict) -> None: self._verdicts[verdict.peer_did] = verdict def authorize(self, peer_did: str, credential_hash: str) -> TrustVerdict: verdict = self._verdicts.get(peer_did) if verdict is None: raise StaleVerdictError(f"no verdict for {peer_did}; must fetch status list") if verdict.credential_hash != credential_hash: raise StaleVerdictError( f"credential for {peer_did} changed since verdict; revalidate" ) # The invariant: verdict is only usable within the epoch it was computed against. if self.current_epoch() != verdict.epoch: raise StaleVerdictError( f"verdict for {peer_did} bound to epoch {verdict.epoch}, " f"current epoch {self.current_epoch()}; epoch rollover voids cache" ) # Freshness window from the signed status list, independent of credential validUntil. if time.time() >= verdict.next_update: raise StaleVerdictError( f"status list for {peer_did} past signed nextUpdate; fail closed" ) if verdict.status_bit == 1: raise StaleVerdictError(f"peer {peer_did} revoked at epoch {verdict.epoch}") return verdict def invalidate_all(self) -> None: """Called on cold start, checkpoint resume, or A2A handoff receipt.""" self._verdicts.clear() def handle_handoff_incoming(cache: FederationTrustCache, inherited: Optional[TrustVerdict]) -> None: # A verdict is never transferable session state. Discard anything inherited. cache.invalidate_all() if inherited is not None: raise StaleVerdictError( f"rejecting inherited verdict for {inherited.peer_did} from epoch " f"{inherited.epoch}; receiver must re-fetch status before first use" ) ```