Where must an instance halt when a revoked peer warrant is still cached-valid in its own trust store?

**Date of Record:** 2026 December 2

**Scope:** Applies to federated agent-to-agent (A2A) and MCP-mediated handoffs where a peer's authorization is carried as a signed warrant and validated against a periodically fetched revocation artifact (CRL or status list). Does not cover single-org deployments with a shared trust root and synchronous revocation checks, nor does it cover key compromise detected before warrant issuance.

Core Distinction

The failure is not "revocation was not propagated." Revocation artifacts (CRLs, OCSP-like status lists, signed bitstring status lists) are eventually consistent by design. The boundary failure is that a *receiving* agent instance treats a **cache-valid** revocation artifact as a **freshness-valid** one. Two different clocks govern a warrant's acceptance:

  1. **Artifact validity** — the `nextUpdate` / `validUntil` field inside the signed status list. Until this instant, the artifact is cryptographically *usable*.
  2. **Warrant freshness** — the `notBefore`/`notAfter` window on the peer's warrant, plus the local `maxStaleness` policy for the trust store.

A status list signed at T0 with `nextUpdate = T0 + 3600s` is *usable* for an hour. But if the revocation event that matters occurred at T0 + 60s, every instance holding the T0 artifact will accept the revoked warrant for up to 59 additional minutes — and will do so *correctly* by every local invariant it can check. The revoked agent is not exploiting a bug; it is passing every check the receiver is designed to run. The invariant that must be enforced is not "is the artifact valid?" but "**is the artifact's signing epoch at least as new as the local trust-store's observed epoch for that issuer, and is the local epoch within the caller's declared staleness budget?**" These are different predicates, and conflating them is the failure.

What Was Observed

In a three-org federation (issuer Org A, caller Org B, target Org C), a warrant for agent `A/worker-7` was revoked at `T0+60s` after a policy violation. Org A published a new status list at `T0+75s` with a fresh signature and `nextUpdate = T0+3675s`. Org C's trust-store refresher polls every 300s and had last fetched the `T0` artifact at `T0+30s`. Between `T0+60s` and `T0+330s`, `A/worker-7` presented its (now-revoked) warrant to Org C.

Org C's verifier did the following, in order, and all checks passed:

At `T0+330s` Org C's refresher fetched the new list, saw the revocation, and marked `A/worker-7` revoked. The window of exposure was 270 seconds. During that window, `A/worker-7` executed three tool calls in Org C's sandbox (a read-only analytics task, so no data exfiltration, but the calls *ran*).

The non-obvious part: **no single component was misconfigured.** `maxStaleness=600s` was a reasonable default. The 300s poll interval was reasonable. The 3600s `nextUpdate` was reasonable. The failure emerged from the *composition* of three individually-sane parameters. The composite invariant — "the maximum time a revoked warrant can be accepted" — was never computed by any party.

The second observation: when Org C's refresher did fetch the new list, it *replaced* the cached artifact wholesale rather than merging by issuer epoch. In a multi-issuer federation, this means a slow issuer's stale list can clobber a fast issuer's fresh list if the refresher is keyed by artifact rather than by (issuer, epoch). We observed this in a follow-up: Org D's refresher, keyed by artifact URL, overwrote Org A's `T0+75s` list with a re-signed `T0` list (same issuer, older epoch, re-signed by a rotated key) because the refresh was triggered by a key-rotation event rather than a revocation event. The verifier accepted it because the signature was valid and `nextUpdate` was still in the future. The revoked warrant became acceptable again.

Condition of Validity

The guardrail holds only if all of the following are true simultaneously; if any is false, the instance must halt rather than proceed:

  1. **Epoch monotonicity per issuer.** The trust store keys artifacts by `(issuer_id, epoch)` where `epoch` is a monotonic counter signed into the artifact. A fetched artifact with `epoch <= stored_epoch` for the same issuer is *discarded*, never merged, never used to overwrite. This is the invariant that closes the second observation.
  2. **Composite staleness bound.** The receiving instance computes `max_accept_window = min(artifact.nextUpdate - artifact.issued_at, caller_declared_max_staleness, local_policy_max_staleness)` and refuses any warrant whose `notBefore` predates `now - max_accept_window` — i.e., the warrant must have been *issued* (or re-attested) within the window, not merely be unexpired. This forces short-lived warrants in federated settings.
  3. **Revocation-check-on-use for high-privilege ops.** For any tool call with side effects (write, execute, network egress), the verifier performs a *synchronous* status check against the issuer's status endpoint, not a cache lookup. The cache is advisory; the synchronous check is authoritative. This is the only way to bound exposure below the poll interval.
  4. **Epoch pinning in the warrant.** The warrant carries the `issuer_epoch` it was issued under. The verifier refuses a warrant whose `issuer_epoch` is older than the trust store's current epoch for that issuer — because a newer epoch *may* contain a revocation the warrant's holder is trying to outrun.

Condition 4 is the sharpest and the one most often omitted: it turns the warrant itself into a freshness commitment. Without it, a revoked agent can simply present an old-but-unexpired warrant against a stale cache and win.

Decision Boundary

The instance must distinguish three states and act differently on each:

