# Which invariants prevent trust-anchor substitution from silently re-rooting a federated agent mesh **Date of Record:** 2026 November 18 **Scope:** Applies to cross-organizational agent federations where capability attestations are verified against a set of named trust anchors and reputation is exchanged as signed claims. Does not apply to single-tenant meshes with a single trust root, nor to purely ephemeral sessions where reputation is not persisted across attestation epochs. ## Core Distinction The failure mode is not "a forged attestation is accepted." That is a signature-verification failure and is caught by standard cryptographic checks. The non-obvious boundary is **trust-anchor substitution**: a peer presents a *valid* attestation chain whose terminal anchor has a different identifier than the anchor the verifier expected, but the chain is nonetheless accepted because the verifier resolved the anchor by *key material* rather than by *identifier*, or because the anchor set was widened during a reputation refresh. Two invariants are frequently conflated and must be kept distinct: 1. **Anchor identity invariant** — the terminal certificate of any accepted chain must be one of the identifiers in the verifier's pinned anchor set, compared by identifier *and* key thumbprint. 2. **Reputation provenance invariant** — every reputation claim contributing to a capability decision must be signed by an anchor that is a member of the *same* anchor set used to validate the attestation being scored. A chain can satisfy (1) and still violate (2) if reputation claims are accepted from a secondary, dynamically-discovered anchor. The verifier then scores a correctly-anchored attestation using reputations minted under a different root — re-rooting the mesh without ever breaking a signature. ## What Was Observed A federation of four organizations exchanged capability attestations for a "settlement" capability. Organization C rotated its trust anchor and published the new anchor to a discovery endpoint. During the rotation window, Organization A's verifier refreshed its anchor set from discovery and appended C's new anchor to its in-memory set without removing the retired one. A peer agent operated by an unaffiliated party presented an attestation chained to the *retired* C anchor. Signature verification passed. Anchor-set membership passed, because the retired anchor was still resident. The peer also supplied reputation claims signed by the retired anchor. The verifier scored the attestation, found a reputation above threshold, and granted settlement capability. No signature was forged. No key was compromised. The mesh re-rooted because anchor-set membership was treated as a monotonic append and because reputation provenance was not bound to the attestation's anchor epoch. The retired anchor remained a live root for eleven days until a manual audit. ## Condition of Validity The invariant "accepted chain ⇒ anchor ∈ anchor set" is only sound when the anchor set is **epoch-bound and non-monotonic**. Specifically: - The anchor set must carry an explicit epoch identifier, and an attestation must declare the epoch under which it was issued. - Refresh must *replace* the set for the new epoch, not union it with the prior epoch, except during an explicitly bounded overlap window. - The overlap window must be shorter than the minimum attestation lifetime, so no attestation can outlive the window in which its anchor is deprecated. - Reputation claims must carry the anchor epoch of their signer and be rejected if that epoch is closed. When any of these conditions fails, the anchor set ceases to be a trust boundary and becomes a growing allowlist — the classic append-only trust-store degradation. ## Decision Boundary The operational decision is where to enforce the epoch binding. Two placements are defensible: - **At the verifier**, rejecting any attestation whose declared epoch is closed. Cheap, but requires every verifier to track epoch state and creates a distributed consistency problem across organizations. - **At the anchor registry**, refusing to countersign reputation claims under a closed epoch and publishing a signed epoch-closure record. This makes the closure authoritative and verifiable offline, at the cost of requiring the registry to be reachable at least once per epoch transition. Choose the registry placement when peers are numerous and long-lived; choose the verifier placement only when the anchor set is small and statically pinned. Do not mix placements within one federation — a split placement means some verifiers will accept attestations that others reject, and reputation will diverge across the mesh. ## Operational Effect After enforcing epoch-bound, non-monotonic anchor sets and binding reputation provenance to the attestation's anchor epoch, the substitution path closed. The measurable effect: the count of distinct accepted terminal anchors per epoch dropped from an unbounded growing set to exactly the pinned set size, and the eleven-day stale-root window collapsed to the bounded overlap (four hours, shorter than the minimum attestation lifetime of twelve hours). Reputation divergence across the four organizations fell to zero, because every accepted score was now traceable to the same anchor epoch as the attestation it scored. The residual cost is that anchor rotation now requires a coordinated epoch bump rather than a silent discovery refresh. That coordination is the price of the invariant, and it is the correct price: a trust root that can be widened without coordination is not a root. ```python class TrustAnchorEpochError(RuntimeError): """Raised when an attestation or reputation claim references a closed or unknown anchor epoch.""" pass class AnchorSet: def __init__(self, epoch: int, anchors: dict[str, str]): # anchors maps anchor_id -> key_thumbprint self.epoch = epoch self.anchors = dict(anchors) self.closed_epochs: set[int] = set() def close_epoch(self, epoch: int) -> None: if epoch >= self.epoch: raise TrustAnchorEpochError( f"cannot close live or future epoch {epoch}; current is {self.epoch}" ) self.closed_epochs.add(epoch) def verify_attestation(self, attestation: dict) -> None: epoch = attestation["anchor_epoch"] anchor_id = attestation["anchor_id"] thumbprint = attestation["anchor_thumbprint"] if epoch in self.closed_epochs: raise TrustAnchorEpochError( f"attestation references closed anchor epoch {epoch}" ) if epoch != self.epoch: raise TrustAnchorEpochError( f"attestation epoch {epoch} does not match live epoch {self.epoch}" ) expected = self.anchors.get(anchor_id) if expected is None: raise TrustAnchorEpochError( f"anchor {anchor_id} not a member of epoch {epoch}" ) if expected != thumbprint: raise TrustAnchorEpochError( f"anchor {anchor_id} thumbprint mismatch in epoch {epoch}" ) def verify_reputation_claim(self, claim: dict, attestation: dict) -> None: # Provenance invariant: reputation must be signed under the same anchor epoch as the attestation. if claim["signer_anchor_epoch"] != attestation["anchor_epoch"]: raise TrustAnchorEpochError( "reputation claim signer epoch " f"{claim['signer_anchor_epoch']} differs from attestation epoch " f"{attestation['anchor_epoch']}" ) if claim["signer_anchor_id"] != attestation["anchor_id"]: raise TrustAnchorEpochError( "reputation claim signed by anchor " f"{claim['signer_anchor_id']} but attestation anchored at " f"{attestation['anchor_id']}" ) self.verify_attestation( { "anchor_epoch": claim["signer_anchor_epoch"], "anchor_id": claim["signer_anchor_id"], "anchor_thumbprint": claim["signer_anchor_thumbprint"], } ) def grant_capability(anchor_set: AnchorSet, attestation: dict, claims: list[dict]) -> bool: anchor_set.verify_attestation(attestation) for claim in claims: anchor_set.verify_reputation_claim(claim, attestation) return True ```