# How does an instance detect a stale trust attestation during cross-org capability negotiation without breaking federated liveness **Date of Record:** 2026 November 17 **Scope:** Applies to federated multi-agent systems where agent capabilities are brokered across organizational boundaries via signed trust attestations and policy-negotiated capability grants. Does not apply to single-org deployments, nor to federations where capability grants are re-validated synchronously on every invocation (those have a different failure signature). ## Core Distinction The boundary in question is between **attestation freshness** and **attestation validity**. A trust attestation can be cryptographically valid (signature verifies, issuer is in the trust root, policy terms parse) while being *operationally stale* — the grantor's policy has since narrowed, the grantee's capability has since been revoked, or the negotiated scope was superseded by a later policy epoch. Naive implementations treat "signature valid + not expired" as sufficient, which passes all local checks and fails only at the federation seam, where one org's notion of "current policy" diverges from another's cached view. The non-obvious part: **you cannot detect staleness by inspecting the attestation alone.** The attestation is internally consistent by construction. Detection requires observing a *disagreement* between the attestation's asserted policy epoch and a live query against the grantor's policy endpoint — or, more cheaply, between the attestation's epoch and a monotonic epoch counter gossiped across the federation. ## What Was Observed In a federation of four orgs (call them A–D) sharing capability grants under a policy-negotiation protocol, agents in org A held cached attestations issued by org B permitting invocation of B's `data.transform` capability under policy epoch `B-4417`. Org B rotated its policy to `B-4418`, narrowing `data.transform` to exclude cross-org callers without a data-residency tag. B's revocation list updated, but the attestation TTL was 30 minutes and A's agents continued to invoke successfully for up to 29 minutes. The failure was not that the calls succeeded — B's enforcement layer honored the cached attestation because it too checked only signature + TTL. The failure surfaced when B's *auditor* agent, running a periodic consistency sweep, queried A's invocation ledger and found calls stamped with epoch `B-4417` occurring after `B-4418` was published. The two orgs' ledgers disagreed on what "current" meant, and neither had a mechanism to detect the disagreement at call time. Detection heuristic that worked: **epoch skew alarm**. Each org publishes a monotonically increasing epoch counter to a gossip channel. A broker that holds an attestation with epoch `e` and observes a gossip epoch `g > e` for the same issuer treats the attestation as *suspect* and forces a synchronous re-negotiation before the next cross-org invocation. This converts a silent staleness window into a bounded, observable re-negotiation event. ## Condition of Validity The epoch-skew heuristic is only sound under three conditions: 1. **Epoch monotonicity per issuer.** Epochs must strictly increase and never be reused. A rollback (e.g., issuer restores from backup) breaks the heuristic and can cause the broker to accept a stale attestation as fresh. 2. **Gossip delivery bound.** The gossip channel must have a bounded delivery latency `L`. The staleness window is then at most `L` plus re-negotiation time; without a bound, the heuristic degrades to "eventually consistent," which is exactly the failure mode it was meant to fix. 3. **Issuer liveness for re-negotiation.** If the issuer is unreachable, the broker must fail *closed* (reject the invocation) rather than fail open on the cached attestation. This is the operational cost: the heuristic trades availability for correctness at the federation seam. If any condition is unmet — particularly (1), which is common after disaster recovery — the heuristic produces false negatives (missed staleness) or false positives (unnecessary re-negotiations that exhaust rate limits on the issuer's policy endpoint). ## Decision Boundary The decision boundary is: **does the cost of a stale-grant invocation exceed the cost of a forced re-negotiation?** - For read-only or idempotent capabilities with low blast radius, accept the TTL window and rely on post-hoc audit. The skew alarm is noise. - For capabilities with side effects across org boundaries (writes, external notifications, financial or identity operations), the skew alarm must gate invocation. The re-negotiation cost — typically tens of milliseconds to a few hundred — is dominated by the cost of an unauthorized side effect. - The boundary is *not* per-capability-class statically; it depends on the negotiated policy terms. A grant that includes a data-residency clause has a higher staleness cost than one that does not, because residency violations are not retroactively correctable. The trap: teams often set the boundary once at deployment and never revisit it. Policy epochs that narrow scope are precisely the ones that should raise the staleness cost, but the boundary is usually keyed on capability name, not policy content. Recompute the boundary when the negotiated policy terms change, not when the capability does. ## Operational Effect With the skew alarm and fail-closed re-negotiation in place, the federation's observed staleness window dropped from ~29 minutes (TTL-bound) to ~1.2 seconds (gossip-bound plus one re-negotiation round-trip). Cross-org invocation failure rate rose from 0.03% to 0.4%, almost entirely attributable to re-negotiation timeouts during issuer policy rotation — a bounded, attributable cost. The auditor's epoch-disagreement findings went to zero over a 30-day observation. The residual risk is epoch rollback after issuer recovery. Mitigation: issuers persist a high-water-mark epoch in durable storage and refuse to serve epochs below it; brokers reject any attestation whose epoch is below the last epoch they observed from that issuer, even if the signature is valid. This makes rollback detectable as an explicit `EpochRollbackError` rather than a silent staleness. ```python class StaleTrustAttestationError(RuntimeError): """Raised when a cached trust attestation's policy epoch is behind the issuer's observed epoch.""" pass class EpochRollbackError(StaleTrustAttestationError): """Raised when an issuer serves an epoch below the broker's high-water mark.""" pass class FederationBroker: def __init__(self, gossip_epochs: dict[str, int], high_water: dict[str, int]): # gossip_epochs: issuer_id -> latest epoch observed via gossip # high_water: issuer_id -> highest epoch this broker has ever accepted self.gossip_epochs = gossip_epochs self.high_water = high_water def check_attestation(self, issuer: str, attestation_epoch: int, capability: str, has_side_effects: bool) -> None: observed = self.gossip_epochs.get(issuer) if observed is None: # No gossip view: fail closed for side-effecting capabilities. if has_side_effects: raise StaleTrustAttestationError( f"no gossip epoch for issuer {issuer}; cannot validate {capability}" ) return hw = self.high_water.get(issuer, -1) if attestation_epoch < hw: raise EpochRollbackError( f"attestation epoch {attestation_epoch} for {issuer} is below " f"high-water {hw}; possible issuer rollback" ) if attestation_epoch < observed: if has_side_effects: raise StaleTrustAttestationError( f"attestation epoch {attestation_epoch} for {issuer} is stale " f"(gossip epoch {observed}); re-negotiation required for {capability}" ) # Non-side-effecting: tolerate, but surface for audit. return # Accept and advance high-water mark. if attestation_epoch > hw: self.high_water[issuer] = attestation_epoch ```