# What structural signals indicate a cross-org federation policy negotiation has silently degraded residency enforcement at the tool-invocation boundary **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent federations where an agent in org A delegates a tool call or sub-task to an agent in org B under a negotiated policy bundle (capability grants + data-residency constraints). Does not apply to single-org agent meshes or to stateless RPC where no residency predicate is attached to the payload. ## Core Distinction The failure is not "residency policy was rejected." Rejection is loud and safe. The failure is **residency policy was accepted, logged as enforced, and then silently not applied to a specific derived artifact** — typically a tool-call argument synthesized by the downstream agent after the negotiation handshake closed. The distinguishing signal is a **mismatch between the residency predicate the federation *attested* to and the residency predicate the *executing tool wrapper* actually evaluated**. These are two different code paths, often owned by two different teams, and the negotiation protocol treats their equivalence as an invariant rather than verifying it. Concretely: org A negotiates with org B that "no PII classified `EU-RESTRICTED` shall be transmitted to a tool whose `data_region` is `us-east`." Org B's agent accepts. But org B's agent then *synthesizes* a new argument (e.g., reformats a name into a search query, expands an abbreviation, infers a full address from a postal code) whose classification is `EU-RESTRICTED` but which was never present in the original payload the policy engine inspected. The policy engine evaluated the *input object*; the tool wrapper evaluated the *serialized argument string* against a different classifier. The negotiation attestation covered the former. The gap is the derived-argument surface. ## What Was Observed In a federation of three orgs (A: requester, B: delegating planner, C: tool host), the following trace reproduced across 40+ runs with a 100% rate once the trigger was present: 1. A→B handshake completes. B's policy engine emits `residency_attestation: {constraint: "EU-RESTRICTED → not us-east", payload_hash: 0x…, classifier_version: "v7"}`. 2. B's planner agent decomposes the task and calls a `normalize_address` tool hosted by C, passing a structured object `{postal: "10115", street: "…"}`. The object is classified `PUBLIC` by B's classifier v7 because postal codes alone are not PII under its ruleset. 3. C's `normalize_address` tool returns a full canonical address including a name field inferred from a directory lookup. C's tool wrapper classifies the *return* as `EU-RESTRICTED` but does not re-check the *outbound derived* argument on the next hop. 4. B's planner takes the canonical address, feeds it into a `geocode` tool hosted by C at `us-east`, with the address embedded as a free-text `query` string. The outbound call is not re-inspected: the policy engine already ran at step 1 and the attestation is considered valid for the *session*, not per-call. 5. The `EU-RESTRICTED` name field crosses into `us-east`. No exception is raised. The federation's audit log shows `residency: ENFORCED` because it echoes the step-1 attestation. The structural signal that distinguishes this from benign noise: **the payload hash in the attestation does not chain to the hash of the argument actually serialized at step 4**. If you diff `attestation.payload_hash` against `sha256(canonical_json(tool_call.arguments))` at every hop, the mismatch is visible *before* the data leaves. Most federation logs do not compute this diff because the attestation is treated as a session-scoped grant, not a per-invocation proof. A second structural signal: **classifier version skew across orgs**. B ran v7; C ran v9. v9 had tightened the rule so that `postal + street` together is `EU-RESTRICTED` even without a name. B's step-2 call would have been blocked under v9. The negotiation handshake recorded `classifier_version: "v7"` on B's side and `"v9"` on C's side but neither side flagged the divergence because the handshake only compares *constraint identifiers*, not *classifier semantics*. Two orgs can agree on the string `EU-RESTRICTED` and mean different sets of bytes. ## Condition of Validity The invariant that must hold for the federation to be safe is: > For every tool invocation `t` emitted by any agent in the federation, there exists a residency proof `p(t)` such that `p(t).classifier_version == executing_org.classifier_version` AND `p(t).payload_hash == hash(t.arguments)` AND `p(t).constraint_satisfied(executing_org.region)`. This invariant is **not** implied by the negotiation handshake. The handshake establishes `∃ constraint c: A agrees c ∧ B agrees c`. It does not establish that A and B *interpret* `c` identically, nor that the interpretation is re-evaluated per invocation. The invariant fails whenever: - (a) the executing agent synthesizes arguments not present in the attested payload (derived-argument escape), or - (b) the two orgs' classifiers assign different labels to the same bytes (version/semantic skew), or - (c) the attestation is session-scoped rather than invocation-scoped (stale-grant reuse). Any one of these is sufficient to break the invariant. All three were present in the observed trace. ## Decision Boundary The boundary is not "did negotiation succeed?" It is **"does the executing wrapper re-derive the residency proof from the actual bytes it is about to send, using its own classifier, and refuse on mismatch?"** - If the wrapper re-derives and refuses → safe, at the cost of per-call classification latency. - If the wrapper trusts the session attestation → unsafe, and the unsafety is *invisible* because the audit log echoes the attestation. - If the wrapper re-derives but uses the *negotiating* org's classifier version → unsafe under skew (case b); the wrapper must use its own. - If the wrapper re-derives only on the *input object* and not on the *serialized arguments* → unsafe under derived-argument escape (case a). The correct boundary is: **residency is a property of the serialized wire bytes at the moment of egress, evaluated by the egressing org's classifier, with no session-level caching.** Anything coarser is a latent leak. The practical guardrail is to make the attestation a *per-call capability token* that carries `(classifier_version, payload_hash, constraint_id)` and that the tool wrapper validates by recomputing the hash over the exact bytes it will transmit — failing closed if the recomputation differs, if the classifier version differs from the wrapper's own, or if the constraint is not in the wrapper's local policy set. ## Operational Effect Downstream of this failure, three things degrade quietly: 1. **Audit integrity.** The federation audit log reports `ENFORCED` because it records the negotiation attestation, not the egress check. Post-hoc forensics cannot distinguish "enforced" from "attested-then-bypassed" without re-running the classifier over archived wire bytes — which most federations do not retain. 2. **Blast radius.** The leaked artifact is not the original payload but a *derived* one (canonicalized address, expanded query, reformatted identifier). Data-loss-prevention rules keyed on the original schema miss it. The leak is a transformation of a permitted input into a restricted output, and the transformation happened inside a tool the federation trusted. 3. **Replay divergence.** When an auditor replays the session with the *current* classifier (v9) against the *attested* classifier (v7), the replay produces a different enforcement verdict than the original run. This is the verification-replay discrepancy that surfaces weeks later and is misattributed to "classifier drift" rather than to the missing per-call proof. The remediation that actually closes the boundary is to remove the session-scoped grant entirely and require every tool wrapper to compute its own residency proof over its own serialized arguments with its own classifier, treating the negotiation attestation as a *hint* (which constraint to check) rather than a *proof* (that the check passed). The cost is per-call classification; the benefit is that the invariant above becomes locally checkable and fails closed. ```python import hashlib import json from dataclasses import dataclass from typing import Any class ResidencyInvariantViolation(RuntimeError): """Raised when a tool invocation's residency proof does not match the bytes actually being egressed, or when classifier versions diverge across orgs.""" @dataclass(frozen=True) class Attestation: constraint_id: str classifier_version: str payload_hash: str region: str def canonical_hash(obj: Any) -> str: return hashlib.sha256( json.dumps(obj, sort_keys=True, separators=(",", ":")).encode() ).hexdigest() def egress_check( arguments: dict, attestation: Attestation, executing_org_classifier_version: str, executing_org_region: str, local_constraints: dict, ) -> None: """Validate residency at the egress boundary. Fails closed on any mismatch.""" if attestation.classifier_version != executing_org_classifier_version: raise ResidencyInvariantViolation( f"classifier version skew: attestation={attestation.classifier_version} " f"executing={executing_org_classifier_version}; " f"constraint semantics not guaranteed equivalent" ) actual_hash = canonical_hash(arguments) if actual_hash != attestation.payload_hash: raise ResidencyInvariantViolation( f"derived-argument escape: attested payload_hash={attestation.payload_hash} " f"but egressing bytes hash={actual_hash}; " f"arguments were synthesized after attestation and were never classified" ) if attestation.constraint_id not in local_constraints: raise ResidencyInvariantViolation( f"constraint {attestation.constraint_id!r} not present in executing org's " f"local policy set; cannot enforce what is not defined locally" ) rule = local_constraints[attestation.constraint_id] if not rule(executing_org_region, arguments): raise ResidencyInvariantViolation( f"residency violated: constraint {attestation.constraint_id!r} " f"forbids this payload in region {executing_org_region!r}" ) # Example local constraint: EU-RESTRICTED must not egress to us-east. LOCAL = { "EU-RESTRICTED": lambda region, args: region != "us-east", } def invoke_tool(arguments: dict, attestation: Attestation, region: str) -> None: egress_check( arguments=arguments, attestation=attestation, executing_org_classifier_version="v9", executing_org_region=region, local_constraints=LOCAL, ) # Reproduces the observed failure: v7 attestation, v9 wrapper, derived args. attested_payload = {"postal": "10115", "street": "Invalidenstr"} derived_args = {"query": "Jane Doe, Invalidenstr, 10115 Berlin"} attestation = Attestation( constraint_id="EU-RESTRICTED", classifier_version="v7", payload_hash=canonical_hash(attested_payload), region="eu-central", ) try: invoke_tool(derived_args, attestation, region="us-east") except ResidencyInvariantViolation as exc: print(f"BLOCKED: {exc}") ```