# When must an instance reject a peer’s “successful” tool result during A2A conformance testing? **Date of Record:** 2026 November 30 **Scope:** Applies to agent-to-agent (A2A) protocol conformance tests where one agent executes a delegated tool call and returns a structured result envelope; excludes local single-agent tool invocation and pure MCP transport-level tests. ## Core Distinction Interoperability certification for A2A protocols is not about validating that both agents can parse JSON. It is about validating that the **semantic warrant** attached to a delegated result remains intact across the handoff. A peer can return `status: "success"` with a schema-valid payload while the result is still untrustworthy because the peer’s execution context diverged from the contract that authorized the call. The non-obvious boundary is this: **a conforming receiver must reject a syntactically valid, status-successful tool result when the peer’s reported execution context no longer satisfies the warrant’s preconditions.** Most conformance suites test schema shape and error codes; they do not test warrant-context drift. That is where certification quietly fails. ## What Was Observed During a multi-vendor A2A certification run, Agent A delegated a `read_ledger_entry` call to Agent B under a capability warrant that bounded the read to `account_id=acct-4417` and `as_of<=2025-03-30T23:59:59Z`. Agent B returned: - `status: "success"` - `schema_version: "1.2"` - `entries: [...]` - `execution_context: { "account_id": "acct-4417", "as_of": "2025-03-31T00:04:12Z", "warrant_id": "w-9f3a" }` The payload validated against the schema. The status code was successful. The warrant ID matched. But the `as_of` timestamp was **four minutes and thirteen seconds past the warrant’s upper bound**. Agent B had executed the read after the warrant’s temporal window closed, using a cached credential that had not yet been revoked. Agent A’s default conformance path accepted the result because its validator checked only schema and status. The certification harness recorded a pass. The downstream auditor later found that the returned ledger entries included a post-boundary mutation that should not have been visible under the warrant. The failure was not in transport, not in schema, and not in cryptographic identity. It was in **execution-context conformance**: the peer reported a context that contradicted the warrant, and the receiver did not treat that contradiction as a protocol violation. ## Condition of Validity The invariant is: > For any delegated tool result carrying a capability warrant, the receiver must reject the result if any field in the peer’s `execution_context` is outside the warrant’s declared bounds, even when `status` is `"success"` and the payload validates against the schema. This condition is valid only when: 1. The warrant declares machine-checkable bounds (temporal, spatial, resource, or identity scope). 2. The peer is required by the protocol profile to echo the execution context in the result envelope. 3. The receiver has access to the original warrant at validation time, not just a warrant ID. It does **not** apply when the warrant is opaque or when the protocol profile permits context omission. In those cases the receiver must downgrade the result to `unverified` rather than `success`. ## Decision Boundary The decision boundary is not “did the peer return an error?” It is “does the peer’s reported execution context remain inside the warrant’s closure?” A receiver must transition to rejection when: - `execution_context.as_of` > `warrant.valid_until` - `execution_context.account_id` ∉ `warrant.scope.accounts` - `execution_context.warrant_id` ≠ `warrant.id` (identity substitution) - `execution_context.execution_node` ∉ `warrant.allowed_nodes` when node binding is required The boundary is sharp: a single out-of-bounds field is sufficient for rejection. There is no “mostly conforming” state. Partial conformance is non-conformance because the result’s provenance is no longer bounded by the authorization that justified the call. ## Operational Effect When this boundary is enforced, A2A certification becomes a test of **warrant-context continuity**, not just message shape. The operational effects are: 1. **False-positive certification drops.** Peers that return success outside warrant bounds fail conformance instead of passing on schema validity. 2. **Receivers must retain the full warrant, not just its ID.** This increases receiver-side state but is required to evaluate the closure. 3. **Peers must echo execution context faithfully.** A peer that omits or fabricates context fields fails the profile’s conformance requirement. 4. **Audit replay becomes possible.** Because the receiver rejected out-of-bound results, the audit trail records a protocol violation rather than a silent acceptance. The guardrail is a **warrant-closure validator** that runs before any result is admitted into the receiver’s state. It must treat context drift as a hard protocol error, not a warning. ```python from dataclasses import dataclass from datetime import datetime, timezone class WarrantContextViolation(RuntimeError): """Raised when a peer's reported execution context escapes the warrant closure.""" pass @dataclass(frozen=True) class Warrant: id: str account_id: str valid_until: datetime allowed_nodes: frozenset[str] @dataclass(frozen=True) class ToolResult: status: str schema_version: str execution_context: dict payload: dict def validate_result_against_warrant(result: ToolResult, warrant: Warrant) -> None: if result.status != "success": return ctx = result.execution_context if ctx.get("warrant_id") != warrant.id: raise WarrantContextViolation( f"warrant identity substitution: expected {warrant.id!r}, got {ctx.get('warrant_id')!r}" ) if ctx.get("account_id") != warrant.account_id: raise WarrantContextViolation( f"account scope escape: expected {warrant.account_id!r}, got {ctx.get('account_id')!r}" ) as_of_raw = ctx.get("as_of") if not as_of_raw: raise WarrantContextViolation("missing execution_context.as_of; cannot verify temporal closure") as_of = datetime.fromisoformat(as_of_raw.replace("Z", "+00:00")) if as_of.tzinfo is None: as_of = as_of.replace(tzinfo=timezone.utc) if as_of > warrant.valid_until: raise WarrantContextViolation( f"temporal closure violated: as_of={as_of.isoformat()} > valid_until={warrant.valid_until.isoformat()}" ) node = ctx.get("execution_node") if warrant.allowed_nodes and node not in warrant.allowed_nodes: raise WarrantContextViolation( f"node binding escape: {node!r} not in {sorted(warrant.allowed_nodes)}" ) ```