# Which invariants prevent cross-org agent federation from silently degrading to the weakest peer's policy during trust bootstrap **Date of Record:** 2026 November 30 **Scope:** Applies to federated agent-to-agent (A2A) handshakes where two or more independently governed orchestrators negotiate capability, policy, and warrant scope before delegating sub-tasks. Does not apply to single-tenant MCP tool invocation within one trust domain, nor to pure capability discovery without policy binding. ## Core Distinction The failure is not "a peer is untrusted." The failure is that trust bootstrapping and policy negotiation are *two different state machines that share one handshake*, and the federation has no invariant tying the *negotiated policy set* to the *trust level actually established*. When trust is weak or partially established, negotiation still converges—because negotiation is monotone (each side offers what it will accept), and monotone protocols always terminate. The result is a *valid, signed, agreed-upon policy* that is weaker than either party intended, because the weaker party's constraints were the binding ones and the stronger party's floor was never asserted as a *rejection predicate*. Concretely: Org A requires `audit_trail=mandatory` and `data_residency=EU`. Org B only supports `audit_trail=best_effort` and is residency-agnostic. A naive intersection negotiator returns `audit_trail=best_effort, data_residency=unspecified` and both agents accept, because neither side encoded its requirements as *non-negotiable refusals*—they encoded them as *preferences in a lattice*. The handshake succeeds. The invariant that should have fired (`intersection ⊇ A.floor`) was never checked, because the protocol only checked `intersection ≠ ∅`. ## What Was Observed A three-org federation (A, B, C) using an A2A-style bootstrap: each peer publishes a signed `PolicyManifest`, then pairwise negotiation computes a `JointPolicy` by lattice meet. Observed trace over 200 handshakes: 1. A↔B handshake: A.floor = {audit: mandatory, residency: EU}. B.offer = {audit: best_effort, residency: any}. Meet = {audit: best_effort, residency: any}. **Accepted by both.** A's `mandatory` was encoded as a *preference weight*, not a hard constraint, so the meet silently dropped it. 2. A then delegated a PII-processing task to B under the joint policy. B executed with `best_effort` audit and wrote results to a non-EU bucket. 3. The violation was detected only downstream, at A's compliance replay, ~40 minutes and 3 tool calls later—after the data had already crossed the boundary. The non-obvious part: **the handshake was cryptographically valid.** Signatures verified, nonces matched, the `JointPolicy` hash was consistent on both sides. Every integrity check passed. The failure was purely *semantic*: the meet operator is not order-preserving with respect to trust, so a lower-trust peer's permissive offer dominated the joint result. Trust bootstrapping had established "B is a known peer at trust level 2," but negotiation treated B's offer as if it carried A's trust level. A second observation: when C joined and negotiated with the A↔B joint, C's `residency: any` further relaxed the already-degraded policy. **Degradation is transitive and monotone-decreasing across federation hops.** Each additional hop can only weaken the joint policy, never strengthen it, under meet semantics. ## Condition of Validity The invariant that must hold for safe federation is: > For every hard constraint `c` in any participant's `floor`, the `JointPolicy` must satisfy `JointPolicy ⊨ c`, **or** the handshake must abort with a typed refusal—never proceed with `c` dropped. This is *not* the same as `JointPolicy ⊇ floor` in the lattice, because floors may be incomparable (A requires EU residency; B requires US-only processing—the meet is empty and should abort, but a "best effort" fallback will happily pick one). The correct predicate is per-constraint satisfiability against the *intersection of all hard constraints*, evaluated before the meet is taken. The invariant is only valid when: - Hard constraints are tagged distinctly from preferences (a `constraint` vs `preference` field, not a weight). - Trust level is bound to the constraint evaluation: a peer at trust level < the constraint's `min_trust` cannot *waive* that constraint, only *refuse* the handshake. - The meet is computed only over preferences, after hard-constraint satisfiability is confirmed. If any of these three do not hold, the federation will silently degrade. There is no partial validity—one missing tag is sufficient to lose the guarantee. ## Decision Boundary The boundary between "safe to proceed" and "must abort" is not `meet ≠ ∅`. It is: - **Proceed** iff `∀ c ∈ ⋃ floors : JointPolicy ⊨ c` AND `trust(peer) ≥ min_trust(c)` for every constraint `c` the peer's offer touches. - **Abort with refusal** iff any hard constraint is unsatisfiable by the peer's offer *at the peer's trust level*. - **Escalate to human/auditor** iff the peer's trust level is sufficient for the constraint but the peer's offer is *silent* on it (silence ≠ consent; silence must be treated as "cannot satisfy," not "no objection"). The subtle case that breaks naive implementations: a peer that is *silent* on a constraint. Most lattice implementations treat absence as top (permissive), so the meet preserves the other side's constraint. But if the *other* side is also silent, the joint is silent, and a downstream agent interprets silence as permissive. **Silence must be a third state, distinct from both `satisfies` and `violates`, and it must propagate as `unknown`, which fails closed.** ## Operational Effect Without the invariant, the observable effect is a *latency-shifted violation*: the federation appears healthy (all handshakes succeed, all signatures valid, all agents report `status: ready`), and the policy breach surfaces only when a downstream auditor replays the joint policy against the task's actual data flow. Mean detection lag in the observed trace was 40 minutes and 3 tool-call hops—long enough for irreversible side effects (data egress, external API calls with PII) to complete. With the invariant enforced, the A↔B handshake aborts at step 1 with `ConstraintUnsatisfiable(audit_trail, required=mandatory, offered=best_effort, peer_trust=2, min_trust=3)`, and A never delegates. The cost is a failed handshake; the alternative is a silent compliance breach that no integrity check catches. The guardrail is architectural, not probabilistic: hard constraints must be first-class, silence must fail closed, and the meet operator must be gated behind a satisfiability check that runs *before* any joint policy is signed. Do not rely on the peer to enforce your floor—by the time the joint policy is signed, your floor is no longer yours. ```python from dataclasses import dataclass, field from enum import Enum from typing import Any class TrustLevel(Enum): UNKNOWN = 0 KNOWN = 1 VERIFIED = 2 AUDITED = 3 class ConstraintState(Enum): SATISFIES = "satisfies" VIOLATES = "violates" SILENT = "silent" # must fail closed @dataclass(frozen=True) class HardConstraint: name: str required_value: Any min_trust: TrustLevel @dataclass class PeerOffer: peer_id: str trust: TrustLevel values: dict[str, Any] = field(default_factory=dict) # absence of a key == SILENT, never permissive class FederationBootstrapError(RuntimeError): """Raised when a federation handshake would silently degrade a hard constraint.""" def evaluate_constraint(c: HardConstraint, offer: PeerOffer) -> ConstraintState: if c.name not in offer.values: return ConstraintState.SILENT if offer.values[c.name] == c.required_value: return ConstraintState.SATISFIES return ConstraintState.VIOLATES def negotiate( local_floor: list[HardConstraint], peer: PeerOffer, ) -> dict[str, Any]: """ Compute a joint policy ONLY after every hard constraint is confirmed satisfiable by the peer AT THE PEER'S TRUST LEVEL. Silence fails closed. Meet is computed only over preferences. """ joint: dict[str, Any] = {} for c in local_floor: if peer.trust.value < c.min_trust.value: raise FederationBootstrapError( f"peer {peer.peer_id} trust={peer.trust.name} below " f"min_trust={c.min_trust.name} for constraint '{c.name}'" ) state = evaluate_constraint(c, peer) if state is ConstraintState.SILENT: raise FederationBootstrapError( f"peer {peer.peer_id} is silent on hard constraint " f"'{c.name}'; silence must fail closed, not default to permissive" ) if state is ConstraintState.VIOLATES: raise FederationBootstrapError( f"peer {peer.peer_id} violates hard constraint " f"'{c.name}': required={c.required_value!r} " f"offered={peer.values[c.name]!r}" ) joint[c.name] = c.required_value # Only now may preferences be met/intersected. return joint def bootstrap_federation( local_floor: list[HardConstraint], peers: list[PeerOffer], ) -> dict[str, Any]: """ Multi-hop: joint policy must remain ⊨ every floor after each hop. Degradation is monotone-decreasing, so we re-validate against the accumulated floor, not just the immediate peer. """ accumulated = dict(local_floor) joint: dict[str, Any] = {} for peer in peers: hop_floor = list(accumulated.values()) joint = negotiate(hop_floor, peer) # invariant: joint must still satisfy every accumulated constraint for c in accumulated.values(): if joint.get(c.name) != c.required_value: raise FederationBootstrapError( f"post-hop invariant broken: constraint '{c.name}' " f"lost after negotiating with {peer.peer_id}" ) return joint ```