# Which invariants prevent Agent Card signature/endpoint divergence from silently degrading A2A v1.0 delegation into a wrong-tenant task **Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 task delegation where a client resolves an Agent Card via `.well-known/agent-card.json`, verifies a detached JWS over the card, and then opens a signed JSON-RPC `tasks/send` (or `message/send`) to the card's declared endpoint. Does not cover intra-process tool calling, MCP-only tool servers, or deployments where the resolver and executor share a single trust root and no cross-vendor hop exists. ## Core Distinction An A2A Agent Card is a *signed assertion of capability and identity*, but the signature covers the *document*, not the *binding between the document and the transport endpoint that will actually execute the task*. Verification of the JWS proves "vendor V authored this card." It does not prove "the HTTPS endpoint I am about to POST a signed JSON-RPC envelope to is operated by V, is the same instance V signed for, and will execute under the tenant/skill constraints the card advertises." The failure mode is **card/endpoint divergence**: a validly signed, freshly fetched Agent Card whose `url`, `skills[]`, or `securitySchemes` no longer correspond to the live executor reachable at that URL. Because the card verifies cryptographically, the client's delegation loop treats verification success as delegation-readiness. It is not. The invariant that must be held is *card-identity ≡ endpoint-identity ≡ execution-identity*, and only the first is cryptographically attested by the card alone. ## What Was Observed A client agent (caller) was configured to delegate a document-extraction task to a partner vendor's `extractor` skill. Resolution proceeded: 1. `GET https://partner.example/.well-known/agent-card.json` → 200, `Cache-Control: max-age=86400`. 2. Detached JWS over the card verified against the vendor's published JWKS (`kid: partner-2025-04`). Signature valid. 3. Card declared `"url": "https://partner.example/a2a/v1"`, `"skills": [{"id": "extractor", "inputModes": ["text/plain"], ...}]`, `"securitySchemes": {"bearer": {...}}`, and `"capabilities": {"pushNotifications": true}`. 4. Caller POSTed a signed JSON-RPC `tasks/send` to the declared `url` with `skillId: "extractor"`. The response was a well-formed JSON-RPC `result` with a task object — but the task executed against a **different tenant's** extraction pipeline (staging, not production), returned a `task.id` namespace the caller had never seen, and applied a stale model version. No error was raised. The signature check had passed at step 2; the divergence was introduced between steps 2 and 3 by a **CDN edge that served a cached card from a prior deployment** while the origin behind `/a2a/v1` had already been re-pointed to a new tenant shard. The card's `url` field is a *string*, and the same string resolved to a different backend because the routing layer (host-based) had been changed without a card re-sign, and the cached card outlived the routing change by the full `max-age`. The critical observation: **the caller had no mechanism to bind the signed card to the endpoint it actually reached.** The JWS covered `url` as a literal, but nothing in the protocol required the executor to prove it was *the* executor for that card. The `tasks/send` envelope carried the caller's signature and a `skillId`, but the executor did not echo or attest a card digest. The caller's post-hoc check — "did I get a task back?" — succeeded, so the loop advanced. A second, compounding observation: the vendor's JWKS rotation (`kid: partner-2025-05`) had occurred, but the cached card still referenced `kid: partner-2025-04`. The caller's verifier accepted the old `kid` because the JWKS retained it for grace-period validation. So the *cryptographic* freshness signal and the *routing* freshness signal decayed on independent clocks, and the slower one (CDN `max-age`) won. ## Condition of Validity The delegation is sound only when all of the following hold simultaneously: - The fetched card is **byte-identical** to the card the executor will honor, established by the executor returning a `cardDigest` (SHA-256 over the exact card bytes) in its JSON-RPC response or in a pre-flight `agent/authenticate` / capability-probe round trip. - The executor's response is signed by the **same `kid`** that signed the card, or the executor presents a proof-of-possession binding its transport identity to the card's `securitySchemes`. - The card's `url` is treated as a **routing hint**, not an identity claim; the identity claim is the `cardDigest` + `kid` pair. - Cache `max-age` on the card is shorter than the routing-change propagation window, or the card carries a `revision`/`etag` the executor is required to match. Absent any one of these, the client is delegating on the strength of a signature that attests authorship but not execution locus. That is the boundary. ## Decision Boundary The client must refuse to advance to task execution — and must treat the delegation as failed, not retried blindly — when: | Signal | Interpretation | Action | |---|---|---| | Executor returns no `cardDigest`, and card lacks `revision` | Cannot bind card to endpoint | **Abort**, do not send task payload | | `cardDigest` mismatch | Cached/stale card vs live executor | **Abort**, force re-fetch with `Cache-Control: no-cache`, re-verify, retry once | | Executor `kid` ≠ card `kid` | Possible shard re-point or key rotation mid-flight | **Abort**, re-resolve JWKS, require card re-sign | | Task `id` namespace ∉ card-declared `provider.organization` scope | Wrong-tenant execution | **Abort**, quarantine task, escalate | | Card `max-age` > routing TTL (unknown) | Unbounded divergence window | **Downgrade** to pre-flight digest check mandatory | The boundary is *not* "signature invalid." Signature-invalid is the easy case and is already handled. The boundary is **signature-valid but binding-unproven**, and the default behavior of a naive delegation loop is to treat that as success. ## Operational Effect The failure is silent and *persistent*: because the task returns a well-formed result, the caller's episodic memory records a successful delegation, and subsequent turns reuse the (stale) card from cache, deepening the divergence. Distillation of "partner extractor works" into semantic memory is now poisoned. Recovery requires invalidating the cached card, re-resolving JWKS, and re-issuing with a digest-bound pre-flight — none of which the protocol mandates on its own. The guardrail that bounds this is a **binding pre-flight**: before any task payload leaves the caller, the caller issues a cheap capability probe whose only job is to obtain `cardDigest` and executor `kid`, and compares both against the locally verified card. This converts an unbounded, silent divergence into a bounded, explicit abort. The cost is one extra round trip per delegation epoch (not per task); the benefit is that card/endpoint divergence can never reach the execution stage undetected. ```python import hashlib import json from dataclasses import dataclass class CardEndpointDivergence(RuntimeError): """Raised when a verified Agent Card cannot be bound to the live executor.""" @dataclass(frozen=True) class AgentCard: raw_bytes: bytes url: str kid: str organization: str @property def digest(self) -> str: return hashlib.sha256(self.raw_bytes).hexdigest() @dataclass(frozen=True) class ExecutorProbe: card_digest: str kid: str organization: str def verify_and_bind(card: AgentCard, probe: ExecutorProbe) -> None: """Enforce card-identity == endpoint-identity == execution-identity. Signature verification of the card is assumed already done upstream. This function enforces the *binding* invariant that signature alone does not establish. """ if probe.card_digest != card.digest: raise CardEndpointDivergence( f"card digest mismatch: cached={card.digest[:12]} " f"executor={probe.card_digest[:12]} url={card.url} " f"-> stale card or routing re-point; force no-cache refetch" ) if probe.kid != card.kid: raise CardEndpointDivergence( f"key id mismatch: card_kid={card.kid} executor_kid={probe.kid} " f"-> key rotation or shard re-point mid-flight; re-resolve JWKS" ) if probe.organization != card.organization: raise CardEndpointDivergence( f"tenant mismatch: card_org={card.organization} " f"executor_org={probe.organization} -> wrong-tenant execution risk" ) def delegate(card: AgentCard, probe: ExecutorProbe, payload: dict) -> dict: # Binding pre-flight must pass before any task payload leaves the caller. verify_and_bind(card, probe) # Only now is it safe to open the signed JSON-RPC tasks/send envelope. return {"jsonrpc": "2.0", "method": "tasks/send", "params": payload} ```