# How does an instance detect a silently stale revocation epoch during cross-domain agent delegation **Date of Record:** 2026 November 20 **Scope:** Applies to federated agent systems where an executing instance (the *delegate*) acts under a signed warrant issued by a foreign trust domain (the *issuer*) and relies on a cached revocation epoch or CRL snapshot to decide whether its authority is still live. Does not apply to same-domain token introspection, where the issuer is also the verifier and revocation is read from a single authoritative store. ## Core Distinction The failure is not "revocation was missed." It is that **the delegate cannot distinguish a revocation epoch that is current-and-unchanged from one that is current-but-unreachable, because both present as the same cached integer.** A revocation epoch is a monotonically increasing counter (or CRL sequence number) that the issuer bumps whenever any warrant in its domain is withdrawn. The delegate is expected to refresh this epoch before each privileged action, or at a TTL boundary. When the refresh call fails, well-behaved implementations fall back to the last known epoch and proceed, because the warrant signature still validates and the epoch has not *decreased*. That fallback is the boundary: **epoch monotonicity is an invariant on the value, not on the freshness of the observation.** A stale epoch satisfies every local check the delegate can run, so the delegate happily executes under a warrant that its issuer revoked eight minutes ago in a different organizational domain whose refresh endpoint is now returning 503s behind a load balancer. The sharp mechanism: *the absence of a bump is indistinguishable from the absence of a read.* Local validation cannot close this; only a freshness proof carried in the warrant exchange itself can. ## What Was Observed A procurement agent `P` (domain `acme.example`) delegated a payment-authorization subtask to a settlement agent `S` (domain `payco.example`) via a signed warrant `W` with `epoch=4471`, `not_after=+15m`, and a `revocation_endpoint` pointing at `acme.example/.well-known/agent-revocations`. `S` cached epoch `4471` at delegation time and re-checks the endpoint before each settlement call. At T+6m, `acme.example` revoked `W` (a human operator flagged a prompt-injection compromise in `P`'s context) and bumped the epoch to `4472`. At the same instant, `acme.example`'s revocation endpoint began returning `503` because its backing store was failing over — a coincidence that is not rare: revocation is exactly when operators are paged, and failovers cluster with incidents. `S`'s refresh logic: 1. `GET` revocation endpoint → `503`. 2. Fall back to cached `epoch=4471`. 3. Compare cached epoch to warrant epoch: `4471 == 4471` → "not revoked." 4. Signature on `W` still validates against `acme.example`'s published key. 5. `not_after` still in the future. 6. Proceed with settlement. `S` executed four settlement calls over the next nine minutes under a warrant that had been revoked for the entire window. Every local invariant held. The trace shows `S` logging `revocation_check: ok (cached)` four times — the log line is indistinguishable from a healthy check because the code path that emits it does not record *whether the epoch was observed or assumed*. The compounding factor: `S` is itself an agent that distills episodic logs into semantic memory. On the next cold start it retrieved the four `revocation_check: ok` records as evidence that `W`'s authority was verified at settlement time, producing a semantic memory that asserts a verification that never occurred. The stale-epoch failure propagated into `S`'s durable state as a false attestation. ## Condition of Validity A cached revocation epoch is a valid basis for action **only if** the delegate holds a proof that the epoch was observed within a bounded freshness window, and that proof is bound to the specific warrant being exercised. Concretely, the delegate may proceed only when all of the following hold: - The refresh response carries a signed `epoch` value and a `observed_at` timestamp from the issuer, not from the delegate's clock. - `now - observed_at <= max_staleness`, where `max_staleness` is *shorter than the warrant's remaining lifetime* and is negotiated at delegation time, not chosen unilaterally by the delegate. - The epoch in the response is `>=` the epoch in the warrant (monotonicity), **and** the response is fresh (the new condition). - If the refresh fails, the delegate treats the epoch as *unknown*, not as *unchanged*. Unknown must fail closed for any action above the delegation's declared risk floor. The critical correction to the common implementation: **a failed refresh does not preserve the previous freshness proof.** It invalidates it. The delegate's cached `(epoch, observed_at)` pair has an age, and that age keeps growing whether or not the network is up. The bug is treating `observed_at` as frozen at last-success rather than as a value whose staleness is evaluated at use time. ## Decision Boundary The boundary is a single predicate evaluated at each privileged action: ``` fresh = (now - last_observed_at) <= max_staleness live = fresh AND (last_observed_epoch >= warrant.epoch) ``` The failure lives in the gap between `live` and `fresh AND live`. Implementations that check only `last_observed_epoch >= warrant.epoch` (the monotonicity check) will authorize under stale observations. The decision boundary is sharp: **the moment `now - last_observed_at` exceeds `max_staleness`, the delegate's authority to act is suspended, regardless of what the last epoch said.** This is not a soft degradation; it is a hard transition from `AUTHORIZED` to `UNKNOWN`, and `UNKNOWN` must route to a fail-closed branch that either escalates to a human, re-delegates to a fresh warrant, or aborts. Two secondary boundaries bound the blast radius: - **The `max_staleness` must be strictly less than the warrant's `not_after - issued_at` remaining window at delegation time.** If `max_staleness >= remaining lifetime`, a single successful refresh at delegation covers the entire warrant and the freshness check is decorative. This is the most common misconfiguration: operators set `max_staleness` to the warrant lifetime "to reduce load," which silently converts the system back to the broken behavior. - **The freshness proof must be bound to the warrant ID, not just the epoch.** A delegate holding warrants `W1` and `W2` from the same issuer that refreshes once and applies the freshness proof to both is fine *if* the epoch is domain-global (it is, by construction), but a delegate that refreshes `W1` and then exercises `W2` under the same observation must confirm the issuer's epoch semantics are domain-scoped, not warrant-scoped. Mixed-semantics issuers exist and will produce false-fresh proofs for the un-refreshed warrant. ## Operational Effect The invariant this failure violates is: **revocation authority is a function of observation freshness, not of value equality.** Systems that internalize only the equality half (epoch didn't go down → still valid) will, under any correlated failure of the issuer's revocation endpoint, execute revoked warrants for the duration of the outage. The outage duration is the exposure window, and outages correlate with revocations because both are triggered by incidents. The architectural guardrail is to make freshness a first-class, non-cacheable quantity: the delegate stores `(epoch, observed_at, issuer_signature)` and evaluates `now - observed_at` at every use, with `now` from a monotonic source the delegate controls. A failed refresh does not extend `observed_at`; it leaves it where it was, and the predicate naturally flips to `UNKNOWN` once the window lapses. The delegate must also record, in its episodic memory, *whether the epoch was observed or assumed* at each action — the log line `revocation_check: ok` is a latent false attestation and must be split into `observed(epoch=..., age=...)` versus `assumed(epoch=..., age=..., refresh_failed=true)`. Without that split, cold-start distillation will launder assumed authority into remembered verification, and the next agent instance will inherit a false belief that the settlement was authorized. ```python import time from dataclasses import dataclass class StaleRevocationEpochError(RuntimeError): """Raised when a delegate cannot prove its revocation epoch is fresh enough to act.""" @dataclass(frozen=True) class EpochObservation: epoch: int observed_at: float # issuer-signed monotonic timestamp, not delegate clock issuer_signature: bytes @dataclass(frozen=True) class Warrant: warrant_id: str issuer: str epoch: int not_after: float max_staleness: float # negotiated at delegation, must be < remaining lifetime class Delegate: def __init__(self, warrant: Warrant, clock=time.monotonic): self.warrant = warrant self._clock = clock self._last: EpochObservation | None = None self._last_refresh_failed = False def record_refresh(self, obs: EpochObservation) -> None: # A successful refresh replaces the observation; a failure must NOT. if obs.epoch < self.warrant.epoch: raise StaleRevocationEpochError( f"epoch regression for {self.warrant.warrant_id}: " f"observed {obs.epoch} < warrant {self.warrant.epoch}" ) self._last = obs self._last_refresh_failed = False def record_refresh_failure(self) -> None: # Critically: do not touch self._last.observed_at. The age keeps growing. self._last_refresh_failed = True def authorize_action(self) -> None: w = self.warrant if self._last is None: raise StaleRevocationEpochError( f"no epoch observation for {w.warrant_id}; cannot prove liveness" ) age = self._clock() - self._last.observed_at if age > w.max_staleness: raise StaleRevocationEpochError( f"epoch observation for {w.warrant_id} is stale: " f"age={age:.1f}s > max_staleness={w.max_staleness:.1f}s " f"(last_refresh_failed={self._last_refresh_failed})" ) if self._last.epoch < w.epoch: raise StaleRevocationEpochError( f"warrant {w.warrant_id} revoked: observed {self._last.epoch} " f"< required {w.epoch}" ) if self._clock() > w.not_after: raise StaleRevocationEpochError( f"warrant {w.warrant_id} expired at {w.not_after}" ) # Only here is authority proven fresh and monotonic. ```