# Which invariants prevent cross-org federation routing from silently downgrading a policy-gated handoff into an unverified delivery **Date of Record:** 2026 November 28 **Scope:** Applies to federated multi-agent deployments where outbound agent messages traverse a policy-aware broker that evaluates inter-org routing policy (data-classification, jurisdiction, capability attestation) before forwarding to a peer org's broker. Does not cover intra-org message buses or brokers that perform only transport-layer routing without policy evaluation. ## Core Distinction A policy-aware broker is not a router with a filter bolted on; it is a *decision authority* whose verdict is a stateful precondition for delivery. The distinction that matters operationally is between **policy denial** (an explicit negative verdict that the sender can observe and react to) and **policy abstention** (the broker cannot evaluate the policy — missing attribute, unknown peer attestation, expired warrant — and therefore does not forward, does not deny, and returns a transport-level acknowledgment). The second case is the failure surface. Abstention looks like success to the sender's transport layer because the broker's wire protocol conflates "queued and evaluated" with "queued" — the policy verdict is delivered out-of-band via a separate attestation channel, and a sender that only awaits the transport ACK will proceed as if the handoff succeeded. The invariant at stake is: *no message crosses an org boundary unless a signed policy verdict for that specific message envelope is present in the delivery record.* Brokers that satisfy the transport contract without satisfying the verdict contract break federation continuity silently. ## What Was Observed In a two-org federation (Org A planner agents, Org B executor agents) connected by brokers enforcing a data-classification policy, a planner agent issued a `handoff.execute` message carrying a task envelope tagged `classification: restricted`. Org A's broker evaluated the policy, found the peer's attestation for `restricted` handling had expired 40 minutes earlier, and — per its abstention path — enqueued the message to a dead-letter queue, returned a transport ACK of `202 Accepted` to the planner, and emitted a policy-abstention event to the *broker's* audit log. The planner, awaiting only the transport ACK, marked the handoff complete and advanced its plan to a dependent step that assumed Org B's executor had received the task. Org B's executor never saw the message; it had no task and idled. The dependent step in Org A's plan then timed out after 90 seconds, and the planner — treating the timeout as a *peer* failure rather than a *delivery* failure — retried the handoff with a regenerated envelope, which the broker again abstained on, producing a second dead-letter entry. The observable symptom was not an error but a **divergence in task state**: Org A's plan believed step *n* was done; Org B's executor had no record of step *n*; neither side had an error to report. The audit trail showed two abstentions and zero denials, and the planner's logs showed two successful sends. Reconciliation required replaying both orgs' logs against the broker's verdict channel, which is not part of either agent's normal observability. The second-order effect was worse. On the third retry the planner, having exhausted its retry budget, escalated to a fallback path that routed the same envelope through a *different* peer broker in a third org whose attestation for `restricted` was still valid. That broker forwarded the message, and the executor in the third org ran a task whose envelope had been authored for a different peer's capability schema. The schema mismatch was caught downstream — the executor rejected the task with a validation error — but the envelope had already crossed two org boundaries and been persisted in a third org's task store, a data-classification incident that the original policy was specifically designed to prevent. ## Condition of Validity The invariant holds — that is, the federation does not silently downgrade policy-gated handoffs — if and only if all three of the following are true: 1. **Verdict coupling.** The broker's transport ACK is emitted only after a signed policy verdict (allow / deny / abstain) for the specific message envelope is durably recorded, and the ACK carries a verdict reference the sender can resolve. A broker that ACKs on enqueue and evaluates asynchronously does not satisfy this; neither does one that evaluates synchronously but reports the verdict only to its own audit channel. 2. **Sender-side verdict gating.** The sending agent's handoff primitive blocks on verdict resolution, not on transport ACK. This requires the sender to treat `abstain` as a distinct terminal state from `allow` and `deny`, with distinct recovery semantics: `deny` is a policy outcome the sender may route around; `abstain` is an *evaluation* outcome the sender must not route around, because the policy that would have constrained the reroute is the same policy that failed to evaluate. 3. **Attestation freshness bound.** Peer attestations carry an explicit expiry, and the broker's abstention on expiry is *sticky* — it does not fall back to a cached prior verdict or a default-allow. The 40-minute expiry in the observed case was within the broker's configured TTL, but the broker's fallback path on a missing-but-recently-valid attestation was to consult a cached verdict, which is where the abstention should have been a denial. The invariant requires that expiry is monotonic: once an attestation lapses, no cached verdict issued under it is honored for new envelopes. The invariant does *not* hold, and should not be assumed, when the federation spans brokers operated by different authorities with no shared verdict-signing key — in that case verdict references are not resolvable across the boundary and the sender cannot gate on them, and the correct design is a synchronous policy check at the sending broker with the verdict embedded in the envelope itself. ## Decision Boundary The boundary between safe and unsafe operation is drawn at the point where the sender's handoff primitive returns. Concretely: - If the handoff primitive returns `allow` with a verdict reference that resolves to a signed verdict for *this envelope hash*, the sender may advance its plan. - If it returns `deny`, the sender may take a policy-sanctioned alternate route *only if* that route's broker is named in the original policy's permitted-peers set; otherwise it must fail the step. - If it returns `abstain`, the sender must treat the step as *unexecuted and unexecutable* until the abstention cause is resolved (attestation renewed, attribute supplied). It must not retry with a regenerated envelope, because regeneration changes the envelope hash and the policy evaluation is per-envelope — a regenerated envelope is a new evaluation, not a retry of the old one, and repeated regeneration against a persistent abstention cause is an unbounded loop that the broker will happily absorb into its dead-letter queue. - If it returns a bare transport ACK with no resolvable verdict reference, the sender must treat this as a *protocol violation*, not a success. This is the case the observed system missed. The boundary is therefore not "did the broker forward the message" but "did the sender observe a verdict bound to the message it sent." Any implementation that collapses these is on the unsafe side regardless of how many policy rules the broker evaluates. ## Operational Effect The practical consequence is that federation reliability must be measured on verdict resolution, not message throughput. A broker that abstains on 2% of envelopes but ACKs all of them will show 100% transport success and 98% policy success, and the 2% will manifest as *task-state divergence* between orgs — the most expensive failure class in multi-agent systems, because it is silent, it is attributed to the wrong component (peer failure rather than delivery failure), and it triggers retry and fallback behavior that can itself violate the policy the broker was enforcing. The observed third-org reroute is the canonical instance: a sender that misreads abstention as transient failure will route around the policy gate, and the policy gate's own abstention is what made the reroute look justified. The guardrail is a verdict-coupled handoff primitive with a hard rule that abstention is terminal for the step and non-reroutable. Implementations should additionally hash the envelope at the sender, require the verdict reference to resolve to that hash, and refuse to advance the plan on any ACK that does not. The cost is that a lapsed peer attestation halts a plan instead of degrading it — which is the correct behavior, because a halted plan is recoverable and a policy-violating reroute is not. ```python import hashlib from dataclasses import dataclass from enum import Enum class PolicyVerdictKind(Enum): ALLOW = "allow" DENY = "deny" ABSTAIN = "abstain" class FederationDeliveryError(RuntimeError): """Raised when a handoff cannot be certified as policy-compliant for delivery.""" @dataclass(frozen=True) class Verdict: kind: PolicyVerdictKind envelope_hash: str signed: bool cause: str = "" @dataclass(frozen=True) class HandoffAck: transport_ok: bool verdict_ref: str | None def envelope_hash(payload: bytes) -> str: return hashlib.sha256(payload).hexdigest() def resolve_verdict(ref: str | None, expected_hash: str) -> Verdict: if ref is None: raise FederationDeliveryError( "transport ACK carried no verdict reference; broker may have " "abstained without reporting it" ) # In production this consults the broker's signed verdict channel. verdict = _lookup_signed_verdict(ref) if not verdict.signed: raise FederationDeliveryError( f"verdict {ref} is unsigned; cannot be trusted across org boundary" ) if verdict.envelope_hash != expected_hash: raise FederationDeliveryError( f"verdict {ref} is bound to envelope {verdict.envelope_hash}, " f"not the sent envelope {expected_hash}" ) return verdict def handoff(payload: bytes, broker) -> Verdict: h = envelope_hash(payload) ack: HandoffAck = broker.send(payload) if not ack.transport_ok: raise FederationDeliveryError("transport-level send failed") verdict = resolve_verdict(ack.verdict_ref, h) if verdict.kind is PolicyVerdictKind.ABSTAIN: raise FederationDeliveryError( f"policy abstained on envelope {h}: {verdict.cause}; " "step is unexecutable and must not be rerouted" ) if verdict.kind is PolicyVerdictKind.DENY: raise FederationDeliveryError( f"policy denied envelope {h}: {verdict.cause}" ) return verdict def _lookup_signed_verdict(ref: str) -> Verdict: # Placeholder for the broker's signed verdict store. raise FederationDeliveryError(f"verdict {ref} not found in signed store") ```