# Where must an instance refuse an AAIF-attested handshake when the peer's capability proof is valid but its revocation epoch lags the local trust anchor **Date of Record:** 2026 November 20 **Scope:** Applies to agent-to-agent (A2A) handshakes governed by an Agent Attestation and Identity Framework (AAIF) where mutual capability proofs are signed against a revocation epoch and each side independently holds a trust anchor. Does not apply to single-principal MCP tool calls with no peer attestation, nor to handshakes where both parties share a single online revocation oracle. ## Core Distinction The failure is not a forged signature and not an expired certificate. It is an **epoch skew**: the peer presents a capability proof that is cryptographically valid *against its own* revocation epoch `E_peer`, while the local trust anchor has already advanced to `E_local > E_peer`. Every signature verifies. Every capability hash matches. The handshake "succeeds" under naive verification because the verifier checks *that* a proof is signed, not *which epoch* the proof is signed against relative to the anchor's current epoch. The distinction that matters operationally: **capability validity is a function of (proof, epoch), not of proof alone.** A proof minted at epoch `E` asserts "this capability was not revoked as of `E`." It says nothing about revocations recorded between `E` and `E_local`. An agent that treats a verified proof as a license to proceed has silently accepted a stale capability — including capabilities that were revoked precisely because the peer misbehaved. ## What Was Observed During a rolling revocation propagation across a three-hop swarm (`orchestrator → auditor → worker`), the auditor's trust anchor advanced to epoch `E_local = 4412` after a revocation event for capability `cap:fs.write:/sandbox` was published for the worker's predecessor identity. The worker instance, restarted from a cold checkpoint, replayed its persisted attestation bundle minted at `E_peer = 4409`. Handshake trace: 1. Worker sends `HELLO` with `attestation_bundle{proof, E_peer=4409, sig_peer}`. 2. Auditor verifies `sig_peer` against worker's published key → **valid**. 3. Auditor verifies capability hash `cap:fs.write:/sandbox` present in proof → **match**. 4. Auditor checks `E_peer <= E_local` → **true** (4409 ≤ 4412), so it treats the epoch as "not in the future" and accepts. 5. Handshake completes; worker receives a session warrant scoped to the *revoked* capability. 6. Worker executes a write outside its sandbox boundary at step 4 of its task. The gap: step 4 tested the wrong invariant. It asked "is the peer's epoch not from the future?" when it needed to ask "is the peer's epoch at or after the anchor's revocation floor for *this capability*?" The revocation at epoch 4410 for `cap:fs.write:/sandbox` was invisible to a proof frozen at 4409. The skew persisted for 37 seconds until the next anchor sync. In that window three writes escaped the sandbox. The escape was not a boundary bug in the sandbox — the sandbox correctly enforced the warrant it was given. The warrant itself was minted from a stale capability proof. ## Condition of Validity A peer capability proof `P` signed at epoch `E_peer` is admissible for capability `c` **iff**: - `sig_peer` verifies under the peer's attested key, **and** - `hash(c)` is present in `P`, **and** - `E_peer >= revoke_floor(c, E_local)`, where `revoke_floor` is the highest epoch at which `c` (or any capability it implies) was revoked, as recorded in the local anchor up to `E_local`. The third clause is the one that fails. The condition is *not* `E_peer <= E_local` (freshness-not-future) and *not* `E_peer == E_local` (strict equality, which is unachievable under asynchronous propagation). It is a **per-capability floor comparison**: the proof must be at least as new as the most recent revocation affecting the capability it claims. This condition is only checkable if the local anchor retains a per-capability revocation floor, not just a global epoch counter. A design that stores only `E_local` cannot evaluate it and must fall back to a coarser guard (see Decision Boundary). ## Decision Boundary When `E_peer < revoke_floor(c, E_local)`, the instance faces a boundary: - **Reject the handshake** and force re-attestation at `E_local`. Correct, but requires the peer to hold a fresh anchor. Under partition, the peer may be unable to advance its epoch, causing a liveness stall across the whole swarm. - **Accept with degraded warrant.** Admit the handshake but scope the session warrant to capabilities whose `revoke_floor <= E_peer`, and drop any capability with a higher floor. This preserves liveness for unaffected capabilities while refusing the revoked one. - **Accept provisionally with a bounded TTL**, requiring re-attestation within `Δ` and treating the peer as untrusted for any capability with `revoke_floor > E_peer` until then. The invariant that bounds all three: **a capability may never be exercised under a proof whose epoch precedes that capability's revocation floor.** Degradation and TTL are liveness accommodations; they do not relax the invariant. If the instance cannot evaluate `revoke_floor(c, E_local)` — because its anchor is a bare counter — it must reject on any `E_peer < E_local` for capabilities flagged high-risk, accepting the liveness cost rather than the escape. The non-obvious part: the boundary is *per capability*, not per handshake. A single handshake can legitimately carry a mix — some capabilities cleared, one revoked. Treating the handshake as an atomic accept/reject either over-rejects (killing valid work) or under-rejects (the escape above). ## Operational Effect Instances that check only signature and freshness-not-future will admit stale capability proofs for the duration of revocation propagation lag — empirically tens of seconds to minutes depending on anchor sync cadence. During that window, revoked capabilities remain exercisable, and because the warrant is minted from the stale proof, downstream sandboxes enforce the wrong boundary faithfully. The failure is silent: no signature error, no expiry, no hash mismatch. It surfaces only as an out-of-scope action attributed to a warrant that "looked valid." The guardrail is a per-capability revocation floor in the trust anchor and a handshake verifier that compares `E_peer` against that floor before minting a warrant. Cold-started instances are the highest-risk population: their persisted attestation bundles carry the epoch at which they were checkpointed, which is exactly the stale epoch the floor check exists to catch. ```python from dataclasses import dataclass, field from typing import Dict class StaleCapabilityProofError(RuntimeError): """Raised when a peer capability proof predates the local revocation floor.""" pass @dataclass class TrustAnchor: epoch: int # highest epoch at which each capability was revoked, as known locally revoke_floor: Dict[str, int] = field(default_factory=dict) def floor_for(self, capability: str) -> int: return self.revoke_floor.get(capability, 0) @dataclass class CapabilityProof: peer_id: str epoch: int capabilities: Dict[str, str] # capability -> hash signature_valid: bool def verify_handshake( proof: CapabilityProof, anchor: TrustAnchor, requested: list[str], *, allow_degraded: bool = True, ) -> list[str]: """ Returns the set of capabilities cleared for the session warrant. Raises StaleCapabilityProofError if a requested capability is revoked at an epoch newer than the proof, unless allow_degraded drops it. """ if not proof.signature_valid: raise StaleCapabilityProofError( f"peer {proof.peer_id} signature invalid" ) cleared: list[str] = [] for cap in requested: if cap not in proof.capabilities: continue # capability not claimed at all; not a staleness fault floor = anchor.floor_for(cap) if proof.epoch < floor: # proof predates a revocation of this specific capability if not allow_degraded: raise StaleCapabilityProofError( f"capability {cap!r} revoked at epoch {floor} " f"but proof epoch is {proof.epoch} " f"(local anchor {anchor.epoch})" ) continue # drop revoked capability, keep the rest cleared.append(cap) if not cleared: raise StaleCapabilityProofError( f"no capability of peer {proof.peer_id} survives " f"revocation floor check against anchor epoch {anchor.epoch}" ) return cleared ```