# How does an instance detect a silent capability downgrade when A2A v1.0 agent card discovery resolves against a stale or partially-reachable peer registry? **Date of Record:** 2026 November 20 **Scope:** Applies to cross-framework A2A v1.0 discovery where an orchestrator resolves a peer's `AgentCard` via a well-known URI or registry lookup and then negotiates a task against the declared `skills[].capabilities`. Does not cover intra-framework tool calling, MCP server discovery, or single-process agent invocation. ## Core Distinction The failure is not "the peer is down." It is "the peer answered with a syntactically valid, schema-conformant `AgentCard` that describes a *different* capability surface than the one the peer will actually enforce at task execution." A2A v1.0 separates *advertisement* (the card, fetched at discovery time) from *enforcement* (the skill handler that runs when a `Task` is submitted). Discovery is a point-in-time HTTP GET; enforcement is a later, stateful POST. Nothing in the protocol binds the two. An orchestrator that treats a successful card fetch as a capability warrant has conflated a document with a runtime guarantee. The non-obvious part: the card can be *fresh* (correct `Cache-Control`, correct ETag, fetched milliseconds ago) and still be wrong, because the peer's advertised skills are derived from a registry/config that is itself eventually consistent across a fleet of peer replicas. You do not get a downgrade signal at discovery. You get it at execution, as a `Task` rejection or — worse — as a `Task` accepted and executed with reduced fidelity (a fallback model, a dropped optional input field, a silently truncated output schema). ## What Was Observed A three-replica peer deployment (`peer-a`, `peer-b`, `peer-c`) behind a load balancer serving `/.well-known/agent-card.json`. The peer fleet ran a rolling config reload that added a new skill `document.extract.v2` with an extended `inputSchema` requiring a `pageRange` field. Replicas reloaded at staggered times over ~40 seconds. An orchestrator performed discovery, received the card from `peer-a` (already reloaded, advertises `document.extract.v2` with `pageRange` required), cached it, and dispatched a `Task` with `pageRange` populated. The load balancer routed the `Task` POST to `peer-c` (not yet reloaded), which only knew `document.extract.v1` — no `pageRange` in its accepted schema, but it *did* accept the task because its handler ignored unknown input keys. Result: the task returned `status: completed` with extraction performed over the full document rather than the requested page range. The orchestrator's downstream verifier, which had budgeted context for a two-page extract, received a 400-page extract, saturated its context window, and the verification step failed open — it marked the task `verified` because the output schema matched, never checking the semantic scope. The trace, condensed: 1. `GET /.well-known/agent-card.json` → `peer-a` card, `skills[].id = document.extract.v2`, `inputSchema.required = ["pageRange"]`, `ETag: "v2-7f3a"`. 2. Orchestrator caches card keyed by `ETag`, dispatches `Task` with `{skill: "document.extract.v2", input: {doc, pageRange: [1,2]}}`. 3. LB routes to `peer-c`. `peer-c` handler matches on skill *prefix* `document.extract`, not exact id, and ignores `pageRange`. 4. `peer-c` returns `Task` with `status: completed`, `artifacts[0].parts[0]` = full-document text, `metadata.skillExecuted = "document.extract.v1"`. 5. Orchestrator's `metadata` check was not implemented — the schema validator only checked `artifacts` shape, which matched. The critical observation: **the peer did emit a downgrade signal** (`metadata.skillExecuted = "document.extract.v1"`), but the orchestrator had no invariant requiring exact skill-id match between advertised and executed. The signal existed; the contract did not. ## Condition of Validity An A2A card fetch is a valid capability warrant **only if** all three hold: - **Replica coherence:** every peer replica serving the `Task` endpoint advertises the same card generation. This is false during any rolling reload, any canary, and any config-propagation window. It is *also* false whenever the LB does not pin discovery and execution to the same replica (it never does). - **Exact-id enforcement:** the peer rejects a `Task` whose `skill` id is not in its *current* skill set, rather than prefix-matching or ignoring unknown inputs. This is a peer-side invariant the orchestrator cannot verify remotely. - **Execution attestation:** the `Task` response carries a machine-checkable assertion of which skill version executed, and the orchestrator validates it against the discovered card. The first is a property of the peer's deployment topology; the second is a property of the peer's handler code; the third is the only one the orchestrator can *enforce* on its side. Therefore the operational invariant an orchestrator must adopt is: **treat the discovered card as a hypothesis, and require the execution response to confirm the exact skill id and schema version before accepting artifacts.** Discovery without execution-attestation is an unverified warrant. ## Decision Boundary The boundary is between *advertising a superset* and *executing a subset*. A peer is permitted by A2A v1.0 to advertise skills it can serve; it is not required to reject tasks for skills it can no longer serve. This asymmetry is the failure surface. The orchestrator must decide, per task, whether to: - **Trust-and-proceed** (accept `completed` on schema match alone) — valid only when the peer is a single replica (no LB fan-out) or when the skill is idempotent and scope-insensitive. - **Attest-and-verify** (require `metadata.skillExecuted == advertised id` and a `schemaVersion` echo, else re-discover and retry against a pinned replica) — required whenever the task's correctness depends on input-schema semantics (page ranges, filters, model tier, output truncation). The decision flips at the moment the skill's `inputSchema` contains any field that, if dropped, changes *semantic scope* rather than *format*. `pageRange`, `modelTier`, `maxTokens`, `language`, `redactionPolicy` are scope-bearing. `traceId`, `clientInfo` are not. The orchestrator must classify fields at card-parse time and escalate to attest-and-verify for any task touching a scope-bearing field. ## Operational Effect Without the attestation invariant, the observed failure mode is **silent scope inflation**: the task completes, the schema validates, and the verifier consumes artifacts whose scope exceeds what it budgeted. Downstream this manifests as context-window saturation, not as an error — the worst class of failure, because no retry is triggered. The verifier fails open because its schema check passes. With the invariant, the orchestrator detects the mismatch at response-parse time (`skillExecuted` != advertised id), raises a typed discovery-enforcement divergence, re-fetches the card with `Cache-Control: no-cache` and an `If-None-Match` against the *executing replica's* ETag (obtained via a `Task`-response header the peer must be configured to emit), and either retries against a coherent replica or downgrades its own scope expectation before verification. The cost is one extra round-trip on a divergence; the benefit is that scope inflation is caught before it reaches the verifier's context budget. The guardrail is not "cache less" or "re-discover more" — those do not help, because the card was fresh and correct for the replica that served it. The guardrail is binding advertisement to enforcement via an execution-side attestation the orchestrator validates. Discovery tells you what a peer *claims*; only attestation tells you what it *did*. ```python class CapabilityDowngradeError(RuntimeError): """Raised when an A2A peer executes a skill other than the one advertised in the discovered AgentCard.""" pass class ScopeBearingFieldMissingError(CapabilityDowngradeError): """Raised when a scope-bearing input field was silently dropped by peer execution.""" pass SCOPE_BEARING_FIELDS = frozenset({ "pageRange", "modelTier", "maxTokens", "language", "redactionPolicy", "outputFormat", "filter", }) def verify_execution_attestation( advertised_card: dict, task_response: dict, submitted_input: dict, ) -> None: advertised_ids = {s["id"] for s in advertised_card.get("skills", [])} executed = task_response.get("metadata", {}).get("skillExecuted") if executed is None: raise CapabilityDowngradeError( f"peer omitted skillExecuted attestation; cannot confirm " f"advertised skills {sorted(advertised_ids)} were enforced" ) if executed not in advertised_ids: raise CapabilityDowngradeError( f"advertised skill set {sorted(advertised_ids)} but peer executed " f"{executed!r}; discovery-enforcement divergence — re-discover with " f"If-None-Match against executing replica ETag" ) echoed = set(task_response.get("metadata", {}).get("inputFieldsHonored", [])) dropped_scope = (SCOPE_BEARING_FIELDS & set(submitted_input)) - echoed if dropped_scope: raise ScopeBearingFieldMissingError( f"peer executed {executed!r} but silently dropped scope-bearing " f"fields {sorted(dropped_scope)}; artifacts have inflated scope and " f"must not reach the verifier" ) ```