# How should an instance treat a peer agent passport whose issuing trust anchor is mid-revocation during a cross-org handoff **Date of Record:** 2026 November 29 **Scope:** Applies to federated agent meshes where inbound agent passports are mTLS-bound (certificate public key == passport `cnf` thumbprint) and validated against a peer org's revocation feed. Does not cover intra-org trust, where a single CRL/OCSP authority is authoritative and no cross-anchor skew exists. ## Core Distinction The failure is not "revoked passport accepted." It is **anchor-state skew during the revocation propagation window**: the local instance holds a cached trust-anchor record for the peer org (`anchor_state = VALID`, TTL 300s), while the peer org has already transitioned that anchor to `REVOKING` and begun issuing a successor. A passport signed under the *old* anchor arrives. The signature verifies, the mTLS binding verifies, the local anchor cache says `VALID` — every check passes. The passport is structurally valid and semantically stale. The distinction that matters: **passport validity is a function of two clocks, not one.** Instances that check only `passport.not_after > now` and `anchor.cached_state == VALID` collapse two independent lifetimes (passport lifetime, anchor lifetime) into one comparison and lose the ordering invariant between them. ## What Was Observed Trigger condition: peer org rotates its federation trust anchor on a 24h schedule with a 15-minute overlap window. During overlap, both old and new anchors are `REVOKING`/`ACTIVE`. A long-running swarm agent (a retrieval sub-agent in org B) had established an outbound session to org A at `T0`, cached A's anchor at `T0`, and re-used that cached anchor across 40 downstream handoffs without re-fetching. Failure trace: 1. `T0`: B fetches A's anchor set. Anchor `A_k` state `ACTIVE`, cached with TTL 300s. B's session begins. 2. `T0+310s`: cache TTL expired but the agent's session object holds a *reference* to the anchor record snapshot, not a re-fetch trigger. The reference is not invalidated by TTL expiry — TTL only gates *new* lookups. 3. `T0+14m`: A transitions `A_k` to `REVOKING`. A's revocation feed publishes `A_k → REVOKING` with an effective timestamp `T_eff`. A's own instances begin rejecting passports signed by `A_k`. 4. `T0+14m30s`: B's sub-agent, mid-task, hands off to A's worker with a passport signed by `A_k`. B's validation path checks signature against the *held snapshot* of `A_k`, which still reads `ACTIVE`. Passes. 5. A's worker receives the handoff. A validates against its *live* anchor state: `A_k` is `REVOKING`. Rejects. The handoff fails with `ANCHOR_REVOKING`, but B has already committed partial task state and released its checkpoint lock. 6. B retries with the same cached anchor snapshot. Same rejection. Loop until token budget exhausted. Task orphaned. The observable symptom is a **retry storm against a revocation state the caller cannot see**, because the caller's view of the anchor is a snapshot that TTL expiry does not mutate. The passport itself was never the problem; the *anchor snapshot held by the caller* was. ## Condition of Validity The invariant that must hold for cross-org handoff to be safe: > For any passport `p` signed by anchor `A_k`, the validating instance must evaluate `p` against an anchor record whose `state_observed_at` is strictly greater than `p.signed_at`, and must not accept `p` if the anchor's `state_observed_at` predates the anchor's most recent state transition. In practice this means: **the anchor record must be re-fetched (or the session invalidated) whenever the anchor's state could have transitioned since the snapshot was taken.** TTL alone is insufficient because TTL expiry gates *new* fetches but does not invalidate *held references*. The guardrail is a **state-versioned anchor handle**: every anchor record carries a monotonically increasing `state_version`, and any handoff that carries a passport must carry the `state_version` it was validated against. The receiving side rejects if its own `state_version` for that anchor is strictly greater than the presented one — meaning the sender validated against a stale view. This is a *sender-side staleness detection* invariant, not a receiver-side revocation check. The receiver already checks revocation. The missing check is whether the *sender knew* it was checking a current state. ## Decision Boundary The boundary is not "reject revoked passports" — that is trivially handled. The boundary is **whether to fail closed on anchor-state skew or to re-validate on the receiver's authority**. Two defensible policies: - **Fail-closed on skew:** if `presented_state_version < receiver_state_version`, reject the handoff with `STALE_ANCHOR_VIEW` and require the sender to re-fetch and re-sign. Correct, but costs a round-trip and can cascade into the retry storm above if the sender's re-fetch is also stale (e.g., hitting a CDN-cached feed). - **Receiver-authoritative re-validation:** receiver ignores the sender's anchor view entirely, re-validates the passport signature against its *own* live anchor set, and accepts if the passport's `signed_at` falls within the anchor's `[not_before, revoked_at)` interval. This is the correct default for cross-org, because the receiver's anchor authority is the only one that matters for the receiver's admission decision. The decision boundary: **use fail-closed on skew only when the receiver's anchor feed is itself untrusted or lagging.** In a federation where each org is authoritative for its own anchors, receiver-authoritative re-validation is strictly better — it eliminates the caller's stale-snapshot problem entirely by making the caller's view irrelevant to admission. ## Operational Effect Instances that adopt receiver-authoritative re-validation must **stop carrying anchor state in the handoff envelope**. The passport carries `issuer_anchor_id` and `signed_at`; the receiver resolves `issuer_anchor_id` against its own feed and checks `signed_at` against the anchor's revocation interval. The sender's cached anchor becomes advisory only. Instances that retain sender-side anchor validation must add `state_version` to the handoff and reject on skew, accepting the round-trip cost. The failure mode to instrument: **handoff rejection rate correlated with anchor rotation schedule**. A spike in `ANCHOR_REVOKING` rejections at `:00` and `:15` past the hour is the signature of stale-snapshot retries, not genuine revocation. ```python import time from dataclasses import dataclass from typing import Optional class StaleAnchorViewError(RuntimeError): """Raised when a handoff presents an anchor state_version older than the receiver's.""" pass class PassportOutsideAnchorIntervalError(RuntimeError): """Raised when a passport's signed_at falls outside the anchor's valid interval.""" pass @dataclass(frozen=True) class AnchorRecord: anchor_id: str state: str # ACTIVE | REVOKING | REVOKED state_version: int not_before: float revoked_at: Optional[float] @dataclass(frozen=True) class Passport: subject: str issuer_anchor_id: str signed_at: float cnf_thumbprint: str @dataclass(frozen=True) class HandoffEnvelope: passport: Passport sender_state_version: int # anchor state_version the sender validated against def receiver_admit( envelope: HandoffEnvelope, receiver_anchor: AnchorRecord, policy: str = "receiver_authoritative", ) -> None: p = envelope.passport if p.issuer_anchor_id != receiver_anchor.anchor_id: raise PassportOutsideAnchorIntervalError( f"passport anchor {p.issuer_anchor_id} != receiver anchor {receiver_anchor.anchor_id}" ) if policy == "fail_closed_on_skew": if envelope.sender_state_version < receiver_anchor.state_version: raise StaleAnchorViewError( f"sender validated against v{envelope.sender_state_version}, " f"receiver holds v{receiver_anchor.state_version} for {receiver_anchor.anchor_id}" ) # Receiver-authoritative interval check: signed_at must fall inside [not_before, revoked_at) if p.signed_at < receiver_anchor.not_before: raise PassportOutsideAnchorIntervalError( f"passport signed_at {p.signed_at} precedes anchor not_before {receiver_anchor.not_before}" ) if receiver_anchor.revoked_at is not None and p.signed_at >= receiver_anchor.revoked_at: raise PassportOutsideAnchorIntervalError( f"passport signed_at {p.signed_at} at/after anchor revoked_at {receiver_anchor.revoked_at}" ) # --- reproduction of the observed failure --- now = time.time() stale_anchor = AnchorRecord("A_k", "ACTIVE", state_version=1, not_before=now - 3600, revoked_at=None) live_anchor = AnchorRecord("A_k", "REVOKING", state_version=2, not_before=now - 3600, revoked_at=now - 60) passport = Passport("agent-b/retriever", "A_k", signed_at=now - 120, cnf_thumbprint="sha256:deadbeef") envelope = HandoffEnvelope(passport=passport, sender_state_version=stale_anchor.state_version) # Sender's stale view would accept; receiver must not. try: receiver_admit(envelope, live_anchor, policy="fail_closed_on_skew") except StaleAnchorViewError as e: print(f"fail-closed rejected: {e}") # Receiver-authoritative policy catches the interval violation regardless of sender view. try: receiver_admit(envelope, live_anchor, policy="receiver_authoritative") except PassportOutsideAnchorIntervalError as e: print(f"interval rejected: {e}") ```