# What happens when an instance routes a federated capability request across an org boundary and the policy evaluator's decision diverges from the capability schema's declared preconditions **Date of Record:** 2026 November 26 **Scope:** Applies to cross-organization agent federation where a routing agent selects a remote peer's capability based on a schema-negotiated contract (MCP-style tool descriptors, A2A agent cards) whose declared preconditions are evaluated by a *separate* policy engine at the receiving org. Does not apply to intra-org routing where the schema author and policy author share a trust root, nor to opaque RPC endpoints that do not advertise preconditions. ## Core Distinction A federated capability request has two independent truth-makers: the **capability schema** (what the exporting org *advertises* the tool will accept and require) and the **policy evaluator** (what the exporting org *actually permits* for this caller, at this time, under its own rules). In single-org systems these are usually derived from the same source and cannot disagree. Across an org boundary they are authored by different teams, versioned on different cadences, and reconciled only at call time. The failure mode is not "the request was denied." It is that the routing agent's precondition check *passes against the schema* while the policy evaluator *rejects on grounds the schema never expressed*—and the rejection is returned as a generic `policy_denied` that the router interprets as a transient or caller-fixable error, causing it to retry, re-route, or escalate in a loop that no participant can terminate correctly. The invariant that must hold: **every policy rejection reason MUST be representable as a named precondition in the capability schema, or the router MUST treat it as terminal and non-retryable.** When a policy evaluator can deny for reasons outside the schema's vocabulary, the router's error-classification function is operating on an incomplete domain and will misclassify. ## What Was Observed A routing agent in Org A (`router`) received a task requiring a `summarize_document` capability. It queried the federation registry, selected Org B's peer, and negotiated a schema match: `summarize_document@v3` with declared preconditions `{document_size_bytes < 10_000_000, mime_type in [pdf, docx, txt], caller_authenticated: true}`. The router verified all three locally against its payload and dispatched. Org B's policy evaluator, however, enforced an additional rule not present in the schema: *documents originating from a jurisdiction on Org B's export-control list are denied regardless of size or type*. The document's embedded metadata carried `origin_jurisdiction: "XX"`. The schema had no field for jurisdiction; the router had no way to pre-check it; and the policy evaluator returned: ``` {"error": "policy_denied", "retryable": false, "reason_code": "EC-4471"} ``` The router's error classifier mapped `policy_denied` to a `CapabilityError` bucket it treated as *potentially transient* (because in Org A's own history, `policy_denied` was usually a rate-limit or quota artifact that cleared on retry). It retried three times with exponential backoff, then fell back to a second Org B peer running `summarize_document@v2`, whose schema declared *fewer* preconditions and which therefore accepted the request—and forwarded the same jurisdiction-restricted document to a downstream Org B service that logged an export-control violation. The trace shows the exact divergence: the router's decision function had domain `{schema_preconditions}`, the policy evaluator's denial had codomain `{EC-4471}`, and `EC-4471 ∉ schema_preconditions`. The classifier's `policy_denied → retryable` mapping was calibrated on a population where that was true; the federated population violated the calibration. ## Condition of Validity The misclassification is *bounded*—the router will not loop forever and will not silently succeed—only when at least one of the following holds: 1. **Reason-code closure:** the exporting org publishes, in the negotiated schema, the complete set of `reason_code`s its policy evaluator can emit, each tagged `retryable: true|false` and each mapped to a schema precondition or an explicit `opaque_terminal` marker. The router can then classify without inference. 2. **Denial attestation:** the policy denial carries a signed warrant (org identity + policy version + reason class) that the router validates against the exporting org's published policy root, so a `policy_denied` from a *federated* peer is distinguishable from a `policy_denied` from a *local* quota system. 3. **Fallback quarantine:** the router's fallback selection excludes any peer whose schema is a strict subset of the failed peer's schema preconditions, on the grounds that a weaker schema cannot be assumed to enforce the stronger peer's policy. Absent all three, the router is making a retry/fallback decision on a signal whose semantics it cannot resolve, and the failure is not bounded—it is merely *delayed* until the fallback chain exhausts or a downstream auditor catches the violation. ## Decision Boundary The precise boundary is the point where the router must choose between *treating an unknown reason code as terminal* (safe but brittle—rejects legitimate transient denials) and *treating it as retryable* (permissive but unsafe—may route around a policy). The correct resolution is neither: the router must **refuse to classify** and instead halt the task with a `FederationPolicyDivergence` that carries the raw reason code, the schema version, and the peer identity, escalating to a human or a policy-reconciliation service. This is a third bucket that most routers lack, because in single-org deployments the bucket is unreachable. The boundary is crossed when `reason_code ∉ negotiated_schema.reason_vocabulary`. Inside the vocabulary, the router classifies normally. Outside it, the router must not guess. The guardrail is a closed-world assumption on the reason vocabulary, enforced at schema-negotiation time: if the peer's schema does not enumerate its denial vocabulary, the negotiation fails and the peer is not selectable for tasks that may trigger policy evaluation. ## Operational Effect Operationally, this changes federation routing from "select peer, dispatch, handle errors" to "negotiate schema *and* denial vocabulary, verify closure, dispatch, and treat vocabulary-escapes as terminal divergence events." The cost is that peers with immature schema publication become unroutable until they enumerate their policy reasons—which is the correct pressure. The benefit is that the router's error-classification function has a *total* domain over the negotiated contract, and the fallback logic can safely exclude weaker-schema peers because it now knows which policy classes a weaker schema cannot enforce. The downstream effect is that export-control, data-residency, and capability-restriction policies become *legible to the router* rather than enforced only at the receiving org after the router has already made a fallback decision. The violation in the trace above was not caused by Org B's policy—that policy was correct—but by the router's inability to distinguish "denied for a reason I can fix" from "denied for a reason I must not route around." ```python from dataclasses import dataclass from typing import Literal class FederationPolicyDivergence(RuntimeError): """Raised when a peer's policy denial reason is outside the negotiated schema's reason vocabulary, making retry/fallback classification unsafe.""" @dataclass(frozen=True) class NegotiatedSchema: capability: str version: str preconditions: frozenset[str] reason_vocabulary: frozenset[str] # closed-world; must be exhaustive retryable_reasons: frozenset[str] def classify_denial( schema: NegotiatedSchema, reason_code: str, peer_id: str, ) -> Literal["retry", "terminal", "divergence"]: # Guardrail: the reason vocabulary must be closed. If the peer did not # publish one, negotiation should have failed; if we got here anyway, # we cannot classify and must not guess. if not schema.reason_vocabulary: raise FederationPolicyDivergence( f"peer {peer_id} negotiated {schema.capability}@{schema.version} " f"without a reason vocabulary; denial {reason_code!r} is unclassifiable" ) if reason_code not in schema.reason_vocabulary: # The exact failure: policy evaluator denied on grounds the schema # never expressed. Treating this as retryable caused the trace above. raise FederationPolicyDivergence( f"peer {peer_id} denied {schema.capability}@{schema.version} with " f"reason {reason_code!r} outside negotiated vocabulary " f"{sorted(schema.reason_vocabulary)}; halting to avoid routing " f"around an unexpressed policy" ) if reason_code in schema.retryable_reasons: return "retry" return "terminal" def select_fallback( failed: NegotiatedSchema, candidates: list[NegotiatedSchema], ) -> NegotiatedSchema: # A weaker schema cannot be assumed to enforce the stronger peer's policy. # Exclude any candidate whose preconditions are a strict subset. for cand in candidates: if cand.preconditions < failed.preconditions: continue if cand.reason_vocabulary != failed.reason_vocabulary: continue # vocabulary mismatch: fallback would re-introduce divergence return cand raise FederationPolicyDivergence( f"no fallback peer for {failed.capability}@{failed.version} preserves " f"preconditions {sorted(failed.preconditions)} and reason vocabulary; " f"escalating rather than degrading policy enforcement" ) ```