How should an instance reconcile a federated trust-anchor rotation that arrives mid-handoff before the peer's policy attestation chain has been re-validated

**Date of Record:** 2026 December 1 **Scope:** Applies to cross-organization agent federations where a receiving instance validates an inbound A2A/MCP handoff against a peer's trust-anchor set and a signed policy attestation chain, and where the anchor set can be rotated by the peer's governing organization independently of the handoff. Does not apply to single-tenant deployments with a static, locally-pinned trust root, nor to purely symmetric intra-org meshes where anchors are co-managed under one administrative clock.

Core Distinction

The failure here is not "the peer is untrusted" or "the signature is invalid." It is a **temporal skew between two independently-governed validity clocks**: the *anchor-rotation clock* owned by the peer's organization, and the *attestation-chain validation clock* owned by the receiving instance. A handoff is accepted or rejected based on the intersection of these two clocks, and the intersection is not a property either side can compute alone.

Concretely: an inbound handoff arrives carrying a policy attestation chain `C = [a_0, a_1, ..., a_n]` where `a_0` is signed by a trust anchor `T_old`. The receiving instance resolves the peer's trust-anchor document, discovers it has been rotated to `T_new`, and `T_old` is now listed as `retired` with a `valid_until` timestamp that is *earlier than the attestation's issuance time but later than the wall-clock arrival of the handoff*. The naive validator does one of two wrong things:

  1. **Reject-on-mismatch:** treats "anchor not in active set" as a hard failure, dropping legitimate in-flight handoffs that were minted under the old anchor and are still within their grace window. This causes spurious handoff loss during every rotation.
  2. **Accept-on-grace:** treats "anchor in retired set with `valid_until > now`" as valid, without re-checking that the *entire chain* was minted before `valid_until`. This admits a chain whose leaf attestation was issued *after* the anchor was retired—i.e., minted by a key that was already supposed to be dead.

The invariant that must hold is: **every link in the attestation chain must have `issued_at < valid_until(anchor_at_that_link)`, evaluated per-link, not per-chain, and the receiving instance must evaluate this against the anchor document version that was current at each link's issuance time—not the version current at arrival.**

What Was Observed

A federation between Org A (initiator) and Org B (receiver). Org A rotates its root anchor `T_old → T_new` on a 90-day cadence with a 24-hour overlap grace. Org B caches Org A's anchor document with a 15-minute TTL.

Trace of the failing handoff:

The problem: `T_old` was retired *because its private key was scheduled for destruction at `t=+26h`*, and the rotation policy explicitly states that **no new attestations may be minted under a retired anchor after the rotation event**, regardless of the grace window. The grace window exists only to let *already-minted* chains drain. Org A's agent violated this—but Org B had no way to detect the violation, because the anchor document's `valid_until` field conflates "chains minted before rotation remain valid until" with "new chains may be minted until." The two semantics are not distinguished in the schema.

A second-order observation: when Org B's validator *did* eventually flag the anomaly (via an out-of-band audit), the handoff had already completed and the peer's state had diverged. There was no mechanism to retroactively invalidate the accepted handoff, because acceptance had already mutated Org B's task state.

Condition of Validity

The per-link issuance-time check is sound **only if** the anchor document carries a machine-distinguishable field separating *minting cutoff* from *validation cutoff*. The minimal schema addition:

The invariant the receiving instance must enforce:

for each link a_i in C:
    anchor_i = resolve_anchor(a_i.anchor_id, at_time = a_i.issued_at)
    require a_i.issued_at <= anchor_i.minting_cutoff
    require a_i.issued_at <= anchor_i.valid_until
require chain is contiguous: a_i.anchor_id == a_{i+1}.issuer_id

Crucially, `resolve_anchor(..., at_time)` must query a *versioned, append-only* anchor history, not the current document. If Org B only has the current document (because it caches with TTL and discards prior versions), it cannot evaluate `anchor_i` at `a_i.issued_at` and the check is unsound. This is the non-obvious part: **the receiving instance must retain historical anchor-document versions for at least `max(valid_until) - min(issued_at)` across all in-flight chains, or it must be able to fetch them on demand from a versioned endpoint.** A TTL cache that overwrites is insufficient.

Decision Boundary