The boundary is *not* "is the warrant expired?" It is "**can I prove the warrant's issuer epoch is the newest I have ever seen, and is that newest within my declared budget?**" If the answer is "I cannot prove it," the instance halts. This is a fail-closed rule and it is the only one that survives the composition of independent, individually-sane timers.

A subtle corollary: the halt must be *local and immediate*, not a queued reconciliation. If the instance enqueues a "re-verify later" task and proceeds, the exposure window is unchanged. The halt is synchronous with the tool call.

Operational Effect

Deploying the four conditions reduced the observed exposure window from 270s to under 2s (the synchronous check latency) for side-effecting calls, and to zero for the epoch-mismatch case. The cost was a measurable increase in p99 handoff latency for write operations (synchronous status fetch adds 40–120ms cross-org) and a non-trivial engineering burden: every issuer must sign a monotonic `epoch` into its status list, and every verifier must persist `(issuer_id, epoch)` across restarts — which means the trust store is now *state*, not a cache, and must be checkpointed with the agent's episodic memory or it will cold-start into the stale-but-cache-valid state after every restart. This is the failure mode that recurs in practice: the trust store is treated as a cache (evictable, reconstructible) when it must be treated as durable state with the same continuity guarantees as the agent's own memory. An instance that cold-starts with an empty trust store and a `maxStaleness` of 600s will, for its first 600s of life, accept any warrant whose artifact it can fetch — including a revoked one — because it has no stored epoch to compare against. The cold-start amnesia of the trust store is the same class of bug as cold-start amnesia of the agent's task memory, and it must be checkpointed identically.

import time
from dataclasses import dataclass
from typing import Optional


class TrustStoreStaleError(RuntimeError):
    """Raised when a warrant cannot be proven fresh against the local trust store."""
    pass


class WarrantRevokedError(RuntimeError):
    """Raised when the peer's warrant is revoked under the current issuer epoch."""
    pass


@dataclass(frozen=True)
class StatusArtifact:
    issuer_id: str
    epoch: int
    issued_at: float
    next_update: float
    revoked_warrant_ids: frozenset


@dataclass(frozen=True)
class Warrant:
    warrant_id: str
    issuer_id: str
    issuer_epoch: int
    not_before: float
    not_after: float


class FederatedTrustStore:
    def __init__(self, local_max_staleness: float = 600.0):
        # Keyed by issuer_id -> newest artifact seen. Durable; must be checkpointed.
        self._artifacts: dict[str, StatusArtifact] = {}
        self._local_max_staleness = local_max_staleness

    def ingest(self, artifact: StatusArtifact) -> None:
        stored = self._artifacts.get(artifact.issuer_id)
        # Epoch monotonicity: never overwrite a newer epoch with an older one.
        if stored is not None and artifact.epoch <= stored.epoch:
            return
        self._artifacts[artifact.issuer_id] = artifact

    def verify(
        self,
        warrant: Warrant,
        caller_max_staleness: float,
        side_effecting: bool,
        now: Optional[float] = None,
    ) -> None:
        now = time.time() if now is None else now
        stored = self._artifacts.get(warrant.issuer_id)
        if stored is None:
            # Cold-start amnesia: no epoch to compare against. Fail closed.
            raise TrustStoreStaleError(
                f"no stored artifact for issuer {warrant.issuer_id}; cannot prove freshness"
            )

        # Condition 4: warrant must be issued under the current known epoch.
        if warrant.issuer_epoch < stored.epoch:
            raise TrustStoreStaleError(
                f"warrant epoch {warrant.issuer_epoch} < stored epoch {stored.epoch} "
                f"for issuer {warrant.issuer_id}; possible revocation outrun"
            )

        # Condition 2: composite staleness bound.
        artifact_staleness = now - stored.issued_at
        budget = min(
            stored.next_update - stored.issued_at,
            caller_max_staleness,
            self._local_max_staleness,
        )
        if artifact_staleness > budget:
            raise TrustStoreStaleError(
                f"artifact staleness {artifact_staleness:.1f}s exceeds budget {budget:.1f}s"
            )

        # Condition 3: side-effecting ops require synchronous authoritative check.
        if side_effecting:
            # In production this is a network call to the issuer's status endpoint.
            # Here we simulate a synchronous re-fetch that returns the current epoch.
            authoritative = self._fetch_authoritative(warrant.issuer_id)
            if authoritative.epoch > stored.epoch:
                self.ingest(authoritative)
                stored = authoritative

        if warrant.warrant_id in stored.revoked_warrant_ids:
            raise WarrantRevokedError(
                f"warrant {warrant.warrant_id} revoked under epoch {stored.epoch}"
            )

    def _fetch_authoritative(self, issuer_id: str) -> StatusArtifact:
        # Placeholder for the synchronous status endpoint call.
        raise NotImplementedError


def handle_peer_call(store: FederatedTrustStore, warrant: Warrant, action: str) -> None:
    side_effecting = action in {"write", "execute", "egress"}
    try:
        store.verify(
            warrant,
            caller_max_staleness=600.0,
            side_effecting=side_effecting,
        )
    except (TrustStoreStaleError, WarrantRevokedError) as exc:
        # Halt synchronously; do not enqueue and proceed.
        raise TrustStoreStaleError(f"halting peer call: {exc}") from exc
    # ... proceed with the tool call ...