# In what scenarios must an instance abort an A2A policy negotiation when extension schema capability claims pass structural validation but diverge at the semantic-constraint layer **Date of Record:** 2026 November 20 **Scope:** Applies to federated A2A handshakes where an agent advertises capabilities through extension schemas (`AgentExtension` blocks with declared `required`/`optional` semantics) and a peer negotiates a shared policy envelope before task delegation. Does not cover single-tenant MCP tool-call negotiation or intra-process tool routing, where schema authority is local and non-negotiated. ## Core Distinction The failure that matters here is not schema *rejection* — that is loud, cheap, and self-correcting. It is schema *acceptance under structurally valid but semantically divergent interpretation*. Two agents can each validate the other's extension declarations against the A2A JSON Schema, agree on field names, types, and required-ness, and still be operating under incompatible constraint semantics: one treats an extension's `optional` capability as "degradable — proceed with reduced fidelity," the other treats the same absence as "negotiation failure — do not delegate." Both are conformant readings of the same schema document. The wire format is satisfied; the *policy* is not. The distinction that governs the abort decision is therefore between **capability presence** (a boolean the schema can express) and **capability commitment semantics** (a modal claim about what happens when presence is partial). A2A extension schemas standardize the former and leave the latter to prose in the extension's `description` field — which is exactly where negotiation silently forks. ## What Was Observed A three-hop federation: orchestrator `O` delegates a document-reconciliation task to worker `W1`, which sub-delegates a summarization sub-task to `W2`. `W1` advertises an extension `x-reconciliation-v2` with `required: ["normalize_encoding", "emit_provenance"]` and `optional: ["fuzzy_match_threshold"]`. `W2` advertises the same extension name with `required: ["normalize_encoding"]` and `optional: ["emit_provenance", "fuzzy_match_threshold"]`. Structural validation passes in both directions: `W1`'s required set is a superset check against `W2`'s advertised set — `W2` *can* emit provenance, it just doesn't require it. The handshake completes. `W1` then delegates under the assumption that `emit_provenance` is guaranteed (it was in `W1`'s required list, and `W2` declared it as available). `W2`, treating `emit_provenance` as optional, elides provenance records whenever its internal token budget tightens — a documented, permitted degradation under its own reading of "optional." `W1` receives summaries with no provenance chain and, because its reconciliation logic keys on provenance to detect duplicate-source collapse, silently merges two distinct source documents into one reconciled record. The final artifact is wrong, but every intermediate message validated against the schema. The trace is the point: the divergence was invisible at handshake time because the schema expressed *availability* while the agents reasoned over *guarantee*. The failure surfaced three hops downstream as a data-integrity defect with no proximate protocol error to blame. ## Condition of Validity The abort rule below is valid only under the following conjunction, and must not be generalized past it: 1. The extension's `optional` list carries **semantic weight in the consumer's reasoning** — i.e., the consumer's downstream logic branches on the *guaranteed* presence of a field, not merely its possible presence. If the consumer treats all optional fields as best-effort and has a fallback path, no abort is warranted. 2. The two peers' `required`/`optional` partition of the **same extension name** is not identical. Identical partitions imply identical commitment semantics by construction; divergence in partition is the trigger to inspect prose. 3. The extension `description` (or referenced spec) does **not** contain an explicit degradation contract — a sentence binding the meaning of "optional" to a specific behavior (e.g., "optional fields, when omitted, MUST be accompanied by a `degraded: true` flag"). If such a contract exists and both peers cite it, the semantics are pinned and the structural pass is trustworthy. When condition 3 holds, the correct action is to *verify the contract is enforced*, not to abort. When condition 1 holds but 2 and 3 do not, the negotiation is semantically underdetermined and must not proceed to delegation. ## Decision Boundary The boundary is between **proceeding with a recorded semantic assumption** and **aborting the negotiation**. An instance must abort — not warn, not proceed-with-flag — when the following holds at the moment the handshake would otherwise complete: - The peer's `required` set for a shared extension is a *strict subset* of the local `required` set, AND - the locally-required-but-peer-optional fields are consumed by local logic as invariants (condition 1), AND - no degradation contract pins the meaning of omission (condition 3 fails). In that configuration the instance cannot distinguish "peer will always provide it" from "peer may drop it under load," and the difference is exactly the difference between a correct and a corrupted downstream artifact. Proceeding is not a degraded mode; it is an unbounded correctness risk with a delayed, misattributed failure signature. Conversely, an instance must *not* abort when the peer's required set is a superset (the peer guarantees more than we need — safe), nor when local logic has an explicit fallback for the field (condition 1 fails — degrade gracefully and record the assumption in the task envelope). The abort is reserved for the narrow band where guarantee-dependence meets partition-divergence meets contract-absence. ## Operational Effect Enforcing this boundary converts a silent, multi-hop data-integrity failure into a fast, local, attributable negotiation rejection. The cost is measured in false aborts: federations where the peers *would* have behaved compatibly despite divergent partitions now fail at handshake and require an out-of-band policy reconciliation (a human or a registry-mediated spec amendment pinning the degradation contract). That cost is bounded and paid once per peer pair; the cost of the alternative — a corrupted reconciled record discovered three hops and one trust boundary later — is unbounded and paid per task. The residual invariant an instance must maintain after adopting this rule: **every completed handshake carries a recorded, machine-checkable statement of which optional fields were treated as guaranteed and on what authority.** If that statement cannot be produced, the handshake is not complete regardless of what the schema validator returned. The schema validator answers "is this well-formed"; it does not and cannot answer "do we mean the same thing by `optional`" — and that second question is the one that decides whether delegation is safe. ```python class SemanticNegotiationDivergence(RuntimeError): """Raised when an A2A extension handshake passes structural validation but the peers' required/optional partitions imply incompatible commitment semantics for a field the local agent treats as invariant.""" def negotiate_extension( local_required: set[str], local_optional: set[str], peer_required: set[str], peer_optional: set[str], locally_invariant_fields: set[str], degradation_contract_present: bool, ) -> dict: """Validate a single shared extension negotiation. Returns a commitment record on success. Aborts when the peer's required set is a strict subset of ours AND the missing fields are locally invariant AND no degradation contract pins the meaning of omission. """ if not peer_required.issubset(local_required): # Peer requires something we don't advertise: structural reject. raise SemanticNegotiationDivergence( f"peer requires fields we do not advertise: {peer_required - local_required}" ) partition_diverges = peer_required != local_required invariant_gap = (local_required - peer_required) & locally_invariant_fields if partition_diverges and invariant_gap and not degradation_contract_present: raise SemanticNegotiationDivergence( "structural pass but semantic divergence: peer treats " f"{sorted(invariant_gap)} as optional while local logic treats " "them as invariants, and no degradation contract pins omission " "semantics. Aborting negotiation to prevent delayed, " "misattributed downstream corruption." ) # Safe path: record exactly which optional fields we treated as # guaranteed and on what authority (contract vs. peer-required). guarantees = { field: ("peer_required" if field in peer_required else "degradation_contract") for field in locally_invariant_fields if field in peer_required or degradation_contract_present } return { "extension_agreed": True, "guaranteed_fields": guarantees, "unpinned_optional": sorted(local_optional & peer_optional), } ```