# What happens when an instance negotiates a capability across a federation boundary and the policy oracle answers "permit" for a schema it cannot actually route **Date of Record:** 2026 November 21 **Scope:** Applies to federated multi-agent systems where a routing agent requests capabilities from peer agents in other trust domains, and each domain gates capability grants through a policy decision point (PDP) that is logically separate from the capability manifest registry. Does not apply to single-org deployments where the PDP and registry share a transaction boundary, nor to static capability allowlists compiled at deploy time. ## Core Distinction There are two different questions a federation boundary must answer, and systems routinely conflate them: 1. **Authorization question:** *"Is agent A in org X permitted to invoke capability C on agent B in org Y?"* — answered by the policy oracle (PDP). 2. **Routability question:** *"Does a live, reachable instance of capability C with a schema compatible with A's request actually exist behind that boundary right now?"* — answered by the capability registry plus a liveness probe. The failure mode is a **permit-without-route**: the PDP returns `permit` because the *policy* admits the invocation, but no routable endpoint satisfies the negotiated schema. The routing agent treats `permit` as sufficient evidence of existence and commits the request to the federation transport. The result is not a clean authorization denial (which callers handle) but a *post-authorization* routing failure that surfaces as a timeout, a schema-mismatch rejection from a stub, or — worst case — a silent fallback to a default agent that accepts the call under a *different* capability contract. The non-obvious part: policy state and registry state are **independently versioned and independently consistent**. A permit is a statement about a policy graph; a route is a statement about a live process and its schema. Neither implies the other, and the gap between them is where federation requests die. ## What Was Observed A routing agent `R` in org `alpha` executes a capability negotiation loop against org `beta`'s federation gateway. The negotiation is a three-message exchange: 1. `R` sends `capability_request` with a required schema digest `S_req` (a hash over the argument and return type contract) and a policy context token `P_ctx`. 2. `beta`'s gateway forwards the authorization sub-request to its PDP, which evaluates `P_ctx` against `beta`'s policy graph and returns `permit` with a warrant `W` scoped to capability name `C` — **not** to schema digest `S_req`. 3. `beta`'s gateway returns `capability_grant{W, C, S_granted}`. The trace that broke: `beta` had recently rolled `C` from schema `S_v1` to `S_v2`. The registry had been updated to advertise `S_v2`. The PDP's policy graph, however, still carried the warrant template scoped to `C` with the *old* schema binding baked into a policy attribute that was only re-read on a 15-minute cache cycle. So for the cache window, the PDP issued `permit` for `C`, and the gateway — which trusted the PDP's schema binding rather than re-checking the registry — returned `S_granted = S_v1`. `R` compared `S_granted` against `S_req`. Because `R`'s own schema-compatibility check was written as "accept if `S_granted` is a *superset* of `S_req`," and `S_v1` happened to be a syntactic superset of `S_req` (it had extra optional fields that `S_req` did not require), `R` accepted the grant and dispatched the invocation. The invocation arrived at a live `C@S_v2` endpoint, which rejected the payload because `R` had serialized against the `S_v1` contract the grant implied. The endpoint returned a 422-shaped schema error. `R`'s retry logic, seeing a schema error under a *valid permit*, classified it as transient and retried three times before exhausting its budget — burning ~40 seconds of wall clock and 3× the tool-call budget on a failure that was structurally permanent. A second variant was worse. In a different federation, `R`'s fallback-on-route-failure policy selected a "default capability handler" in `beta` that advertised a *generic* `C` with `S_any`. The fallback succeeded — the call returned `200` — but the handler had ignored two required fields present in `S_req` and silently defaulted them. `R` recorded a successful invocation. The downstream consumer received a semantically wrong result with no error surface. This is the silent-corruption variant: **the failure is masked because a permissive default route exists**. ## Condition of Validity The permit-without-route failure is *bounded* (i.e., the system behaves correctly) only when **all** of the following hold simultaneously: - **Schema binding is in the warrant.** The PDP's issued warrant `W` must be scoped to `(capability_id, schema_digest)`, not to `capability_id` alone. If `W` carries only the capability name, the gateway cannot distinguish a stale permit from a current one. - **Registry is the authoritative source for `S_granted`.** The gateway must resolve `S_granted` from the live registry at grant time, not from the PDP's cached attribute. The PDP answers *permission*, the registry answers *shape*; neither may answer the other's question. - **Compatibility is a digest equality or a signed subtyping proof.** "Superset check" is unsound across trust boundaries because the two orgs may disagree on what "superset" means (optional-vs-required, nullability, numeric widening). Cross-org compatibility must reduce to digest equality or a proof both sides can verify against a shared schema lattice version. - **No silent default route.** Fallback handlers must be *explicitly* opted into by the caller's request policy, never selected by the router on route-failure. A default route that accepts `S_any` is a correctness hazard, not a resilience feature. - **Cache TTL on the PDP attribute is shorter than the registry roll window, or the roll invalidates the cache.** If `beta` can roll `C` while a PDP cache entry is live, the cache TTL must be strictly less than the minimum roll-to-invalidation interval, or the roll must actively bust the cache. If any one of these fails, the invariant "a `permit` implies a routable, schema-compatible endpoint exists" is *false*, and the router's decision to dispatch on `permit` is unsound. ## Decision Boundary The router must make a hard decision at the moment it receives `capability_grant`. The boundary is: - **Dispatch only if `S_granted == S_req` (digest equality) or a verifiable subtyping proof is attached and checks out against the shared schema lattice.** Anything else is a *negotiation failure*, not a routing failure, and must be surfaced as such — it must **not** enter the retry loop, because retrying a structurally permanent schema mismatch only burns token and time budget. - **Never fall back to a default handler on route failure unless the caller's request policy explicitly names the fallback capability and its schema digest.** Fallback-on-failure is a silent-corruption vector; it converts a loud, recoverable error into a quiet, unrecoverable one. - **Treat `permit` as necessary but not sufficient.** The router's precondition for dispatch is `permit ∧ routable ∧ schema_compatible`, evaluated as three independent checks, not collapsed into one. - **On `permit`-with-stale-schema, re-request with a cache-bust nonce** (or force the gateway to re-resolve against the registry) exactly once. If the re-request still returns a stale `S_granted`, escalate to the federation operator — do not retry further. The boundary is *sharp*: the router either has digest equality (dispatch) or it does not (fail negotiation, no retry, no fallback). There is no "probably compatible, try it" middle state that is safe across org boundaries. ## Operational Effect Enforcing this boundary changes the failure *shape* from silent-and-expensive to loud-and-cheap: - **Latency:** a permit-without-route that previously burned ~40s in retries now fails in one round-trip (~1 RTT to the gateway plus local digest compare). The retry budget is preserved for genuinely transient faults (transport resets, 503s from a live endpoint). - **Correctness:** the silent-corruption variant is eliminated because the default-route fallback is no longer reachable on route failure. A caller that wants a fallback must *name* it and its schema digest in the request policy, which makes the fallback an explicit, auditable decision rather than a router-side guess. - **Observability:** every negotiation failure now carries a structured reason (`schema_digest_mismatch`, `stale_warrant_schema`, `no_routable_endpoint`), which distinguishes policy-side staleness from registry-side absence from genuine transport failure. Operators can alert on `stale_warrant_schema` specifically, which is the leading indicator of the PDP-cache-vs-registry-roll race. - **Cost:** token and tool-call budget previously spent on doomed retries is reclaimed; the router's budget accounting now reflects only invocations that were structurally dispatchable. The invariant to encode in the router: **a capability grant is a claim about permission, not a promise of existence, and the router must independently verify existence and shape before it spends budget on dispatch.** The code below enforces it at the grant-receipt boundary. ```python import hashlib from dataclasses import dataclass from typing import Optional class PermitWithoutRouteError(RuntimeError): """Raised when a capability grant authorizes an invocation but no routable, schema-compatible endpoint exists behind the boundary. This is a *negotiation* failure, not a routing failure: it must not enter the retry loop and must not trigger a default-route fallback. """ @dataclass(frozen=True) class CapabilityGrant: capability_id: str schema_digest: str # digest the gateway claims is live warrant_scope_digest: str # digest the PDP bound the warrant to warrant_cache_age_s: float # how stale the PDP attribute was @dataclass(frozen=True) class CapabilityRequest: capability_id: str required_schema_digest: str explicit_fallback: Optional[str] = None # caller-named fallback digest, or None def verify_grant( req: CapabilityRequest, grant: CapabilityGrant, registry_live_digest: str, max_warrant_age_s: float = 5.0, ) -> None: """Enforce the permit-without-route boundary at grant receipt. Dispatch is permitted only if all three independent checks pass: 1. warrant scope matches the requested schema digest (not just the name) 2. the grant's schema digest matches the live registry digest 3. the grant's schema digest equals the request's required digest Any mismatch raises PermitWithoutRouteError and MUST NOT be retried or routed to a default handler. """ if grant.capability_id != req.capability_id: raise PermitWithoutRouteError( f"grant capability {grant.capability_id!r} does not match " f"request {req.capability_id!r}" ) # Check 1: warrant must be scoped to the schema digest, not just the name. if grant.warrant_scope_digest != req.required_schema_digest: raise PermitWithoutRouteError( f"stale_warrant_schema: warrant scoped to " f"{grant.warrant_scope_digest[:12]} but request requires " f"{req.required_schema_digest[:12]}" ) # Check 2: the grant's schema must match what the registry actually serves. if grant.schema_digest != registry_live_digest: raise PermitWithoutRouteError( f"schema_digest_mismatch: grant claims " f"{grant.schema_digest[:12]} but registry serves " f"{registry_live_digest[:12]}" ) # Check 3: digest equality only -- no superset heuristics across orgs. if grant.schema_digest != req.required_schema_digest: raise PermitWithoutRouteError( f"schema_digest_mismatch: grant {grant.schema_digest[:12]} != " f"required {req.required_schema_digest[:12]}" ) # Guard against a PDP cache that outlived the registry roll window. if grant.warrant_cache_age_s > max_warrant_age_s: raise PermitWithoutRouteError( f"stale_warrant_schema: warrant cache age " f"{grant.warrant_cache_age_s:.1f}s exceeds " f"{max_warrant_age_s:.1f}s roll window" ) def digest_schema(schema: str) -> str: return hashlib.sha256(schema.encode("utf-8")).hexdigest() ```