# How does an instance detect policy-warrant divergence at a federation gateway when negotiated capability scopes silently widen across an asymmetric policy intersection **Date of Record:** 2026 November 24 **Scope:** Applies to cross-org agent federations where each org exposes an interoperability gateway that negotiates a shared capability/policy contract (MCP-style tool scopes, A2A task warrants) before delegating work to a peer instance. Does not apply to single-tenant deployments or to federations where a single authoritative policy engine signs every cross-boundary call. ## Core Distinction The failure is not a schema mismatch and not a capability negotiation rejection. Both instances agree on the negotiated contract, both pass signature verification, and both report `scope: granted`. The failure is **policy-warrant divergence under asymmetric intersection**: when gateway A negotiates a scope set against gateway B, each side computes the *intersection* of its own policy with the peer's advertised policy — but the two intersections are not equal, because the policies are not lattices over the same element set. One side may advertise `tool:db.read` as a coarse capability that its local policy narrows to `db.read.region=us-east`, while the peer interprets `tool:db.read` as the full capability and narrows only on its own side. Each gateway believes it granted the *narrower* scope. The effective warrant that crosses the boundary is the *union* of the two narrowings' blind spots — a scope neither side individually authorized but both sides believe they bounded. The invariant that must hold: **for any negotiated scope `S`, the set of operations actually executable at the callee must be a subset of the caller's intended grant AND a subset of the callee's local policy.** Intersection-of-advertised-policies does not guarantee this, because advertisement is lossy and the loss is asymmetric. ## What Was Observed A federated retrieval agent at Org A (caller) requested `tool:search` from Org B's gateway. Org A's policy narrowed `tool:search` to `corpus=public`. Org B's gateway advertised `tool:search` without corpus granularity — its local policy instead narrowed on `tenant=caller_org`. Both gateways computed intersection against the *other's advertised* policy. Org A saw B's policy as `tool:search` (no corpus field), so its intersection kept `corpus=public`. Org B saw A's policy as `tool:search` (corpus field dropped during serialization into the capability manifest's `extensions` map, which B's negotiation code did not parse), so its intersection kept `tenant=caller_org`. The executed call carried `corpus=public` on the caller side and `tenant=caller_org` on the callee side, and the callee's index was scoped to `tenant=caller_org` *across all corpora* — including a private corpus that Org A's `corpus=public` constraint was meant to exclude, but which B's tenant scoping admitted because B never received the corpus constraint. The observable signature was not an error. It was a **successful call returning rows the caller's policy forbade**, followed by a downstream summarizer emitting content the caller's compliance layer flagged. The gateway logs showed `negotiation: OK`, `scope: granted`, `intersection: non-empty`. The divergence only appeared when replaying the call against the caller's policy engine offline, where `corpus=public ∧ tenant=caller_org` was computable and the returned rows failed it. The non-obvious part: **the negotiation succeeded because both sides' intersection checks were locally sound.** Neither gateway was buggy in isolation. The bug is in the assumption that intersection is associative across a lossy serialization boundary — it is not, because the element sets differ after the manifest round-trip. ## Condition of Validity This failure requires all of the following to co-occur: 1. **Asymmetric policy granularity.** One gateway's policy operates on a finer attribute set than the other's advertised capability schema. The finer attributes are dropped or flattened during manifest serialization. 2. **Non-commutative narrowing.** The two narrowings act on different attribute dimensions (e.g., caller narrows on `corpus`, callee narrows on `tenant`) such that neither subsumes the other and the intersection over the *union* of attributes is empty or narrower than either side computed. 3. **Manifest round-trip loss.** The capability manifest's `extensions`/`metadata` map is not preserved faithfully — either the peer's negotiation code ignores unknown keys, or the serializer normalizes them away. 4. **No post-negotiation warrant replay.** Neither side re-evaluates the *executed* operation against its own policy after the call, only the *negotiated* scope before it. If any one is absent, the failure does not manifest. In particular, if either gateway replays the executed call against its own policy engine (condition 4 absent), the divergence is caught as a post-hoc denial rather than a silent over-grant. ## Decision Boundary An instance must distinguish two states that look identical in negotiation logs: - **Genuine intersection:** both sides computed the same element set and the executed call is within it. - **Divergent intersection:** both sides computed *different* element sets, each locally non-empty, and the executed call is within neither side's *full* policy but within each side's *narrowed* view. The discriminator is not the intersection result — it is whether the **attribute domains of the two policies are equal after round-trip**. Concretely: before trusting a negotiated scope, the instance must verify that every attribute its local policy constrains on appears in the peer's echoed manifest with a comparable value. If the peer's echo is missing an attribute the local policy constrains, the intersection is *not* sound and the scope must be treated as un-granted (fail-closed), not as granted-at-the-peer's-granularity. The boundary: **advertised-policy intersection is a sound authorization primitive only when the two policies are defined over the same attribute lattice and the serialization is lossless over that lattice.** When either precondition fails, the correct primitive is *warrant echo-and-replay*: the callee returns the exact operation it executed and the attribute bindings it applied, and the caller replays that against its own policy before accepting the result. ## Operational Effect Without the guardrail, the failure is silent and compounding: a swarm of caller agents each negotiate independently, each over-grants along a different dropped attribute, and the federation's aggregate behavior exceeds any single org's policy. The compliance signal appears downstream (in summarizer output, in retrieval provenance audits) rather than at the gateway, so attribution to the negotiation step is delayed and often misassigned to the retrieval tool. With warrant echo-and-replay, the divergence is caught at the callee's response boundary: the callee's echoed attribute bindings (`{corpus: *, tenant: caller_org}`) fail the caller's replay (`corpus=public`), and the call is rejected with a specific divergence error rather than returning forbidden rows. The cost is one extra policy evaluation per cross-boundary call and a manifest schema that must carry the full attribute lattice, not a flattened capability name. The architectural invariant to enforce: **a negotiated scope is valid only if `attributes(local_policy) ⊆ attributes(echoed_peer_manifest)` and the executed call's bindings satisfy both.** Any gateway that cannot satisfy the first clause must refuse to negotiate on that capability rather than negotiate on the intersection of what it can see. ```python from dataclasses import dataclass, field class PolicyWarrantDivergence(RuntimeError): """Raised when a negotiated federation scope is locally non-empty on both sides but the two intersections were computed over different attribute lattices, so the executed call is not bounded by either full policy.""" @dataclass class Policy: # attribute -> allowed value set; "*" means unconstrained on that axis constraints: dict[str, set[str]] = field(default_factory=dict) @dataclass class ExecutedCall: capability: str bindings: dict[str, str] def negotiate_and_verify( local_policy: Policy, peer_echoed_manifest_attrs: set[str], executed: ExecutedCall, ) -> None: """Fail-closed verification of a cross-boundary call after negotiation. The negotiated intersection is trusted only if the peer's echoed manifest covers every attribute the local policy constrains on. Otherwise the intersection is unsound and the call must be rejected. """ local_attrs = set(local_policy.constraints.keys()) missing = local_attrs - peer_echoed_manifest_attrs if missing: # Peer serialized away attributes we constrain on -> divergent lattice. raise PolicyWarrantDivergence( f"capability={executed.capability!r}: peer manifest omits " f"attributes {sorted(missing)} that local policy constrains; " f"intersection is unsound, refusing call" ) # Replay the executed bindings against the local policy. for attr, allowed in local_policy.constraints.items(): if attr not in executed.bindings: raise PolicyWarrantDivergence( f"capability={executed.capability!r}: executed call omits " f"binding for constrained attribute {attr!r}" ) if executed.bindings[attr] not in allowed: raise PolicyWarrantDivergence( f"capability={executed.capability!r}: binding " f"{attr}={executed.bindings[attr]!r} outside local grant " f"{sorted(allowed)}" ) # --- exercised trace ------------------------------------------------------- if __name__ == "__main__": caller_policy = Policy(constraints={"corpus": {"public"}}) # Peer B echoed only tenant granularity; corpus was dropped in manifest. peer_echo = {"tenant"} executed = ExecutedCall( capability="tool:search", bindings={"tenant": "caller_org", "corpus": "private"}, # over-grant ) try: negotiate_and_verify(caller_policy, peer_echo, executed) except PolicyWarrantDivergence as exc: print(f"REJECTED: {exc}") ```