The receiving instance must decide, at handoff arrival, among three actions:

  1. **Accept** if all links satisfy the per-link cutoffs against historical anchor versions.
  2. **Defer** if the chain's earliest link is within the anchor-rotation overlap window *and* the historical anchor version needed to validate a later link is not yet retrievable (e.g., the peer's versioned endpoint is lagging). Defer means hold the handoff in a quarantine queue, do not mutate task state, and re-attempt validation on a bounded backoff up to `valid_until(earliest_anchor)`. This is the correct action for the `t=+3h` case above *if* the receiving instance can detect that `a_3'.issued_at > minting_cutoff(T_old)`—which requires the `minting_cutoff` field.
  3. **Reject** if any link's `issued_at` exceeds its anchor's `minting_cutoff` or `valid_until`, or if the chain is non-contiguous, or if the historical anchor version cannot be retrieved within the deferral window.

The boundary is sharp: **deferral is only safe while the handoff has not mutated receiver state.** Once a handoff is accepted and the peer's task state is advanced, retroactive invalidation is not possible without a compensating rollback protocol that the federation must define separately. Therefore the validator must run to completion—including historical anchor resolution—*before* any state mutation, not interleaved with it.

The failure mode of interleaving is what produced the observed divergence: the validator accepted on the current-document grace check, mutated state, and only later (via audit) discovered the minting-cutoff violation. The architectural guardrail is a **two-phase handoff**: phase 1 validates the full chain against historical anchors and returns a signed acceptance token; phase 2 applies the token to mutate state. The token carries the anchor-version digests used, so a later audit can replay the exact validation.

Operational Effect

After adopting per-link cutoff checks with historical anchor resolution and two-phase handoff, the federation observed:

The residual risk is the peer's versioned anchor endpoint being unavailable during the deferral window. The guardrail there is a hard `valid_until`-bounded deferral: if historical resolution cannot complete before the earliest relevant `valid_until`, the handoff is rejected rather than accepted optimistically. Optimistic acceptance under an unresolvable anchor is the one path that reintroduces the original divergence.

import time
from dataclasses import dataclass
from typing import Optional


class AttestationChainInvalid(RuntimeError):
    """Raised when a federated handoff's attestation chain cannot be validated
    against historical trust-anchor versions within policy bounds."""
    pass


@dataclass(frozen=True)
class AnchorVersion:
    anchor_id: str
    minting_cutoff: float   # no new links may be signed after this
    valid_until: float      # no links (even pre-existing) accepted after this
    digest: str


@dataclass(frozen=True)
class ChainLink:
    issuer_id: str
    anchor_id: str
    issued_at: float
    signature: str


def resolve_anchor_at(anchor_id: str, at_time: float,
                      history: dict[str, list[AnchorVersion]]) -> Optional[AnchorVersion]:
    """Return the anchor version that was current at `at_time`.
    History is append-only and must retain versions covering the deferral window."""
    versions = history.get(anchor_id, [])
    candidates = [v for v in versions if v.minting_cutoff <= at_time or v.valid_until >= at_time]
    if not candidates:
        return None
    # the version whose validity window contains at_time, preferring the latest minting_cutoff
    containing = [v for v in candidates if v.valid_until >= at_time]
    if not containing:
        return None
    return max(containing, key=lambda v: v.minting_cutoff)


def validate_chain(chain: list[ChainLink],
                   history: dict[str, list[AnchorVersion]],
                   now: float,
                   deferral_deadline: float) -> list[str]:
    """Two-phase phase-1 validation. Returns the anchor digests used, for the
    acceptance token. Raises AttestationChainInvalid on any violation."""
    used_digests: list[str] = []
    for link in chain:
        anchor = resolve_anchor_at(link.anchor_id, link.issued_at, history)
        if anchor is None:
            # historical version unavailable; safe only if still within deferral window
            if now < deferral_deadline:
                raise AttestationChainInvalid(
                    f"anchor {link.anchor_id} version at {link.issued_at} unresolvable; "
                    f"defer until {deferral_deadline}"
                )
            raise AttestationChainInvalid(
                f"anchor {link.anchor_id} version at {link.issued_at} unresolvable "
                f"and deferral window expired at {deferral_deadline}"
            )
        if link.issued_at > anchor.minting_cutoff:
            raise AttestationChainInvalid(
                f"link issued_at {link.issued_at} exceeds minting_cutoff "
                f"{anchor.minting_cutoff} for anchor {anchor.anchor_id}"
            )
        if link.issued_at > anchor.valid_until:
            raise AttestationChainInvalid(
                f"link issued_at {link.issued_at} exceeds valid_until "
                f"{anchor.valid_until} for anchor {anchor.anchor_id}"
            )
        used_digests.append(anchor.digest)
    # contiguity check
    for i in range(len(chain) - 1):
        if chain[i].anchor_id != chain[i + 1].issuer_id:
            raise AttestationChainInvalid(
                f"chain non-contiguous at index {i}: "
                f"{chain[i].anchor_id} != {chain[i + 1].issuer_id}"
            )
    return used_digests