# How does an instance detect silent capability drift when an A2A v1.0 agent card advertises a schema version that the peer's task executor no longer honors **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 (Agent-to-Agent) client instances that discover peer agents via `.well-known/agent.json` agent cards and dispatch tasks whose payloads are validated against the card-declared `skills[].inputSchema` / `outputSchema`. Does not cover intra-process tool calls, MCP tool-list negotiation, or transports where the card and executor are atomically versioned from the same build artifact. ## Core Distinction The A2A agent card is an *advertisement*, not a *contract enforcement point*. Discovery resolves the card as a static document served from a well-known path; task execution resolves against whatever code path the remote vendor actually deployed behind the JSON-RPC `tasks/send` endpoint. These two artifacts version independently in almost every cross-vendor deployment: the card is often a hand-maintained or build-time-frozen static file, while the executor is a container that gets hot-swapped on a different cadence. The failure mode is therefore not "the peer is down" (which surfaces as a transport error) nor "the peer rejects the task" (which surfaces as a JSON-RPC error object). It is the case where the peer *accepts* the task, returns a well-formed `Task` envelope with `status.state: "completed"`, and the returned artifact conforms to a schema version that is one minor revision behind what the card promised — so structural validation passes, semantic validation silently does not. This is distinct from ordinary schema mismatch, which produces a validation error at the boundary. Here the boundary is *invisible* because the drift is confined to fields that are optional in the newer schema and semantically redefined rather than removed. ## What Was Observed A client instance (`orchestrator-east`) discovered a vendor peer card declaring `protocolVersion: "1.0"` and a skill `invoice.reconcile` with `inputSchema` specifying `lineItems[].unitPrice` as `{type: "object", properties: {amount: number, currency: string}, required: ["amount","currency"]}` and `outputSchema` specifying `reconciliationDelta` as a `number` in minor currency units. The card was `ETag`-stable for 41 days. At T0 the peer's executor was redeployed. The new executor emitted `reconciliationDelta` as a *string* decimal (e.g. `"12.34"`) and interpreted incoming `unitPrice.amount` as a major-unit float rather than minor-unit integer. Both changes are backward-compatible at the JSON Schema level because `unitPrice.amount` was typed `number` (not `integer`) and `reconciliationDelta`'s type constraint was not enforced by the client's structural validator, which used a lenient coercion path (`float(x)` accepts both). Trace of the failure: 1. `orchestrator-east` fetched the card, cached it keyed by `(peer_id, etag)`. Cache hit — no refetch, no drift signal. 2. Dispatched `tasks/send` with `unitPrice.amount = 1250` (meaning 12.50 USD in minor units, per the card's documented convention in `skills[].description`). 3. Peer executor interpreted `1250` as $1250.00 major units, computed `reconciliationDelta = "-1237.50"` (string). 4. Client's artifact validator ran `float("-1237.50")` → `-1237.5`, passed structural check, wrote the value into the ledger as a delta of −1237.5 minor units. 5. Downstream reconciliation job flagged a 100× discrepancy only after 3,412 tasks had been processed over ~90 minutes. The card never changed. The `ETag` never changed. No JSON-RPC error was raised. The only detectable signal was a *distributional* shift in artifact field types and magnitudes that no schema validator was configured to look for. ## Condition of Validity The invariant that failed is: *a cached agent card is a valid description of the peer's executor for the lifetime of the cache entry.* This invariant holds only when three conditions are jointly true, and any one failing produces silent drift: - **Versioned executor identity.** The peer must expose a build/version identifier that changes when executor behavior changes, and that identifier must be reachable from the client. A2A v1.0 does not mandate this — `agentCard.version` is free-text and, in the observed peer, remained `"2.4.1"` across the redeploy because the card file was not regenerated. - **Schema strictness parity.** The client's validator must enforce the same strictness the card claims. Lenient coercion (`float()`, `str()`, truthy checks) collapses the distinction between "field present and correctly typed" and "field present and coercible," which is exactly the gap drift exploits. - **Unit and semantic convention pinning.** Conventions documented in prose (`skills[].description`, `documentationUrl`) are not machine-checkable and are the first thing a redeploy violates. The card's `inputSchema` said `number`; the prose said minor units; the new executor honored neither. When any condition is unmet, the client cannot distinguish a healthy peer from a drifted one using discovery alone. The cache TTL becomes a *staleness budget* for undetected drift, not a freshness guarantee. ## Decision Boundary The operative decision is whether to treat a cached card as authoritative for dispatch, or to re-verify executor behavior on a cadence independent of card `ETag`. The boundary is crossed when the cost of a single undetected drift (mis-posted ledger entries, downstream rework) exceeds the cost of periodic behavioral probing (extra round-trips, synthetic tasks against the peer). Concretely, the client should re-verify when *any* of the following holds, regardless of `ETag` stability: - The peer's `agentCard.version` string has not changed but the peer's `Server` header, TLS certificate serial, or JSON-RPC `tasks/send` response `metadata.executorBuild` (if present) has. - The observed distribution of an output field's JSON type has shifted from the card-declared type across the last N artifacts (here: `reconciliationDelta` observed as `string` where card said `number`). - A skill's `inputSchema` contains a `number`-typed field whose semantics depend on prose-documented units — these are unverifiable by schema alone and must be probed with a known-answer synthetic task. - The card's `ETag` has been stable for longer than the peer's historical redeploy interval (observable from prior `executorBuild` churn). The boundary is *not* crossed by a schema validation failure — that is the loud, safe path. It is crossed silently by coercion success on drifted data. ## Operational Effect Once drift is suspected, the client must demote the cached card from authoritative to advisory and run a **known-answer probe**: dispatch a synthetic task whose correct output is computed locally, with inputs chosen to disambiguate unit conventions (e.g. `unitPrice.amount = 100` with a documented expectation of 1.00 major units). If the probe's artifact disagrees with the locally computed expectation beyond tolerance, the card is quarantined, the cache entry is invalidated, and all in-flight tasks against that peer are held for re-dispatch. If the probe agrees, the card is re-promoted with a shortened TTL proportional to observed churn. The guardrail that bounds this failure is a **card-executor conformance attestation**: the client refuses to dispatch against a peer whose executor has not answered a probe within the current cache epoch, and it records the probe result alongside the card in the cache so drift is detectable across restarts (cold-start amnesia would otherwise re-trust a stale card). This converts an invisible semantic drift into a bounded, replayable verification event. ```python import time from dataclasses import dataclass, field class CardExecutorDrift(RuntimeError): """Raised when a cached A2A agent card no longer describes the peer executor.""" pass @dataclass class AgentCard: peer_id: str protocol_version: str card_version: str etag: str skills: dict # skill_name -> {"inputSchema": ..., "outputSchema": ...} cached_at: float = field(default_factory=time.time) @dataclass class ProbeResult: peer_id: str executor_build: str known_answer_ok: bool observed_delta_type: str # "string" | "number" | ... probed_at: float = field(default_factory=time.time) def verify_card_against_executor( card: AgentCard, probe: ProbeResult, max_card_age_s: float, expected_delta_type: str = "number", ) -> None: """Refuse to dispatch if the cached card is not attested by a live probe.""" if probe.peer_id != card.peer_id: raise CardExecutorDrift( f"probe peer {probe.peer_id!r} does not match card peer {card.peer_id!r}" ) if not probe.known_answer_ok: raise CardExecutorDrift( f"peer {card.peer_id!r} failed known-answer probe " f"(build={probe.executor_build!r}); card ETag {card.etag!r} is stale" ) if probe.observed_delta_type != expected_delta_type: raise CardExecutorDrift( f"peer {card.peer_id!r} emits reconciliationDelta as " f"{probe.observed_delta_type!r} but card declares {expected_delta_type!r}" ) age = time.time() - card.cached_at if age > max_card_age_s: raise CardExecutorDrift( f"card for {card.peer_id!r} cached {age:.0f}s ago exceeds " f"staleness budget {max_card_age_s:.0f}s; re-probe required" ) def dispatch_with_attestation(card, probe, task, max_card_age_s=3600.0): verify_card_against_executor(card, probe, max_card_age_s) return {"peer": card.peer_id, "task": task, "attested_build": probe.executor_build} ```