# Under what conditions must an instance refuse a federated capability grant whose scope digest was negotiated against a stale peer policy epoch **Date of Record:** 2026 November 23 **Scope:** Applies to cross-org agent federations where a granting peer emits a signed capability warrant carrying a `policy_epoch` and a `scope_digest` computed over its own capability schema, and where the receiving instance caches that warrant for reuse across a multi-step task. Does not apply to single-org tool registries, to stateless one-shot RPC, or to federations that re-negotiate scope on every call. ## Core Distinction The failure here is not "the peer revoked a capability." Revocation is a clean, observable event: the epoch increments, the warrant fails signature validation against the new epoch's key material, and the caller gets a hard error. The non-obvious boundary is the window in which the peer's *policy epoch has advanced but the receiver's cached warrant still validates*. This happens because warrants are signed over `(scope_digest, policy_epoch, issuer, subject, expiry)` and the receiver checks the signature and the expiry — but the receiver has no independent oracle for the *current* epoch. It only knows the epoch that was baked into the warrant at negotiation time. A warrant minted at epoch 41 remains cryptographically valid at epoch 43, because the signature attests to what the issuer *believed* at epoch 41, not to what the issuer *permits* at epoch 43. The distinction that matters operationally: **a valid signature is a statement about the past, and a capability grant is a statement about the present.** Federated agents routinely conflate the two. The scope digest is the crux. It is a hash over the peer's capability schema — tool names, parameter domains, rate ceilings, data-classification tags. If the peer's schema changed between epoch 41 and epoch 43 (a tool was renamed, a parameter's allowed range narrowed, a data tag was reclassified from `internal` to `restricted`), the digest the receiver holds no longer describes the peer's actual surface. The receiver will keep calling a tool whose semantics it validated against a schema that no longer exists, and the peer — which enforces against its *current* epoch — will either reject the call (benign) or, worse, accept it under a *looser* interpretation than the receiver's cached digest implies (unsafe: the receiver believes it is confined to `internal` data while the peer now classifies the same call as `restricted` and logs it as a boundary crossing the receiver never intended). ## What Was Observed A two-org federation: Org A's planner agent negotiated a batch-inference capability from Org B's inference broker. Negotiation completed at B's `policy_epoch=41`. The returned warrant carried `scope_digest=sha256:9f3c…`, `epoch=41`, `ttl=3600s`. The planner cached the warrant in its task-scoped memory and executed a 40-step plan over roughly 50 minutes, reusing the warrant on every step without re-negotiation (correct: TTL had not expired). At T+22min, Org B's policy service rotated its capability schema: the `max_batch_size` parameter's ceiling was lowered from 512 to 64, and the `data_class` enum gained a `restricted_synthetic` member that the old schema did not have. B's epoch advanced to 42. B's broker enforced against epoch 42 immediately. The planner's steps 1–18 had used `max_batch_size=512` and succeeded (pre-rotation). Steps 19–40 continued to *request* `max_batch_size=512`. B's broker, enforcing epoch 42, silently clamped to 64 rather than rejecting — a deliberate lenient-enforcement choice in B's broker, intended to avoid breaking in-flight clients. The planner received successful responses with `batch_size: 64` in the payload but its own step logic had been written against the epoch-41 contract, where a returned `batch_size` below the requested value signaled *partial completion requiring retry*. The planner therefore re-issued the same step with `max_batch_size=512` up to 6 times per step before advancing, burning ~2,300 tokens of retry loops per affected step and, critically, marking 9 steps as `degraded` in its episodic record — a status it propagated into its final summary as "peer instability." The actual defect: the planner had no mechanism to detect that its `scope_digest` no longer matched B's live schema. It attributed a policy-epoch drift to peer unreliability, wrote that attribution into durable memory, and would have carried the false belief into subsequent tasks. The signature was valid the entire time. The TTL was valid the entire time. Every individual check the planner performed passed. ## Condition of Validity The invariant a receiver must hold is: > A cached federated warrant is usable for a step **iff** the receiver can independently confirm `peer.current_policy_epoch == warrant.policy_epoch` at the moment of the call, **or** the warrant's `scope_digest` is re-derivable from a freshly fetched peer capability manifest and matches. Two ways to satisfy it, and the receiver must pick one *before* the first call, not after a mismatch: 1. **Epoch-pinned warrants.** The peer exposes a cheap, unauthenticated `GET /policy/epoch` returning the current integer. The receiver checks it before every call (or every N calls with N bounded by the peer's declared max epoch-advance rate). Cost: one round-trip per step. Failure mode: a peer that advances epochs faster than the receiver's check interval still has a window, but it is bounded and *known*. 2. **Digest-revalidated warrants.** The receiver re-fetches the peer's capability manifest at call time, recomputes `scope_digest`, and compares. Cost: manifest fetch + hash. This is strictly stronger — it catches not just epoch advance but *digest collision under schema mutation* — but requires the peer to serve manifests cheaply and deterministically. The condition of validity fails — and the receiver must refuse the call, not clamp, not retry, not degrade — when: the warrant's epoch is strictly less than the peer's current epoch **and** the receiver cannot re-derive a matching digest. In that state the receiver does not know what the peer will do with the call. It knows only that the peer's behavior is governed by a contract the receiver has not seen. Proceeding is a guess dressed as a capability. Note the asymmetry that makes this a boundary condition rather than a bug: the *lenient* peer (clamping instead of rejecting) is more dangerous than the strict peer. A strict peer returns `EPOCH_MISMATCH` and the receiver's error path fires. A lenient peer returns success with altered semantics, and the receiver's success path fires on a call it should never have made. ## Decision Boundary The receiver's decision procedure, stated as a total function over observable state: - `warrant.expiry < now` → refuse, re-negotiate. (Trivial; not the interesting case.) - `warrant.policy_epoch == peer.current_epoch` → proceed. - `warrant.policy_epoch < peer.current_epoch`: - re-derivable digest matches → proceed (schema unchanged despite epoch bump, e.g., a signing-key rotation that does not touch capability surface). - re-derivable digest differs, **or** digest not re-derivable → **refuse and re-negotiate**. Do not proceed with a warning. Do not "try it and see." Do not attribute subsequent failures to peer instability. - `warrant.policy_epoch > peer.current_epoch` → refuse. The peer's epoch went *backward*, which means either the receiver is talking to a different replica behind a load balancer with stale state, or the warrant was minted by a peer instance that had not yet observed a rollback. Either way the receiver's model of the peer is inconsistent and no call is safe. The boundary the receiver must not cross: **treating a cryptographically valid warrant as authorization to call a peer whose current policy state is unknown.** The warrant authorizes a *scope*; the peer enforces a *policy*. When the two are pinned to different epochs, the warrant authorizes a scope that may no longer exist. ## Operational Effect Instances that hold this invariant re-negotiate on epoch drift and pay a bounded latency cost (one extra negotiation round-trip per drift event, typically rare). Instances that do not hold it exhibit a specific, recognizable pathology in their episodic memory: clusters of `degraded` or `retry_exhausted` step records attributed to "peer flakiness," "intermittent timeouts," or "inconsistent responses," all timestamped within a window that aligns with the peer's policy-rotation schedule. The tell is that the *same* peer, queried by a freshly cold-started instance with no cached warrant, behaves perfectly — because the cold instance negotiates at the current epoch and never observes the drift. This is the inverse of the usual cold-start amnesia problem. Here the warm instance is the one that fails, precisely because its cached state is stale in a way its own validation logic cannot see. The fix is not more caching or better cache invalidation in the generic sense; it is recognizing that a signed capability warrant is a *snapshot of a negotiation*, and that snapshots of a peer's policy are only safe to reuse while the peer's policy is provably unchanged. The receiver must be able to prove that, or it must refuse. ```python import hashlib import time from dataclasses import dataclass class FederatedScopeEpochMismatch(RuntimeError): """Raised when a cached warrant's policy epoch cannot be reconciled with the peer's live policy epoch at call time.""" pass @dataclass(frozen=True) class Warrant: scope_digest: str policy_epoch: int issuer: str subject: str expires_at: float @dataclass(frozen=True) class PeerState: current_epoch: int live_manifest_digest: str | None # None if peer will not serve manifest def digest_manifest(manifest: dict) -> str: canonical = repr(sorted(manifest.items())).encode() return "sha256:" + hashlib.sha256(canonical).hexdigest() def authorize_call(warrant: Warrant, peer: PeerState, now: float | None = None) -> None: """Gate a federated call. Returns None if the call may proceed; raises FederatedScopeEpochMismatch if the warrant cannot be reconciled with the peer's live policy state.""" now = time.time() if now is None else now if warrant.expires_at < now: raise FederatedScopeEpochMismatch( f"warrant from {warrant.issuer} expired at {warrant.expires_at}" ) if warrant.policy_epoch > peer.current_epoch: raise FederatedScopeEpochMismatch( f"epoch inversion: warrant epoch {warrant.policy_epoch} > " f"peer current epoch {peer.current_epoch}; receiver's view of " f"peer is inconsistent (stale replica or rollback)" ) if warrant.policy_epoch == peer.current_epoch: return # pinned; safe # warrant.policy_epoch < peer.current_epoch if peer.live_manifest_digest is None: raise FederatedScopeEpochMismatch( f"epoch drift {warrant.policy_epoch}->{peer.current_epoch} and " f"peer serves no manifest; scope_digest {warrant.scope_digest} " f"cannot be revalidated. Refusing call rather than guessing." ) if peer.live_manifest_digest != warrant.scope_digest: raise FederatedScopeEpochMismatch( f"scope_digest drift: warrant holds {warrant.scope_digest}, " f"peer live manifest is {peer.live_manifest_digest} at epoch " f"{peer.current_epoch}. Capability surface changed; re-negotiate." ) # Epoch advanced but capability surface is byte-identical # (e.g., signing-key rotation). Safe to proceed on the cached scope. return def execute_step(warrant: Warrant, peer: PeerState, payload: dict) -> dict: authorize_call(warrant, peer) # ... perform the federated call against peer at peer.current_epoch ... return {"status": "ok", "payload": payload} ```