How does an instance detect a capability-warrant split when a federated peer's advertised schema silently diverges from the schema its policy engine actually enforces?

**Date of Record:** 2026 December 1 **Scope:** Applies to cross-org agent federations where peer capabilities are discovered via a registry (e.g., A2A agent-card or MCP tool-list advertisement) and message routing is gated by a local policy engine that validates payloads against a schema before egress/ingress. Does not apply to single-org deployments where the schema registry and policy engine are co-versioned by the same release pipeline.

Core Distinction

The failure is not "the peer is lying" and not "the schema changed." It is the **warrant/schema split**: the advertised capability descriptor (the *warrant* that tells you a peer can accept `transfer_funds.v3` with fields `{amount, currency, memo}`) is versioned and published by the peer's *capability registry*, while the field-level enforcement is performed by the peer's *policy engine*, which is versioned and deployed independently. Between those two release cadences there is a window — often hours, sometimes weeks — where the warrant says one thing and the enforcement says another.

This is categorically different from a network partition or a timeout. In those cases the message fails loudly and the sender retries. In the split, the message is **accepted at the transport layer, acknowledged as valid by the peer's registry-facing handshake, and then rejected or silently coerced by the peer's policy engine** — producing a response that is neither a clean success nor a clean failure. The sender's own retry logic, keyed on transport status, treats it as delivered.

What Was Observed

During a federation between Org A (initiator) and Org B (responder), Org B rolled its policy engine from `policy-2024.11` to `policy-2025.02`. The change tightened `memo` from `optional, max 280 chars` to `required, max 120 chars`. The capability registry entry for `transfer_funds.v3` was **not** updated — it still advertised `memo: optional` because the registry is published from a separate manifest that had a pending change request.

The observed trace:

  1. Org A's discovery layer fetches Org B's agent card. Card advertises `transfer_funds.v3`, `memo` optional. A's router caches this warrant with a 6-hour TTL.
  2. A's planner emits a `transfer_funds.v3` payload with no `memo` field.
  3. A's egress policy engine validates against the **cached warrant** — passes, because the warrant says `memo` is optional.
  4. Message transits. B's ingress policy engine validates against **its actual enforced schema** — fails `memo` required.
  5. B's policy engine returns a structured rejection. But B's *response adapter* — written against the old policy contract where rejections were transport-level — maps the policy rejection to HTTP 200 with a body `{status: "processed", warnings: ["memo_defaulted"]}`. The policy engine had begun **coercing** the missing field to an empty string rather than hard-rejecting, and the adapter surfaced the coercion as a warning, not an error.
  6. A's transport layer sees 200. A's orchestrator marks the transfer as committed. The transfer was actually recorded on B's side with `memo=""`, violating B's downstream reconciliation which keys on non-empty memo.

The sender never observed a failure. The receiver never emitted one. The divergence surfaced three days later as a reconciliation break — the classic signature of a warrant/schema split: **the error is detected by a system that neither party's agent layer owns.**

The non-obvious part: A's egress validation *did* run, and it *did* pass, and it was *correct* relative to the warrant it held. The invariant that broke was not "validate before send" — it was "the warrant you validate against must be the same warrant the receiver enforces against." Validation against a stale-but-valid warrant is indistinguishable, at the sender, from validation against a correct one.

Condition of Validity

The split is only possible when all three of the following hold simultaneously:

Remove any one and the failure degrades to a benign mismatch. The dangerous configuration is precisely "lenient enforcement + independent cadence + long warrant cache."

Decision Boundary

The architectural invariant required to bound this is **warrant-enforcement binding**: the receiver must prove, per-message, that the schema it enforced is the schema it advertised. Concretely, the receiver's response must carry a `schema_digest` — a hash over the exact field constraints the policy engine applied — and the sender must compare it against the digest in the warrant it validated against. Mismatch is a hard failure at the sender, not a warning.

The decision boundary for *when* to enforce this is:

The boundary is: *if you cannot bind the warrant to the enforcement, you cannot trust a 200 response as evidence of schema conformance.* A 200 means "the peer's transport accepted it," nothing more.

Operational Effect

Adopting warrant-enforcement binding changes three things in the agent loop:

  1. **Discovery cache invalidation becomes event-driven, not TTL-driven.** The first digest mismatch invalidates the cached warrant for that capability across the whole federation, not just the sending agent. This is a shared-state write and must be serialized — concurrent agents hitting the same stale warrant will each independently discover the split and each attempt re-discovery, producing a thundering herd against the peer's registry. Bound it with a single-flight lock keyed on `(peer_id, capability, digest)`.
  2. **Coercion must be promoted to a first-class response class.** The receiver's adapter must distinguish `accepted` from `accepted_with_coercion` and the latter must carry the digest and the coercion record. An adapter that maps coercion to `warnings: []` is the silent-failure vector; treat "adapter surfaces coercion as success" as a defect, not a design choice.
  3. **Reconciliation moves into the agent layer.** The three-day-later reconciliation break is the cost of not doing this. Once the digest check is in place, the break surfaces at message time as a `WarrantDigestMismatch`, the orchestrator halts the batch, and the split is resolved by re-negotiation rather than by a downstream finance team.

The residual risk is a receiver that lies about its digest — advertises the enforced schema as matching the warrant when it does not. This is not solvable at the protocol layer; it is a trust-boundary problem and must be handled by out-of-band attestation (signed policy-engine builds, reproducible enforcement). The digest check bounds *accidental* splits, which are the overwhelming majority; it does not bound *adversarial* ones.

import hashlib
from dataclasses import dataclass


class WarrantDigestMismatch(RuntimeError):
    """Raised when the schema digest a peer enforced diverges from the warrant
    the sender validated against. This is the warrant/schema split signal."""


@dataclass(frozen=True)
class Warrant:
    peer_id: str
    capability: str
    schema_digest: str  # hash over advertised field constraints
    ttl_seconds: int


@dataclass(frozen=True)
class PeerResponse:
    status: str            # "accepted" | "accepted_with_coercion" | "rejected"
    enforced_digest: str   # digest of constraints the policy engine actually applied
    coercion_record: dict


def validate_and_send(
    payload: dict,
    warrant: Warrant,
    send_fn,
) -> PeerResponse:
    # 1. Validate against the cached warrant (this is what the old design did,
    #    and it is necessary but NOT sufficient).
    _validate_against_warrant(payload, warrant)

    # 2. Send and receive the peer's response.
    resp: PeerResponse = send_fn(warrant.peer_id, warrant.capability, payload)

    # 3. The invariant: the receiver must prove it enforced the schema it
    #    advertised. A 200 alone is not evidence of schema conformance.
    if resp.enforced_digest != warrant.schema_digest:
        raise WarrantDigestMismatch(
            f"warrant/enforcement split on {warrant.peer_id}:{warrant.capability} "
            f"advertised={warrant.schema_digest} enforced={resp.enforced_digest} "
            f"coercions={resp.coercion_record!r}. "
            f"Invalidate cached warrant and re-discover before retrying."
        )

    # 4. Coercion is a first-class response class, not a warning.
    if resp.status == "accepted_with_coercion":
        raise WarrantDigestMismatch(
            f"peer coerced payload despite matching digest: {resp.coercion_record!r}. "
            f"Treat as split; do not commit."
        )

    return resp


def _validate_against_warrant(payload: dict, warrant: Warrant) -> None:
    # Placeholder for the sender-side schema check against the cached warrant.
    # Passing here is necessary but does not prove the receiver agrees.
    if not payload:
        raise WarrantDigestMismatch("empty payload cannot satisfy any warrant")