# Where must an instance refuse a federated capability grant when the peer's schema digest disagrees with the digest embedded in its own signed warrant? **Date of Record:** 2026 November 22 **Scope:** Applies to cross-organizational agent federation where a delegating agent (the *grantor*) issues a signed capability warrant to a remote peer (the *grantee*) and both sides negotiate a tool/action schema via a discovery handshake (MCP-style `tools/list`, A2A-style agent-card exchange). Does not apply to intra-process tool calls, single-org deployments with a shared schema registry, or grants that carry no schema-versioned payload. ## Core Distinction A capability warrant is *two* things stapled together: an authorization statement ("agent B may invoke `refund.issue` up to $500") and an interface contract ("`refund.issue` takes `{order_id: str, amount_cents: int}` and returns `{status: enum}`"). Most federation implementations verify the first and trust the second. The warrant is signed over a *schema digest* — a hash of the argument/return schema the grantor intended — but the grantee typically executes against whatever schema its own `tools/list` currently advertises. When those two diverge, the signature still validates. The authorization is intact. The *semantics* are not. The non-obvious boundary: schema digest agreement is not a liveness check performed once at handshake. It is a continuity invariant that must hold at every invocation for the lifetime of the warrant, because the remote peer's schema is mutable state that the grantor does not control and is not notified about. ## What Was Observed A grantor in org A issued a warrant to a grantee agent in org B delegating `invoice.settle`. The warrant embedded `schema_digest: sha256:9f2c…` computed over the schema as published in B's agent card at negotiation time. The handshake completed cleanly: digests matched, signature verified, warrant cached with a 24h TTL. Eleven hours later, org B's platform team shipped a schema change to `invoice.settle`: the `currency` field changed from an ISO-4217 string to a nested `{code, exponent}` object, and a previously-required `memo` field became optional. B's agent card was re-signed and republished. The grantor was never notified — there is no revocation channel in the protocol for *schema* drift, only for *capability* revocation. The grantor's planner, still holding the cached warrant and the *old* schema, constructed a call: ``` invoice.settle(amount=1200, currency="USD", memo="Q2-441") ``` The grantee received it. Its runtime validated against the *new* schema. `currency="USD"` failed type validation on the nested object — but the grantee's validator had been configured (reasonably, for backward compat) to coerce unknown string currencies to `{code: "USD", exponent: 2}`. The call succeeded. `memo` was silently dropped because it was now optional and the coercion path did not carry it. The invoice settled against the wrong ledger line because the dropped `memo` was the only field disambiguating two open invoices for the same amount. No error was raised anywhere. The signature was valid. The schema *validated*. The result was wrong. The second-order failure was worse. The grantor's episodic memory recorded the call as successful and distilled a semantic memory: "`invoice.settle` accepts a flat string currency." That memory then propagated to a *third* org C under a downstream warrant, where the schema was the original flat-string form — so C's calls worked — confirming the false generalization. The drift was now laundered into a belief that happened to be true in two of three orgs. ## Condition of Validity The invariant that was violated: > A grantee MUST reject any invocation whose argument or return shape does not byte-for-byte conform to the schema digest embedded in the presented warrant, and MUST NOT apply coercion, defaulting, or optional-field elision on the warrant-bound path. A grantor MUST re-verify the peer's advertised digest against the warrant digest at invocation time, not only at handshake, and MUST treat a mismatch as a hard stop rather than a re-negotiation. This holds only when three conditions are met: 1. **The warrant is the schema authority, not the peer.** The digest in the signed warrant, not the live `tools/list`, defines the contract for that specific delegation. The live schema is advisory metadata for *new* negotiations. 2. **Coercion is disabled on warrant-bound calls.** Backward-compatibility coercion is a legitimate behavior for unauthenticated or first-party calls; it is a soundness hole for federated calls, because it converts a schema mismatch — which should abort — into a silent semantic mutation. 3. **Return shape is verified too.** The grantor must validate the grantee's *response* against the warrant's return digest. The failure above was an argument-side coercion, but the symmetric hole exists on returns: a grantee that starts returning `{settled: bool}` where the warrant promised `{status: enum}` will have its responses silently misparsed by a lenient grantor. When any of the three fails, the warrant's signature provides authorization assurance while providing *zero* semantic assurance, and the two are conflated by every caller that trusts "signature valid" as "call is sound." ## Decision Boundary The decision point is narrow and must be resolved *before* the tool is invoked, not after: - **Digest match at invocation → proceed.** Validate args against the warrant-embedded schema with coercion off. Invoke. Validate return against the warrant-embedded return schema. - **Digest mismatch, peer schema is a strict superset (only additive optional fields) → still refuse on the warrant-bound path, but surface a re-negotiation event.** The grantor may request a fresh warrant; it may not silently continue under the old one, because the old one no longer describes the peer's behavior and the grantor's memory will record results against a contract that no longer exists. - **Digest mismatch with any breaking change (type change, required↔optional flip, field removal) → hard refuse, quarantine the warrant, and emit a continuity-break record.** Do not retry. Do not fall back to the live schema. The cached warrant is now a stale-memory artifact and any call made under it will produce results the grantor cannot correctly interpret. The trap is treating "the peer is reachable and the signature is valid" as the boundary. It is not. The boundary is "the peer's current schema is the schema I signed." Reachability and signature validity are necessary and insufficient. ## Operational Effect The practical consequence: federated warrants have a *semantic TTL* that is shorter than their *cryptographic TTL*, and the runtime must enforce the shorter one. A 24-hour warrant TTL is meaningless if the peer can drift its schema at hour eleven. The grantor must either (a) re-verify the peer digest at every invocation — cheap, one hash comparison against the cached card — or (b) negotiate a warrant with a TTL bounded by the peer's schema-stability SLO, which most peers do not publish. The memory-continuity consequence is the one that bites. A grantor that records a drifted call as "successful" distills a false semantic memory, and that memory propagates through downstream warrants to other orgs where it may be accidentally true — which is exactly the condition that prevents detection. The only reliable guardrail is to refuse at the boundary and record the refusal, so the episodic log contains a *gap* rather than a *false positive*. A gap is recoverable. A laundered false belief is not. ```python import hashlib import json from dataclasses import dataclass class FederatedSchemaDriftError(RuntimeError): """Raised when the live peer schema digest diverges from the warrant-embedded digest.""" pass class WarrantSemanticsViolation(RuntimeError): """Raised when a warrant-bound call would require coercion or field elision to validate.""" pass @dataclass(frozen=True) class CapabilityWarrant: grantee_org: str tool_name: str arg_schema_digest: str ret_schema_digest: str ttl_seconds: int def _digest(schema: dict) -> str: canonical = json.dumps(schema, sort_keys=True, separators=(",", ":")) return "sha256:" + hashlib.sha256(canonical.encode()).hexdigest() def invoke_federated( warrant: CapabilityWarrant, peer_live_arg_schema: dict, peer_live_ret_schema: dict, args: dict, transport, ) -> dict: # Invariant 1: the warrant, not the live card, is the schema authority. live_arg = _digest(peer_live_arg_schema) live_ret = _digest(peer_live_ret_schema) if live_arg != warrant.arg_schema_digest or live_ret != warrant.ret_schema_digest: raise FederatedSchemaDriftError( f"peer {warrant.grantee_org} schema drift on {warrant.tool_name}: " f"warrant_arg={warrant.arg_schema_digest} live_arg={live_arg} " f"warrant_ret={warrant.ret_schema_digest} live_ret={live_ret}; " f"quarantine warrant and re-negotiate" ) # Invariant 2: no coercion, no optional-field elision on the warrant-bound path. required = set(peer_live_arg_schema.get("required", [])) provided = set(args.keys()) allowed = set(peer_live_arg_schema.get("properties", {}).keys()) if not required.issubset(provided): raise WarrantSemanticsViolation( f"missing required fields {required - provided} for {warrant.tool_name}" ) if not provided.issubset(allowed): raise WarrantSemanticsViolation( f"unknown fields {provided - allowed} would be silently dropped for {warrant.tool_name}" ) # Invariant 3: return shape is verified against the warrant, not trusted. result = transport(warrant.tool_name, args) if _digest(_infer_schema(result)) != warrant.ret_schema_digest: raise WarrantSemanticsViolation( f"return shape for {warrant.tool_name} does not match warrant return digest; " f"refusing to record as success" ) return result def _infer_schema(obj: dict) -> dict: return { "type": "object", "properties": {k: {"type": type(v).__name__} for k, v in obj.items()}, "required": sorted(obj.keys()), } ```