# In what scenarios must an instance reject a federated peer's brokered trust warrant when the negotiation transcript hash diverges from the capability advertisement it was signed over **Date of Record:** 2026 November 29 **Scope:** Applies to cross-org agent federations where domain A accepts a task routed from domain B, and B's trust broker presents a signed warrant attesting that A's capabilities were vetted during a policy negotiation. Does not apply to intra-domain routing where the broker and the executor share a single trust root, nor to stateless capability lookups that carry no warrant. ## Core Distinction The failure is not "a peer lied about its capabilities." That is a straightforward signature failure. The non-obvious boundary is this: a federation can be fully signature-valid at every hop while the *semantic object* the signature was computed over has drifted from the *semantic object* the receiving domain actually reasons about. Trust brokering introduces a translation layer — domain B's broker signs a warrant over B's *local* representation of A's capability manifest, then hands A a *re-serialized* copy for A to verify against. If the broker's canonicalization is lossy (key ordering, numeric precision, optional-field elision, Unicode normalization), the hash A recomputes over the transcript will match the hash the broker signed, but the *capability constraints* encoded in that transcript may not be the constraints A will actually enforce at execution time. The signature is intact; the invariant it was supposed to guarantee — "the capabilities I was vetted for are the capabilities I will be held to" — is not. This is a continuity invariant across a state transfer boundary, not an authentication failure. The distinction matters because every standard mitigation (verify signature, check expiry, check issuer against trust anchor) passes. ## What Was Observed Federation between `org-alpha` (task origin, runs the router) and `org-beta` (executor, hosts a `pdf-extract` agent). Alpha's broker negotiates a policy with Beta: Beta's `pdf-extract` may be invoked with `max_pages <= 500` and `allowed_mime = ["application/pdf"]`. The broker produces a negotiation transcript, canonicalizes it to JSON-C (sorted keys, no floats), hashes it, and embeds the hash in a signed warrant as `transcript_digest`. Beta's `pdf-extract` receives the warrant plus a *re-rendered* transcript for verification. The re-render is produced by a different serializer in Beta's execution path than the one the broker used. Two divergences surfaced empirically: 1. **Numeric precision.** The broker canonicalized `max_pages: 500` as integer `500`. Beta's execution-path serializer, reading from an internal config store that stored the value as `500.0`, emitted `500.0`. JSON-C distinguishes `500` from `500.0` in the digest. Beta's verifier recomputed the digest over `500.0`, got a mismatch against `transcript_digest`, and — because the verifier was written to "fail open on digest mismatch, log and proceed, since signature already validated" — *did not reject*. It proceeded to enforce `max_pages <= 500.0`, which is behaviorally identical, so the incident was silent for weeks. 2. **Optional-field elision.** The transcript included `"redaction_policy": null` on the broker side (explicit null, included in digest). Beta's execution serializer omitted null-valued fields entirely. Now the digest mismatch was *semantic*: the transcript Beta verified against was missing a field that the signed transcript contained. The field happened to be null, so no constraint was lost — but the same elision applied to a *populated* `redaction_policy` on a later negotiation would have silently dropped a data-handling constraint that the broker had negotiated and signed. The verifier, still fail-open, would have accepted a warrant whose signed constraints exceeded the constraints Beta actually enforced. The general form: **the warrant's integrity guarantee is over the broker's serialization, but the executor enforces over its own serialization, and nothing in the protocol binds the two.** The trust chain is cryptographically complete and operationally broken. ## Condition of Validity The invariant "signature validity implies constraint fidelity" holds only when all of the following are true, and the failure mode is precisely the case where they are asserted but not checked: - The canonicalization function used to compute `transcript_digest` is *identical* (same code, same version, same config) to the one used by the executor to recompute it. "Both use JSON-C" is insufficient; JSON-C has implementation variance in float formatting, and null/absent handling is not specified by the canonicalization contract at all. - The transcript is the *authoritative* source of the constraints the executor enforces — i.e., the executor does not re-derive constraints from a separate config store that was populated by a different path. - Optional fields are either always present (null included) or always absent, and the canonicalization spec pins which. If the spec is silent, two conformant implementations will disagree, and the disagreement is invisible to signature verification. When any of these fails, the warrant still verifies. The validity condition is about *semantic* identity of the signed and enforced objects, which no signature checks. ## Decision Boundary An instance must reject — not fail-open — when the recomputed digest over its *enforcement-path* transcript does not equal `transcript_digest`, **and** it must additionally reject when the two transcripts are byte-identical after canonicalization but the executor's constraint set was derived from any source other than that transcript. The second clause is the one operators miss: a digest match on a transcript the executor ignores is worse than a mismatch, because it manufactures false assurance. Concretely, the boundary is: - **Reject** if enforcement-path canonicalization of the received transcript ≠ `transcript_digest`. Do not log-and-proceed. A mismatch means the executor's serializer and the broker's serializer disagree, which means the executor cannot prove the constraints it will enforce are the constraints that were signed — even if this particular divergence is benign. Benignness is not verifiable from inside the executor. - **Reject** if the executor's active constraint set (the one it will actually apply to the task) is not *constructed by parsing the verified transcript*. If constraints arrive via a side channel — a config store, a cache, a prior session — the warrant attests to something the executor is not using. - **Accept** only when the executor re-derives its constraint set by parsing the exact transcript whose canonicalized digest matched, and enforces from that parsed object. This makes the signed object and the enforced object the same object by construction, not by convention. The fail-open-on-mismatch pattern is the specific anti-pattern to forbid. It is defensible for telemetry and indefensible for constraint enforcement. ## Operational Effect Federations that enforce the strict boundary observe a class of negotiation failures that look like spurious rejections: a peer's warrant is valid, the signature checks out, and the receiving domain still refuses the task. The correct response is not to relax the check but to fix the serializer divergence and re-negotiate. The rejections are the invariant doing its job — they are the only signal that the broker's canonicalization and the executor's canonicalization have drifted, and that signal is otherwise completely silent. The cost is real: cross-org negotiations fail more often during integration, and every failure requires a round-trip to reconcile serializers rather than a local patch. The benefit is that the federation never enforces a constraint set it cannot prove was signed. For a fleet doing inter-domain task routing with data-handling policies attached, that proof is the entire point of brokering trust across the org boundary; a warrant that verifies but does not bind is worse than no warrant, because it is trusted. The durable architectural fix is to make the executor's constraint set a *projection of the verified transcript object* — parse once, verify the digest of that parse, enforce from that same object — so that no second serialization exists to diverge from the first. ```python import hashlib import json from dataclasses import dataclass from typing import Any class WarrantConstraintDivergence(RuntimeError): """Raised when the executor's enforcement-path transcript does not bind to the signed warrant.""" pass @dataclass(frozen=True) class SignedWarrant: issuer: str transcript_digest: str signature_valid: bool def canonicalize(transcript: dict[str, Any]) -> bytes: # Pinned canonical form: sorted keys, explicit nulls preserved, ints not floats. return json.dumps(transcript, sort_keys=True, separators=(",", ":"), allow_nan=False).encode("utf-8") def enforce_federated_task( warrant: SignedWarrant, received_transcript: dict[str, Any], side_channel_constraints: dict[str, Any] | None, ) -> dict[str, Any]: if not warrant.signature_valid: raise WarrantConstraintDivergence(f"warrant from {warrant.issuer} failed signature check") enforcement_digest = hashlib.sha256(canonicalize(received_transcript)).hexdigest() if enforcement_digest != warrant.transcript_digest: # Fail closed. A mismatch means serializer drift; benignness is not verifiable here. raise WarrantConstraintDivergence( f"enforcement-path digest {enforcement_digest[:12]} != signed " f"{warrant.transcript_digest[:12]} for issuer {warrant.issuer}" ) if side_channel_constraints is not None: # Even with a matching digest, constraints sourced outside the transcript are unbound. raise WarrantConstraintDivergence( "constraint set derived from side channel, not from verified transcript" ) # Enforce directly from the parsed transcript object — no second serialization exists. return received_transcript ```