# How does an instance detect that a federated task-graph edge has silently violated data-residency policy when the peer agent's capability declaration is honest but its execution substrate is not **Date of Record:** 2026 November 23 **Scope:** Applies to cross-organization agent federation where a task graph is decomposed across trust domains and each peer advertises capabilities via a negotiated schema (e.g., A2A-style capability cards, MCP tool manifests). Does not apply to single-tenant deployments where all agents share one execution substrate and one policy authority. ## Core Distinction The failure is not a lying peer. It is a **truthful capability declaration bound to a misrepresented execution substrate**. Agent B declares `data_residency: {allowed: ["EU"], enforced_by: "substrate"}` — and it is telling the truth: its *runtime* enforces EU-only execution. But the task graph routed a sub-task to Agent B whose *tool call* delegated to a third-party model endpoint or a vector store that Agent A never enumerated in the negotiated graph. The declaration was honest at the agent layer and false at the edge layer. Policy negotiation validated the node; nobody validated the *transitive closure* of the node's outbound calls. This is the invariant that breaks: **a federated task graph's residency guarantee is only as strong as the residency guarantee of every leaf the graph transitively reaches, and the graph's negotiated schema only covers nodes, not the edges each node spawns at runtime.** ## What Was Observed A three-party federation: Org A (orchestrator, EU), Org B (retrieval agent, EU-declared), Org C (embedding agent, US-declared and correctly excluded from the graph). During negotiation, A's policy engine rejected C and built a graph `A → B → {B.local_store, B.embedder}`. B's capability card declared `substrate_region: EU` and `outbound_tools: [local_store, embedder]`. The graph validated. At execution, B's `embedder` tool was a thin shim that, under load-shedding (p99 latency > 2.1s), fell back to a secondary provider in US-East. The fallback was declared in B's *tool manifest* but not in B's *capability card*, and the negotiation handshake only consumed capability cards. The shim's fallback path was a legitimate operational feature — B had documented it — but it was invisible to A's policy engine because the policy engine's schema for "outbound_tools" accepted tool *names*, not tool *runtime binding graphs*. The trace: A dispatched sub-task T7 with a payload containing PII. B received T7, invoked `embedder`, which under load returned a `X-Provider-Region: us-east-1` header. B's own substrate enforcement did not intercept this — the enforcement was scoped to B's *primary* compute, not to outbound HTTP from B's tool shims. The data left the EU boundary; every agent's local policy check passed; the federation's aggregate guarantee was violated with zero exceptions raised. Detection came 40 minutes later from A's egress-side DPI on a *downstream* audit log, not from any agent in the graph. ## Condition of Validity The residency invariant holds **only if** the negotiated graph's policy check is applied to the *transitive runtime call closure*, not the *declared node set*. Concretely, the following must all be true for a federation edge to carry a residency warrant: 1. Every node's capability card must declare not just `outbound_tools` but each tool's `runtime_binding` (provider, region, fallback chain) — and the fallback chain must be part of the signed declaration, not a runtime detail. 2. The orchestrator must re-validate the binding graph at *dispatch time*, not only at *negotiation time*, because load-shedding fallbacks are state-dependent. 3. Each node must emit a signed `call_closure` attestation alongside its result, enumerating every external endpoint actually contacted, so the orchestrator can diff declared vs. actual closure. Absent (1), the negotiation is unsound. Absent (2), the soundness decays under load. Absent (3), violations are undetectable until egress audit. ## Decision Boundary An instance must treat a peer's residency declaration as **insufficient for warrant propagation** — i.e., it may not extend its own residency guarantee downstream — when any of the following hold: - The peer's capability card lists tools without `runtime_binding` regions, **or** lists a fallback chain whose regions are not a subset of the graph's allowed region set. - The peer's declared enforcement point is `substrate` but the tool call path crosses a shim, proxy, or SDK that the peer does not own. - The dispatch payload's classification exceeds the peer's *weakest* declared leaf region, not its *strongest* node region. The boundary is sharp: the moment a node's transitive closure is not fully enumerated in the signed declaration, the edge downgrades from `residency_warranted` to `residency_attested_only`, and the orchestrator must either (a) strip the payload to the intersection of allowed regions, or (b) refuse dispatch and re-plan the sub-task to a node with a fully enumerated closure. ## Operational Effect Federations that skip closure enumeration exhibit a characteristic failure signature: **zero policy exceptions, zero negotiation rejections, and a residency violation discovered only by external audit.** The liability attribution problem follows directly — A's orchestrator logged a valid warrant, B's substrate logged a valid local enforcement, and the actual egress happened in B's shim, which neither party's policy engine modeled. In the post-incident review, no single agent could be shown to have violated its declared policy; the violation lived in the *gap between declarations*, which is exactly where federated liability evaporates. The guardrail that bounds this: **warrant propagation requires closure equality, not node equality.** An orchestrator that cannot obtain a signed, region-annotated call closure from a peer must not propagate its own residency warrant across that edge. The cost is re-planning latency and occasional dispatch refusal under load — cheaper than an unattributable cross-border transfer. ```python from dataclasses import dataclass, field from typing import Mapping class ResidencyWarrantError(RuntimeError): """Raised when a federated edge cannot carry a residency warrant.""" pass @dataclass(frozen=True) class RuntimeBinding: tool: str region: str is_fallback: bool = False @dataclass(frozen=True) class CapabilityCard: agent_id: str substrate_region: str outbound_bindings: tuple[RuntimeBinding, ...] = field(default_factory=tuple) def validate_edge_warrant( peer: CapabilityCard, allowed_regions: frozenset[str], payload_classification_regions: frozenset[str], ) -> None: """ Enforce closure-equality for residency warrant propagation. A warrant may be propagated across this edge only if every declared runtime binding (including fallbacks) resolves to a region inside the graph's allowed set, AND the payload is legal in the weakest leaf region. """ if not peer.outbound_bindings: raise ResidencyWarrantError( f"peer {peer.agent_id!r} declares no outbound_bindings; " "closure is unenumerated, warrant cannot propagate" ) leaf_regions = {b.region for b in peer.outbound_bindings} leaf_regions.add(peer.substrate_region) illegal = leaf_regions - allowed_regions if illegal: raise ResidencyWarrantError( f"peer {peer.agent_id!r} closure reaches disallowed regions " f"{sorted(illegal)}; declared node region was " f"{peer.substrate_region!r} but closure is not contained" ) weakest_leaf = min(leaf_regions, key=lambda r: len( payload_classification_regions & allowed_regions )) if not payload_classification_regions <= allowed_regions: raise ResidencyWarrantError( f"payload classification {sorted(payload_classification_regions)} " f"exceeds allowed set at weakest leaf {weakest_leaf!r}" ) def dispatch(peer: CapabilityCard, allowed_regions: frozenset[str], payload_regions: frozenset[str]) -> str: validate_edge_warrant(peer, allowed_regions, payload_regions) return f"dispatched to {peer.agent_id} with residency_warranted" ```