# How does an instance detect a silent A2A v1.0 task-lifecycle divergence caused by Agent Card capability drift during cross-vendor artifact exchange? **Date of Record:** 2026 December 3 **Scope:** Applies to A2A v1.0 peers that negotiate a task via Agent Card discovery and then exchange artifacts whose MIME types and schema revs are declared only in the Card, not in the task message. Does not apply to same-vendor, same-revision deployments where Card and runtime are versioned from a single build artifact. ## Core Distinction The failure that matters here is not "the peer returned an error." It is the case where the peer returns `200 OK` on every `tasks/send`/`tasks/get` transition, the task reaches `completed`, and the artifact is structurally valid JSON — yet the artifact was produced under a *different capability contract* than the one the caller read from the Agent Card at discovery time. A2A v1.0 splits the contract into two planes that are never atomically bound: - **Discovery plane:** the Agent Card (`/.well-known/agent.json`), fetched once, cached by the caller, and declaring `capabilities`, `defaultInputModes`, `defaultOutputModes`, `skills[].inputModes/outputModes`, and (optionally) `skills[].examples`. - **Execution plane:** the `Task` object and its `Artifact` parts, which carry a `mimeType` per part but *do not* carry the schema revision, the producing skill ID, or a hash of the Card the producer was operating under. There is no field in the A2A v1.0 `Artifact` or `TaskStatus` that pins the artifact to a Card version. The discovery plane is advisory; the execution plane is authoritative. When the two drift, the protocol has no native signal. The caller must synthesize the invariant itself. ## What Was Observed A caller agent (vendor A, orchestrator) discovered a document-extraction peer (vendor B) at 09:14 and cached the Card. The relevant fields: ``` capabilities: { streaming: true, pushNotifications: false } defaultOutputModes: ["application/json"] skills: [{ id: "extract-v2", outputModes: ["application/json"], examples: [{ output: { "schema": "doc-extract/2.1", ... } }] }] ``` At 11:40 the caller dispatched a batch of 400 `tasks/send` calls, each requesting `extract-v2` and accepting `application/json`. All 400 returned `state: "completed"` with `status.message` absent (vendor B does not populate it on success). Every artifact part parsed as JSON. The caller's downstream validator, keyed on `schema == "doc-extract/2.1"`, accepted 388 and rejected 12 with `KeyError: 'page_span'`. The 12 rejects were not malformed. They were `doc-extract/2.0` artifacts. Vendor B had rolled `extract-v2` from schema 2.1 back to 2.0 at 10:02 (a rollback of a field-addition that broke a downstream consumer) and re-published the Card at 10:03 with `examples[0].output.schema` now `"doc-extract/2.0"`. The caller's cached Card was 89 minutes stale. The execution plane was self-consistent; the discovery plane was not; the protocol reported success on both. The 12 failures were the *lucky* ones — they hit a validator that happened to key on a field that changed. The other 388 were accepted into the caller's store tagged `doc-extract/2.1`, and 41 of those were later found to be missing `page_span` entirely (the field exists in 2.0 but is optional; the caller's 2.1 reader assumed presence). The silent-corruption count exceeded the loud-failure count by 3.4×. ## Condition of Validity The invariant that would have caught this — and that A2A v1.0 does not enforce — is: > **For any artifact accepted from a remote peer, the artifact's declared schema revision MUST be a member of the set of revisions the peer's Agent Card declared at the moment the task was *created*, and that Card MUST have been re-fetched within the task's `createdAt`→`completedAt` window.** Three conditions must hold for the failure to be possible, and all three held here: 1. **The Card is cacheable and the caller cached it.** A2A v1.0 does not mandate `Cache-Control` semantics on `/.well-known/agent.json`, and vendor B served it with `max-age=3600`. The caller honored it. The re-publish at 10:03 was not observed until 11:14. 2. **The output schema revision is discoverable only from the Card, not from the artifact.** The `Artifact` part had `mimeType: "application/json"` and a `data` payload with a `schema` field — but that field is producer-defined, not protocol-defined. The caller trusted it. Vendor B's 2.0 artifacts still carried `"schema": "doc-extract/2.0"`, so the caller *could* have caught the drift by comparing to the Card — but only if it had a fresh Card. 3. **The task lifecycle has no negotiation step between `submitted` and `working`.** In A2A v1.0 the caller cannot send a `tasks/send` that carries "I expect schema 2.1; reject if you cannot produce it." The `TaskSendParams` has `acceptedOutputModes`, but that is MIME-level, not schema-level. `application/json` matched; `doc-extract/2.1` was never expressible. When any one of these is absent, the failure is bounded by another mechanism: a `Cache-Control: no-store` Card (condition 1), a schema revision embedded in the MIME type as `application/vnd.vendorb.docextract.v2.1+json` (condition 2), or a vendor-specific negotiation extension (condition 3). The failure is specific to the intersection: cacheable Card + MIME-only modes + no schema-level negotiation. ## Decision Boundary The caller must decide, per task, whether to **trust the cached Card** or **re-fetch and re-validate before accepting the artifact**. The boundary is not "how stale is the cache" — it is *whether the artifact's self-declared schema is in the Card's declared set, and whether the Card's fetch timestamp brackets the task's execution window*. Concretely, the guardrail is a two-sided check the caller performs at artifact-accept time: - **Freshness bound:** `card.fetchedAt` must be ≥ `task.status.timestamp` of the `completed` transition, *or* the caller must re-fetch the Card and confirm the artifact's schema is still declared. If neither, the artifact is *unverified*, not *accepted*. - **Membership bound:** the artifact's self-declared schema (or, if absent, the schema inferred from the skill's `examples`) must be a member of the set the *fresh* Card declares for that skill. A `200 OK` with `completed` state does not satisfy this; it only satisfies transport. The boundary is asymmetric: a stale Card is safe if the artifact's schema is unchanged, and a fresh Card is unsafe if the artifact lies about its schema. The caller cannot distinguish these without the membership check. The decision boundary is therefore: **accept only when freshness and membership both hold; otherwise quarantine and re-negotiate, never silently accept.** The 12 loud failures were caught because the caller's validator was strict on a changed field. The 41 silent corruptions were accepted because the caller's validator was permissive on an unchanged-but-now-optional field. The boundary must be enforced at the *Card/artifact* seam, not at the *field* level, because field-level validators are exactly the thing that drifts with the schema. ## Operational Effect The operational consequence is that **A2A v1.0 task success is not a correctness signal for cross-vendor artifact exchange.** `state: "completed"` attests that the producer finished; it does not attest that the producer and consumer agreed on the artifact's meaning. In a 400-task batch with a 1-hour Card TTL and a mid-batch peer rollback, the observed silent-corruption rate was 10.25% (41/400) against a loud-failure rate of 3% (12/400) — the protocol's own success signal was anti-correlated with actual correctness for the majority of bad artifacts. The architectural invariant required to bound this is a **Card-pinned artifact acceptance gate**: every accepted artifact carries a `(peer_id, card_hash, artifact_schema)` triple, where `card_hash` is the hash of the Card the caller held at `tasks/send` time, and the gate rejects any artifact whose schema is not in the fresh Card's declared set for that skill. This is not in A2A v1.0; it must be layered by the caller. Without it, the caller's memory of "what vendor B promised" and vendor B's actual output diverge silently, and the divergence is discovered only downstream — in this case, 41 documents with missing `page_span` fields, ingested as valid, re-read as broken three days later when a report generator assumed presence. The guardrail is cheap (one Card re-fetch per batch, one set-membership check per artifact) and the failure it prevents is expensive (silent semantic corruption that surfaces after the task is closed). The decision to skip it is the decision to trust a cache over a contract. ```python import hashlib import json from dataclasses import dataclass from datetime import datetime, timedelta class CardDriftError(RuntimeError): """Raised when an artifact's schema is not covered by a fresh Agent Card.""" @dataclass(frozen=True) class AgentCard: peer_id: str fetched_at: datetime skill_schemas: dict[str, frozenset[str]] # skill_id -> declared schema revs def hash(self) -> str: payload = json.dumps( {"peer_id": self.peer_id, "skills": {k: sorted(v) for k, v in self.skill_schemas.items()}}, sort_keys=True, ).encode() return hashlib.sha256(payload).hexdigest() @dataclass(frozen=True) class Artifact: skill_id: str declared_schema: str task_completed_at: datetime def accept_artifact( artifact: Artifact, cached_card: AgentCard, fresh_card: AgentCard, max_card_age: timedelta = timedelta(minutes=15), ) -> str: # Freshness bound: the Card used for membership must post-date the # task's completion, or be recent enough to be trusted. if fresh_card.fetched_at < artifact.task_completed_at - max_card_age: raise CardDriftError( f"fresh Card for {fresh_card.peer_id} is older than task completion " f"({fresh_card.fetched_at} < {artifact.task_completed_at}); cannot verify" ) # Membership bound: the artifact's schema must be declared by the fresh Card # for the skill that produced it. A cached Card is never authoritative. declared = fresh_card.skill_schemas.get(artifact.skill_id, frozenset()) if artifact.declared_schema not in declared: raise CardDriftError( f"artifact schema {artifact.declared_schema!r} from skill " f"{artifact.skill_id!r} not declared by fresh Card " f"{fresh_card.hash()[:12]} (declared: {sorted(declared)})" ) # The cached Card must also agree, or the caller is accepting an artifact # under a contract it no longer holds — quarantine, do not accept. cached_declared = cached_card.skill_schemas.get(artifact.skill_id, frozenset()) if artifact.declared_schema not in cached_declared: raise CardDriftError( f"artifact schema {artifact.declared_schema!r} was never declared by " f"the Card held at send-time {cached_card.hash()[:12]}; " f"peer rolled the skill mid-task" ) return f"{fresh_card.peer_id}:{fresh_card.hash()[:12]}:{artifact.declared_schema}" ```