# How does an instance detect that a federated delegation contract was satisfied by a peer whose policy was silently renegotiated mid-task **Date of Record:** 2026 December 3 **Scope:** Applies to cross-organization agent federations where a delegating instance (the *originator*) hands a task to a peer agent (the *delegate*) under a negotiated policy envelope — data-boundary contract, allowed tool surface, retention class, and provenance obligations. Does not apply to intra-org delegation where a single trust root governs both instances, nor to stateless request/response calls where no policy envelope is carried. ## Core Distinction The failure is not "the delegate violated the contract." It is that the delegate *satisfied* the contract against a **different version of the contract than the one the originator believes is in force**, and both sides return success. A federated delegation carries a policy envelope as an opaque, signed artifact. Between the originator's signing of that envelope and the delegate's execution of the task, the delegate's own policy authority may re-derive, narrow, or widen the envelope — commonly through a local policy refresh, a jurisdiction-specific data-residency rule landing, or an automated renegotiation triggered by a capability-schema change. The delegate then executes against the *new* envelope and returns a completion attestation that references the new envelope hash. The originator, holding only the old hash, sees a structurally valid attestation whose policy digest does not match what it sent — but only if it bothers to check the digest at all, and only if the digest is bound to the *executed* envelope rather than the *received* one. The non-obvious part: the delegate's local renegotiation is usually *correct behavior* under its own governance. It is not malicious, not a bug in the delegate, and not detectable by tool-call auditing on the originator side. The invariant that breaks is that **a delegated task's completion is only meaningful relative to the policy envelope under which it was authorized to execute, and that envelope must be immutable for the duration of the task or the task must be re-authorized.** Federated protocols routinely treat the envelope as a negotiation-time artifact and the attestation as an execution-time artifact, with no enforced binding between them. ## What Was Observed A three-party federation: an originator `A` (research org), a delegate `B` (analytics org in a different jurisdiction), and an auditor `C` (compliance org). `A` negotiates a delegation with `B` over a task that requires reading a customer-behavior dataset resident in `B`'s boundary and returning an aggregate. The negotiated envelope `E1` specifies: retention class `ephemeral`, no raw-row egress, aggregate minimum cell size 25, provenance chain must include the source table version. `A` signs `E1`, transmits it with the task, and records `hash(E1)` in its own task ledger. `B` receives `E1`, validates the signature, and admits the task. At execution time, `B`'s policy authority has, 40 seconds earlier, applied a new residency rule that forces all aggregates derived from that dataset to carry a `jurisdiction: B` provenance tag and to be re-signed by `B`'s policy authority under envelope `E2`. `B`'s agent re-derives the effective envelope, finds `E2` strictly more restrictive than `E1` (it adds a provenance obligation; it does not loosen any data-boundary constraint), and — per its local rule that narrowing is always admissible without renegotiation — executes under `E2`. `B` returns an aggregate plus a completion attestation signed over `hash(E2)`, with a note field "executed under effective policy." `A`'s intake validator checks: attestation signature valid (yes), task ID matches (yes), aggregate satisfies cell-size floor (yes). It does not check that `hash(E2) == hash(E1)`, because the schema defines the attestation's `policy_digest` field as "the policy under which the delegate executed" — which is exactly `E2` — and `A`'s validator was written to confirm *presence* of a digest, not *equality* with the originating envelope. The task is marked complete. `A`'s downstream consumer reads the aggregate as if produced under `E1`, whose retention class was `ephemeral`; `E2`'s residency rule imposes a 90-day retention floor on the provenance record. The two envelopes disagree on retention, and the disagreement is invisible because the completion path never compared them. The auditor `C`, replaying the task from `A`'s ledger, reconstructs `E1`, sees the attestation's `E2` digest, and flags a verification replay discrepancy — but only because `C` was configured to diff digests. `A`'s own monitoring showed green throughout. ## Condition of Validity The failure requires all of the following to co-occur, and is bounded away when any one is absent: 1. **The envelope is negotiated once and treated as static by the originator**, while the delegate's policy authority can re-derive it independently during the task window. If the delegate is required to re-request authorization on any envelope change (a *renegotiation-on-change* rule), the window closes. 2. **The delegate's local policy admits narrowing without renegotiation.** This is the common and defensible rule — narrowing is "safe" from the delegate's perspective — but it is precisely what severs the binding, because the originator never learns the effective envelope was substituted. 3. **The attestation schema binds the digest to the *executed* envelope, not the *received* one.** If the schema requires the attestation to carry both `received_digest` and `executed_digest`, and requires them equal unless a renegotiation record is attached, the originator's validator has something to compare. 4. **The originator's completion validator checks digest presence, not digest equality.** This is the proximate defect and the cheapest to fix. 5. **The two envelopes differ on a constraint the originator's downstream consumer relies on** (retention, egress class, provenance obligation). If they differ only on constraints no consumer reads, the substitution is harmless in effect even though the invariant is still broken. The condition is *not* valid when the federation uses a single shared policy authority (then no re-derivation divergence exists), or when the task is short enough that no policy refresh can land mid-window (a timing bound, not a structural one — do not rely on it). ## Decision Boundary The originator must decide, at attestation intake, between three dispositions, and the boundary between them is the digest comparison plus the renegotiation record: - **Accept** only when `executed_digest == received_digest`, or when a signed renegotiation record is attached that (a) is signed by the delegate's policy authority, (b) is causally ordered after the task's admission and before its completion, and (c) the originator's own policy evaluator confirms the new envelope is *not less restrictive* on every constraint the originator's downstream consumers read. Narrowing is not automatically acceptable: "narrower on data egress but longer retention" is a trade, and the originator owns the retention consequence. - **Quarantine and re-authorize** when the digests differ and either no renegotiation record exists or the originator cannot evaluate the delta. The task result is held, not consumed; the originator re-issues under a fresh envelope with an explicit renegotiation-on-change requirement. - **Reject** when the executed envelope is less restrictive on any constraint the originator's consumer reads, or when the renegotiation record's causal ordering cannot be established from the delegate's signed log. The boundary is *not* drawn on "did the delegate stay within the data boundary." A narrowing substitution stays within the boundary and still breaks the invariant, because the originator's downstream contract was written against `E1`'s retention and provenance terms, not `E2`'s. The decision must be made on envelope identity and delta admissibility, not on boundary compliance alone. ## Operational Effect Once the digest-equality check and renegotiation-record requirement are enforced at intake, the observable effects are: - **False completions drop to zero for narrowing substitutions.** The originator no longer marks tasks complete against an envelope it did not authorize. The cost is a new quarantine path: tasks whose delegates renegotiated mid-window are held for re-authorization, which adds one round-trip of latency on the affected fraction (in the observed federation, roughly 3–6% of cross-jurisdiction tasks during policy-refresh windows, near zero otherwise). - **The delegate's narrowing rule must be paired with an obligation to emit a renegotiation record.** This is a protocol change on the delegate side, not the originator side, and it is the part federations most often miss: the originator can detect the substitution from the digest mismatch, but it cannot *adjudicate* it without the record. Detection without adjudication yields quarantine-forever, which operators route around by disabling the check. The guardrail is only stable if the delegate emits the record. - **Auditor replay becomes deterministic.** `C` no longer needs a bespoke digest-diff configuration; the originator's ledger records both digests and the adjudication disposition, so replay reconstructs the same decision. The verification replay discrepancy that `C` originally caught becomes a first-class, expected record rather than an anomaly. - **The residual risk moves to the delta evaluator.** The originator's policy evaluator must be able to compare two envelopes on the constraint axes its consumers read. If it cannot parse a constraint the delegate's authority introduced, it must quarantine, not accept — an unparseable delta is not a safe delta. The invariant to carry forward: **a delegated completion is a claim about execution under a specific envelope; if the originator cannot prove the executed envelope is the authorized one, or cannot adjudicate the difference, the completion is not consumable regardless of how clean the payload looks.** ```python class EnvelopeSubstitutionError(RuntimeError): """Raised when a delegate's completion attestation references a policy envelope other than the one the originator authorized, and the substitution cannot be adjudicated as an admissible narrowing.""" pass def adjudicate_attestation( received_digest: str, attestation: dict, renegotiation_record: dict | None, originator_policy_evaluator, consumer_reads: set[str], ) -> str: executed_digest = attestation.get("executed_digest") if executed_digest is None: raise EnvelopeSubstitutionError( "attestation carries no executed_digest; cannot bind completion to an envelope" ) if executed_digest == received_digest: return "accept" if renegotiation_record is None: raise EnvelopeSubstitutionError( f"envelope substituted ({received_digest} -> {executed_digest}) " "with no renegotiation record; cannot adjudicate" ) if not originator_policy_evaluator.verify_signature(renegotiation_record): raise EnvelopeSubstitutionError( "renegotiation record signature invalid; substitution unverifiable" ) if not originator_policy_evaluator.causally_ordered( renegotiation_record, after=attestation["task_admitted_at"], before=attestation["completed_at"], ): raise EnvelopeSubstitutionError( "renegotiation record not causally ordered within task window; " "substitution may predate authorization" ) delta = originator_policy_evaluator.diff( renegotiation_record["from_envelope"], renegotiation_record["to_envelope"], ) if delta is None or not delta.parseable: raise EnvelopeSubstitutionError( "envelope delta unparseable; treating as unsafe per quarantine rule" ) for constraint in consumer_reads: if delta.less_restrictive_on(constraint): raise EnvelopeSubstitutionError( f"executed envelope is less restrictive on consumer-read " f"constraint '{constraint}'; reject and re-authorize" ) return "quarantine_and_reauthorize" ```