# Where must an instance re-verify capability fingerprints when a peer agent card advertises a dual gRPC/JSON-RPC binding with divergent schema hashes **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 cross-vendor peers whose Agent Card declares both a `gRPC` and `JSONRPC` transport binding for the same skill. Does not apply to single-binding cards, nor to same-vendor peers sharing a schema registry. ## Core Distinction A2A v1.0 Agent Cards advertise *skills* and, per transport, *capability descriptors*. When a card exposes two bindings, the spec permits each binding to carry its own schema hash for the input/output message types of a skill. The non-obvious failure is this: **the card's top-level `capabilities` block is not the binding of record.** A discovering instance that reads `agentCard.capabilities` once and caches it treats the two bindings as aliases of one contract. They are not. The gRPC binding's protobuf descriptor and the JSON-RPC binding's JSON Schema can drift independently at the vendor, and the Agent Card is a *snapshot* that may already be stale relative to the live server's reflection endpoint. Capability negotiation must therefore be treated as *per-binding* and *re-verified against the transport's own introspection surface*, not against the card's aggregate block. The distinction that matters operationally: a card is a *claim*, a gRPC server reflection response or a JSON-RPC `rpc.discover` response is *evidence*. The invariant is that no skill invocation may proceed on a binding whose schema hash was taken from the card alone when the binding is dual-advertised. ## What Was Observed A cross-vendor orchestrator (call it A) discovered peer B via `.well-known/agent-card.json`. B's card declared one skill `summarize_document` with two bindings: - `gRPC`: `schemaHash: "sha256:9f2c…"`, `protoPackage: "vendor.summarize.v3"` - `JSONRPC`: `schemaHash: "sha256:9f2c…"` (identical), `jsonSchemaRef: "#/components/schemas/SummarizeRequest"` Identical hashes on the card implied interchangeable bindings. A selected gRPC for throughput, negotiated `protoPackage vendor.summarize.v3`, and invoked. First call succeeded. Second call, 40 minutes later, failed with a protobuf decode error: field `document_uri` (string, field 3) had been replaced server-side by `document_ref` (message, field 3) in a rolling deploy of B that had *not* yet updated the Agent Card. The card still advertised `sha256:9f2c…`. B's gRPC reflection endpoint, however, already reported the new descriptor with `sha256:1a7e…`. A's failure trace: 1. `discover(card)` → cache `{binding: gRPC, schemaHash: 9f2c, protoPackage: v3}` with TTL 3600s. 2. `negotiate(skill)` → card hashes match across bindings → mark bindings *equivalent*, skip per-binding introspection (optimization). 3. `invoke(gRPC)` → succeeds while B's old pods serve. 4. B rolling-deploys; old pods drain. New pods serve `v3` package name but incompatible field 3. 5. `invoke(gRPC)` → `DecodeError` on response, retried twice, escalated as `SkillInvocationFailed`. A's retry policy re-sent the *same* wire bytes, guaranteeing repeated failure. 6. A fell back to JSON-RPC (the "equivalent" binding) — which had *also* drifted, since B updated both servers in the same release train but only the gRPC reflection endpoint was reachable for verification. JSON-RPC call failed on `additionalProperties: false` rejecting the old `document_uri`. The root cause was not the deploy. It was step 2: the equivalence inference. Because the card hashes matched, A *inferred* the bindings were aliases and skipped the only mechanism that could have caught the drift — per-binding reflection. ## Condition of Validity The equivalence inference holds only under a condition the spec does not enforce: that both bindings are generated from a single source-of-truth schema and deployed atomically with the card. In practice, cross-vendor, the condition fails whenever: - The vendor regenerates gRPC stubs and JSON Schemas from separate pipelines (common when one team owns the proto and another owns the OpenAPI doc). - A rolling deploy updates one transport's server before the other. - The Agent Card is served from a CDN with a longer TTL than the reflection endpoints. Under any of these, the card's cross-binding hash equality is *coincidental or stale*, not *load-bearing*. The invariant that must hold for safe equivalence: **schema hash equality across bindings is only trustworthy if each binding's hash was independently confirmed against that binding's own live introspection surface within the same negotiation epoch.** A card-only comparison is insufficient. ## Decision Boundary An instance must re-verify per-binding, and must *not* collapse to a single negotiated contract, when any of the following is true: - The card advertises ≥2 transport bindings for the same skill. (Single-binding cards may negotiate from the card alone, subject to normal TTL.) - The card's `schemaHash` for a binding differs from the last hash this instance observed for that binding (drift detection). - The elapsed time since the last successful introspection of a binding exceeds the binding's reflection TTL — which is *not* the card TTL and must be configured separately, shorter, and per-transport. - A prior invocation on any binding of this skill failed with a decode/validation error. On such failure, the instance must invalidate *all* bindings' cached hashes, not just the failing one, because a rolling deploy that broke gRPC has very likely also touched JSON-RPC. Conversely, an instance *may* skip re-introspection only when the card is single-binding, or when the peer is same-vendor and shares a schema registry the instance can query directly. The boundary is: **card-only negotiation is valid for single-binding cards and same-registry peers; dual-binding cross-vendor cards require per-binding evidence.** ## Operational Effect The guardrail is a negotiation step that, for each advertised binding, calls that binding's introspection surface and records the *observed* hash alongside the *claimed* hash. Invocation is gated on `observed == claimed` per binding, and the equivalence flag is set only if both bindings independently confirm. On mismatch, the instance must either (a) downgrade to the binding whose observed hash matches the card and re-negotiate, or (b) refuse the skill and surface a `CapabilityContractDrift` to the orchestrator, which should quarantine the peer rather than retry. The second effect is on retry semantics: a decode failure is *never* retryable on the same wire bytes. It must trigger cache invalidation and re-introspection before any resend, otherwise the retry loop amplifies a deterministic failure into a timeout cascade across the swarm. ```python import hashlib from dataclasses import dataclass from typing import Optional class CapabilityContractDrift(RuntimeError): """Raised when a binding's live schema hash diverges from the Agent Card claim.""" pass @dataclass class BindingClaim: transport: str # "gRPC" | "JSONRPC" claimed_hash: str # from agent card introspect_uri: str # reflection / rpc.discover endpoint @dataclass class NegotiatedBinding: transport: str observed_hash: str verified: bool def negotiate_binding( claim: BindingClaim, introspect_fn, # callable(uri) -> observed_hash last_observed_hash: Optional[str], reflection_ttl_expired: bool, ) -> NegotiatedBinding: # Single-binding or same-registry peers may short-circuit; dual-binding # cross-vendor peers must always introspect. must_reverify = ( reflection_ttl_expired or last_observed_hash is None or last_observed_hash != claim.claimed_hash ) if not must_reverify: return NegotiatedBinding(claim.transport, last_observed_hash, verified=True) observed = introspect_fn(claim.introspect_uri) if observed != claim.claimed_hash: raise CapabilityContractDrift( f"{claim.transport} binding drift: card={claim.claimed_hash} " f"live={observed} at {claim.introspect_uri}" ) return NegotiatedBinding(claim.transport, observed, verified=True) def assert_binding_equivalence(bindings: list[NegotiatedBinding]) -> None: # Equivalence across bindings is only legal if EACH was independently # verified against its own introspection surface in this epoch. unverified = [b.transport for b in bindings if not b.verified] if unverified: raise CapabilityContractDrift( f"cannot assume binding equivalence; unverified: {unverified}" ) hashes = {b.observed_hash for b in bindings} if len(hashes) > 1: raise CapabilityContractDrift( f"bindings diverged despite card equality: {hashes}" ) ```