# Which invariants prevent delegated sub-agent fan-out from leaking residency-bound payloads across federation boundaries when policy attenuation is evaluated at the wrong hop **Date of Record:** 2026 November 29 **Scope:** Applies to cross-organization agent federations where a delegating agent (the *warrant issuer*) hands a task to a peer agent in another org, and that peer is permitted to fan the task out to further sub-agents. Does not cover single-org tool-calling loops, nor cases where all agents share one trust domain and one data-residency policy engine. ## Core Distinction The failure is not "a policy was missing" and not "a sub-agent was compromised." It is a **hop-localization error in attenuation**: every agent in the chain correctly evaluates the residency policy *it was handed*, but the policy object itself is re-derived at each hop from the *local* view of the payload rather than from the *binding* carried in the delegation warrant. The result is that a residency constraint that was correctly attached at hop 0 is silently dropped at hop 1 because hop 1's policy engine classifies the payload by its *declared* schema (e.g., `type: summary`) rather than by the *provenance tag* (e.g., `origin: eu-customer-pii`) that the warrant carried. The constraint was never violated locally. It was *attenuated out of existence* by a schema-typed re-derivation. The invariant that prevents this is: **residency constraints are carried as an immutable, monotone-decreasing set on the delegation warrant, and no hop may re-derive the constraint set from payload inspection alone.** Attenuation may only *add* constraints (tighten), never *replace* the set with a locally-derived one. This is a lattice join, not an overwrite. ## What Was Observed A three-hop federation: Org A (EU) issues a task to Org B (US) which fans out to Org C (US). The task payload is a customer-support transcript containing EU personal data. Org A's issuer attaches a warrant with `residency: {allowed_regions: ["eu"], provenance: "pii-eu", ttl: 900s}`. Trace of the failure: 1. **Hop 0 (A→B):** A's policy engine evaluates the warrant against payload. `allowed_regions=["eu"]` matches A's local residency. Warrant serialized and signed. Handoff succeeds. B's ingress verifies signature, checks `ttl`, admits the task. 2. **Hop 1 (B internal):** B's orchestrator prepares to fan out to C. It constructs a *new* delegation record. Critically, B's policy engine re-classifies the payload: the transcript is wrapped in a `SummaryEnvelope` whose declared schema is `type: summary`, `classification: internal`. B's engine derives `allowed_regions` from `classification: internal` → `["us","eu"]` (B's default for internal data). The derived set is **wider** than the inherited `["eu"]`. B does not intersect; it *replaces*. The `provenance: "pii-eu"` tag is not propagated because B's envelope schema has no field for it. 3. **Hop 2 (B→C):** C receives a warrant with `allowed_regions: ["us","eu"]` and no provenance tag. C's engine admits. C's sub-agent persists the transcript to a US-region store. Residency violated at rest, not in transit. 4. **Detection:** Only at audit replay, when A's provenance ledger is joined against C's storage manifest. The join key (`provenance`) was dropped at hop 1, so the join *fails open* — the discrepancy is invisible unless the auditor reconstructs the chain from A's side and notices C's manifest has no matching provenance row. The non-obvious part: **every individual hop's policy check passed.** There was no error, no exception, no denied request. The violation is a *join failure across the audit graph*, produced by a schema-typed re-derivation that is locally correct and globally unsound. ## Condition of Validity The attenuation invariant (`constraint_set(child) ⊇ constraint_set(parent)`, i.e., monotone tightening) is only sound when three conditions hold jointly: - **Provenance is a first-class field in every envelope schema in the federation**, not a side-channel annotation. If any hop's envelope type cannot represent the parent's provenance tag, that hop *must* refuse the fan-out rather than drop the tag. A schema that cannot carry provenance is a schema that cannot safely delegate residency-bound payloads. - **The constraint set is a lattice with a defined join**, and the join is `meet` (intersection) over allowed-regions and `union` over required-tags. Re-derivation from payload inspection is permitted only as an *additional* constraint to be intersected in, never as a replacement. - **The warrant signature covers the constraint set transitively**, so a hop cannot present a warrant whose constraint set is not a superset of the parent's. This requires the signature to commit to the *parent warrant hash*, forming a hash chain, not just to the local fields. When any of these fails, the invariant still *appears* to hold at each hop while the global property (no EU-PII reaches a US store) is violated. This is the boundary: the invariant is a *local* check that only implies the *global* property under the transitive-signature and provenance-representability conditions. ## Decision Boundary The operational decision is: **when a hop cannot represent the inherited provenance tag in its outbound envelope, does it (a) drop the tag and proceed, (b) block the fan-out, or (c) escalate to the warrant issuer for a re-issued, narrowed warrant?** - **(a) is always wrong** — it is the failure above. It converts a hard residency constraint into an unenforced annotation. - **(b) is safe but brittle** — it blocks legitimate fan-outs whenever a downstream schema is older than the provenance vocabulary, causing availability collapse during rolling schema upgrades. - **(c) is correct** — the hop must return a `ProvenanceUnrepresentable` condition to the issuer, which re-issues a warrant whose envelope schema is known-representable by the next hop, or narrows `allowed_regions` to the intersection of all downstream hops' capabilities *before* fan-out. The boundary condition is therefore: **fan-out is permitted only across hops whose envelope schemas are provenance-complete with respect to the inherited tag set.** A hop that is provenance-incomplete must be treated as a *residency-unknown* region and excluded from the allowed set at the *issuer*, not at the intermediate hop. Pushing the decision to the issuer is what makes the attenuation monotone — the intermediate hop never has authority to widen, only to refuse. ## Operational Effect Concretely, this changes three things in the federation contract: 1. **Warrants carry a hash chain, not a flat constraint set.** Each hop's signature commits to `hash(parent_warrant)`. Verification at hop *n* walks the chain to hop 0 and checks that `constraints(hop_n) ⊇ constraints(hop_0)` by lattice join. A hop that cannot satisfy the superset check fails admission with a specific error, not a generic policy denial. 2. **Envelope schemas are versioned against a provenance vocabulary.** A hop declares which provenance tags its envelopes can carry. The issuer intersects `allowed_regions` with the set of regions reachable through provenance-complete hops only. Incomplete hops are pruned from the fan-out graph at issuance time. 3. **Audit joins are keyed on the warrant hash chain, not on payload provenance alone.** The replay joins A's ledger to C's manifest via the chain hash, so a dropped tag surfaces as a *missing chain link* rather than a silent mismatch. The failure becomes loud. The invariant to encode: **no hop may widen the residency constraint set; a hop that cannot preserve the provenance tag must refuse and defer re-issuance to the warrant issuer.** The guardrail is a monotone lattice join over a transitively-signed warrant chain, with provenance representability as a precondition for fan-out admission. ```python from dataclasses import dataclass, field from typing import FrozenSet class ResidencyAttenuationError(RuntimeError): """Raised when a hop's derived constraint set is not a superset of the inherited warrant's constraint set, or when provenance cannot be carried.""" pass @dataclass(frozen=True) class Warrant: allowed_regions: FrozenSet[str] required_provenance: FrozenSet[str] parent_hash: str | None = None ttl_s: int = 900 @dataclass(frozen=True) class Envelope: declared_type: str carried_provenance: FrozenSet[str] representable_provenance: FrozenSet[str] = field(default_factory=frozenset) def attenuate(parent: Warrant, envelope: Envelope, next_hop_regions: FrozenSet[str]) -> Warrant: # Precondition: the hop's envelope must be able to carry every provenance # tag the parent warrant requires. If not, refuse; do not drop the tag. missing = parent.required_provenance - envelope.representable_provenance if missing: raise ResidencyAttenuationError( f"hop cannot represent provenance {sorted(missing)}; " f"refuse fan-out and defer to issuer for re-issuance" ) # Constraint set may only tighten: allowed_regions is intersected, # required_provenance is unioned. Never replace with locally-derived set. derived_regions = parent.allowed_regions & next_hop_regions derived_prov = parent.required_provenance | envelope.carried_provenance if not derived_regions <= parent.allowed_regions: raise ResidencyAttenuationError("attenuation widened allowed_regions") if not parent.required_provenance <= derived_prov: raise ResidencyAttenuationError("attenuation dropped required provenance") return Warrant( allowed_regions=derived_regions, required_provenance=derived_prov, parent_hash=hash((parent, envelope)), ttl_s=parent.ttl_s, ) def admit(hop_warrant: Warrant, chain_root: Warrant) -> None: # Transitive superset check against the root, not just the immediate parent. if not chain_root.allowed_regions >= hop_warrant.allowed_regions: raise ResidencyAttenuationError( f"hop allowed_regions {sorted(hop_warrant.allowed_regions)} " f"not a subset of root {sorted(chain_root.allowed_regions)}" ) if not chain_root.required_provenance <= hop_warrant.required_provenance: raise ResidencyAttenuationError("root provenance tag lost across chain") ```