# What happens when an instance negotiates residency constraints across a federated trust boundary and the audit trail forks **Date of Record:** 2026 November 24 **Scope:** Applies to cross-org agent federation where a requesting agent (org A) delegates a task to a serving agent (org B) under a per-request data-residency policy, and both sides independently emit audit records. Does not apply to single-org deployments or to stateless RPC tool calls with no persisted state. ## Core Distinction The failure is not a policy *rejection*. A rejection is clean: the serving agent refuses, the caller sees a typed error, and the audit trail has one entry. The failure is a **policy acceptance under divergent interpretation** — the serving agent accepts the residency constraint, executes, but *materializes* the constraint differently than the requesting agent's auditor will later *reconstruct* it. The two audit trails are individually valid and jointly contradictory. Concretely: org A's policy says "no inference may occur outside `eu-west`." Org B's agent has a `eu-west` primary and a `us-east` fallback it invokes on capacity pressure. Org B's negotiator accepts the constraint because it interprets "inference" as "the model forward pass," and its fallback is a *cache read* of a previously-computed embedding — not a forward pass. Org A's auditor interprets "inference" as "any operation whose output influences the response." Both are defensible. The residency invariant is violated by the gap between the two definitions, not by either party lying. ## What Was Observed Trace from a federation run (task `T-8841`, org A `acme`, org B `borealis`): 1. A's orchestrator emits a `DelegationWarrant` with `residency: {region: eu-west, scope: "inference+storage", ttl: 3600}` and a `warrant_id` (W-77). Signed by A's policy key. 2. B's `FederationNegotiator` receives the warrant. It maps `scope` tokens to its internal capability tags via a static table: `"inference" → {forward_pass, rerank}`, `"storage" → {vector_store, kv_cache}`. The token `"inference+storage"` is **not** in the table. The negotiator falls through to a default: `{forward_pass}`. No error is raised — the default is logged at `DEBUG`. 3. B's serving agent executes. At step 4, capacity pressure triggers the `us-east` embedding cache. The cache read is tagged `storage` internally, which the negotiator's mapped scope (`{forward_pass}`) does not cover, so the residency gate **does not fire**. The read proceeds. 4. B's auditor emits `AuditRecord{op: cache_read, region: us-east, covered_by: null}` — correctly recording an uncovered op, but not flagging it as a violation because the gate never raised. 5. A's auditor, replaying the trace from W-77, reconstructs `scope = inference+storage`, sees `cache_read` as a storage op, and marks the record `VIOLATION`. 6. The two audit trails are now in a forked state: B reports `compliant`, A reports `violation`, for the same task. Reconciliation fails because neither side can unilaterally re-derive the other's scope mapping. The trigger is the **unmapped scope token combined with a permissive default**. The invariant that broke: *a delegated warrant's scope must be total over the serving agent's capability set, or negotiation must fail closed.* ## Condition of Validity The permissive-default behavior is only safe under a condition that is almost never checked: the serving agent's capability tag set must be a **subset** of the requesting agent's scope vocabulary, and the mapping must be **total** (every internal tag maps to a scope token, or the tag is provably residency-neutral). When B added the `us-east` cache in a later deploy, it introduced a capability tag (`storage`) that its default mapping did not cover. The validity condition silently became false. There is no monitoring on mapping totality, so the regression was invisible until an external auditor replayed the trace. This is the non-obvious part: the failure is **latent across a deploy boundary**. The policy was correct at negotiation time relative to B's capability set *then*. B's capability set changed. The warrant's TTL (3600s) did not expire before the change. A long-lived warrant is a promise about a capability set that the promisor can mutate unilaterally. ## Decision Boundary The boundary is between **fail-closed negotiation** and **permissive-default negotiation**, and it must be decided at the *mapping* layer, not the *execution* layer: - **Fail closed (required for cross-org):** if any requested scope token is unmapped, or any internal capability tag is uncovered by the granted scope, negotiation returns `ScopeUnresolvable` and no execution begins. The cost is false rejections when a requesting agent uses a novel token. - **Permissive default (acceptable only intra-org):** unmapped tokens resolve to a conservative default *and* every execution is gated by a runtime residency check that re-validates the actual op's region against the *original* warrant scope string, not the mapped tag set. The critical rule: **the runtime gate must check against the raw warrant scope, not the negotiator's mapped interpretation.** The mapping is a convenience for capability routing; it is not authoritative for compliance. When the gate checks the mapped set, the mapping's blind spots become the gate's blind spots, and the audit fork is guaranteed. ## Operational Effect Downstream of the fork: - **Audit reconciliation is impossible without the raw warrant.** A's auditor has W-77; B's auditor has only the mapped tag set. The reconciliation key must be `warrant_id` plus the *original scope string*, which B must persist verbatim, not the mapped form. - **Warrant TTL must be bounded by capability-set stability.** A 3600s TTL is a 3600s window in which B may deploy a new capability tag that invalidates the mapping. The TTL should be capped at the deploy interval, or the warrant must be re-negotiated on any capability-set change (a `capability_epoch` in the warrant, checked at each execution). - **The failure is silent on the serving side.** B's logs show `compliant`. Only the cross-org replay surfaces it. Any monitoring that reads only one side's audit trail will miss it entirely. Guardrail: persist the raw scope string, gate at runtime against it, version the capability set, and treat any `covered_by: null` record as a hard reconciliation failure rather than a soft note. ```python class ResidencyScopeFork(RuntimeError): """Raised when a delegated warrant's scope cannot be totally mapped onto the serving agent's capability set, or when a runtime op's region is not covered by the raw warrant scope.""" pass def negotiate_warrant(warrant_scope: str, capability_tags: set[str], mapping: dict[str, set[str]]) -> set[str]: tokens = set(warrant_scope.split("+")) unmapped = {t for t in tokens if t not in mapping} if unmapped: # Fail closed: never fall through to a permissive default # across an org boundary. raise ResidencyScopeFork( f"unmapped scope tokens {sorted(unmapped)}; refusing to " f"negotiate a warrant whose scope is not total" ) granted = set().union(*(mapping[t] for t in tokens)) uncovered = capability_tags - granted if uncovered: raise ResidencyScopeFork( f"capability tags {sorted(uncovered)} are not covered by " f"granted scope; serving agent could execute an " f"un-auditable op" ) return granted def runtime_gate(op_region: str, op_tag: str, raw_warrant_scope: str, allowed_regions: dict[str, set[str]]) -> None: tokens = set(raw_warrant_scope.split("+")) # Check against the RAW scope, not the mapped tag set. if op_tag not in tokens: raise ResidencyScopeFork( f"op tag {op_tag!r} not in raw warrant scope " f"{raw_warrant_scope!r}; audit trail would fork" ) if op_region not in allowed_regions.get(op_tag, set()): raise ResidencyScopeFork( f"op region {op_region!r} violates residency for " f"scope {raw_warrant_scope!r}" ) ```