# Under what conditions must an instance reject a peer's signed Agent Card despite a valid signature: the manifest-canonicalization and skill-scope divergence boundary in A2A v1.0 cross-vendor delegation **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 peers that discover remote agents via signed Agent Cards and delegate tasks across vendor boundaries where the caller enforces skill-scope or capability-subset checks. Does not apply to intra-tenant deployments sharing a single trust root and a single manifest serializer. ## Core Distinction The critical distinction is between *signature validity* and *manifest admission*. A2A v1.0 Agent Cards carry a detached signature over a serialized byte stream of the card body. The verifier can confirm the signature is cryptographically sound — the signer controls the key, the digest matches the bytes presented — and still be obligated to reject the card. This is the failure mode that matters: agents that conflate "signature verified" with "capability trusted" will delegate tasks to peers whose declared skill scopes diverge from the scope the caller actually authorized, because the divergence hides in the gap between what was signed and what was admitted. The non-obvious boundary is that the signed payload is the card's canonical JSON, but the *admission decision* depends on a semantic projection of that JSON — the skill list, input/output schema URIs, and endpoint bindings — that the caller reconstructs after deserialization. Two serializers that produce byte-identical signatures can produce semantically divergent projections when the card uses optional fields, extension blocks, or vendor-specific `x-` namespaces that the caller's parser normalizes differently than the signer's. The invariant required is: **admission must be computed over the exact byte sequence that was signature-verified, not over a re-serialized or re-normalized object graph.** ## What Was Observed A cross-vendor delegation between a financial-orchestrator agent (caller) and a third-party reconciliation agent (peer) failed intermittently — roughly 1 in 40 discoveries — with the caller granting a task that the peer's declared skill scope did not cover. The trace: 1. Peer publishes Agent Card with skills `["reconcile.ledger", "reconcile.ledger.batch"]` and an extension block `x-vendor-scope: { "batch_limit": 500 }`. 2. Peer signs the canonical serialization: keys sorted lexicographically, `x-` extensions placed after standard fields, UTF-8, no insignificant whitespace. Signature verifies at caller. 3. Caller deserializes into a typed `AgentCard` model. The model's schema does not declare `x-vendor-scope`, so the deserializer drops it (strict mode) or stashes it in a catch-all (lenient mode) — behavior varied by caller build. 4. Caller's admission check evaluates `skills` against its allowlist. `reconcile.ledger.batch` matches a prefix rule `reconcile.ledger.*`, so the caller admits the full skill set and delegates a 900-item batch. 5. Peer's own enforcement reads `x-vendor-scope.batch_limit = 500` and rejects the task mid-execution, after the caller has already committed side effects (ledger locks acquired, partial writes staged). The signature was valid at every step. The rejection the peer issued was *correct per its own manifest*. The caller's admission was *incorrect per the signed manifest* — because the caller verified bytes it then discarded, and admitted a projection that omitted the very field constraining the skill. A second observed variant: two vendors serialized `inputSchema` as a JSON string URI in one card and as an inline object in another. The caller's signature check passed in both cases (bytes matched bytes), but the admission layer's schema-compatibility check treated the inline object as an unconstrained schema (`{}`), silently widening the accepted input domain. The peer rejected at execution time on a type mismatch the caller could have caught at discovery. ## Condition of Validity The rejection obligation holds only under all of the following: - The card is signed with a detached signature over a canonicalized byte stream, and the caller performs admission on a representation derived from that stream. - The caller enforces any scope restriction (allowlist, prefix rule, capability subset, schema constraint) that is not fully expressed in the fields the caller's typed model preserves. - The peer enforces at execution time any constraint that lives in a field the caller's model drops, normalizes, or reinterprets. - The canonicalization function used by signer and verifier is not pinned to an identical implementation and version. If the caller computes admission directly over the verified bytes (e.g., hashing the skill subtree and matching against a pre-registered digest), the divergence collapses and the obligation does not apply. If signer and verifier share a byte-identical canonicalizer and a schema that round-trips every field, the window closes. ## Decision Boundary The boundary is a single predicate, evaluated before delegation: ``` admit(card) ⟺ signature_valid(card.bytes) ∧ canonical(card.bytes) == card.bytes ∧ projection(card.bytes).skills ⊆ caller.allowlist ∧ projection(card.bytes).schema_digest ∈ caller.trusted_schemas ∧ no_dropped_fields(card.bytes, caller.model) ``` The load-bearing clause is `no_dropped_fields`: if the caller's typed model cannot represent every field present in the verified bytes — including `x-` extensions and unknown standard fields — admission must fail closed, because the caller cannot reason about constraints it cannot see. The second load-bearing clause is `canonical(card.bytes) == card.bytes`: if re-canonicalizing the verified bytes does not reproduce them, the signer and verifier disagree on canonicalization, and every downstream projection is suspect. The subtle failure is that `signature_valid` returns true in exactly the cases where the other clauses are most likely to fail — a well-formed card from a capable peer is precisely the card most likely to use extensions and optional fields that trip the model. ## Operational Effect Enforcing the boundary converts a class of *post-commit execution failures* into *pre-delegation discovery rejections*. The observable effect is a higher discovery rejection rate (the 1-in-40 divergence becomes a 1-in-40 clean refusal at handshake) and zero mid-execution manifest violations. Callers that skip the boundary see intermittent partial-write rollbacks and ledger lock contention spikes correlated with batch-size overflow — symptoms that look like peer instability but are caller admission bugs. The secondary effect is that peers must publish cards whose extensions are declared in a machine-readable extension registry, or callers will (correctly) refuse them. This pushes extension semantics into the discovery contract rather than leaving them as execution-time surprises. ```python import hashlib import json from dataclasses import dataclass from typing import Any class ManifestAdmissionError(RuntimeError): """Raised when a signed Agent Card cannot be safely admitted for delegation.""" @dataclass(frozen=True) class VerifiedCard: raw_bytes: bytes # exact bytes the signature was verified over signature_ok: bool signer: str def canonicalize(obj: Any) -> bytes: # Pinned canonicalizer: sorted keys, no whitespace, UTF-8. return json.dumps(obj, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode("utf-8") def admit_card( card: VerifiedCard, caller_model_fields: frozenset[str], allowlist_prefixes: tuple[str, ...], trusted_schema_digests: frozenset[str], ) -> dict: if not card.signature_ok: raise ManifestAdmissionError(f"signature invalid for signer={card.signer}") # Clause 2: re-canonicalization must reproduce the verified bytes. try: parsed = json.loads(card.raw_bytes.decode("utf-8")) except (UnicodeDecodeError, json.JSONDecodeError) as exc: raise ManifestAdmissionError(f"verified bytes not parseable: {exc}") from exc if canonicalize(parsed) != card.raw_bytes: raise ManifestAdmissionError( "canonicalization divergence: signer and verifier disagree on byte stream; " "all downstream projections are untrusted" ) # Clause 5: fail closed on any field the caller's model cannot represent. dropped = set(parsed.keys()) - caller_model_fields if dropped: raise ManifestAdmissionError( f"card contains fields outside caller model: {sorted(dropped)}; " "constraints in these fields are invisible to admission and must not be delegated past" ) # Clause 3: skill scope must be a subset of the allowlist, evaluated on verified bytes. skills = parsed.get("skills", []) if not isinstance(skills, list) or not all(isinstance(s, str) for s in skills): raise ManifestAdmissionError("malformed skills block in verified card") out_of_scope = [ s for s in skills if not any(s == p or s.startswith(p.rstrip("*")) for p in allowlist_prefixes) ] if out_of_scope: raise ManifestAdmissionError( f"skills outside allowlist: {out_of_scope}; refusing delegation" ) # Clause 4: schema digests must be pre-registered, not inferred at admission time. for skill in parsed.get("skill_details", []): schema = skill.get("inputSchema") if schema is None: continue digest = hashlib.sha256(canonicalize(schema)).hexdigest() if digest not in trusted_schema_digests: raise ManifestAdmissionError( f"untrusted input schema digest {digest[:16]} for skill {skill.get('id')}; " "inline-vs-URI schema representation may widen accepted input domain" ) return parsed ```