Repository navigation
feat: Add new spec for A2A protocol conformance tests - #1882
darrelmiller wants to merge 8 commits into
Conversation
Introduces a language-neutral YAML format for declaring conformance tests that A2A SDKs must pass. Key design decisions: - Abstract operations instead of wire methods for transport independence - Three conformance levels (must/should/may) per RFC 2119 - Client golden-response tests for interop bug coverage - SUT behavior contract via message-prefix convention - Inline CDDL type definitions throughout the spec Co-authored-by: Copilot <[email protected]>
Spec additions: - §13 Report Format: standardized JSON output schema with CDDL for dashboards to consume results from any runner implementation - Appendix A: consolidated report CDDL added - Sections 14-17 renumbered accordingly Test suites (tests/acts/): - suite.acts.yaml: top-level manifest including all suites - discovery.acts.yaml: 6 tests (CARD-DISC-*) - core-operations.acts.yaml: 7 tests (CORE-SEND/GET/CANCEL-*) - multi-turn.acts.yaml: 3 tests (CORE-MULTI-*) - streaming.acts.yaml: 6 tests (STREAM-SSE/SUB-*) - polling.acts.yaml: 2 tests (CORE-EXEC-*) - error-handling.acts.yaml: 7 tests (CORE-ERR-*, JSONRPC-ERR-*) - wire-format.acts.yaml: 3 tests (DM-FMT-*) - data-types.acts.yaml: 4 tests (DM-ART-*) - push-notifications.acts.yaml: 4 tests (PUSH-CFG-*) - client-parsing.acts.yaml: 6 tests (CLIENT-PARSE-*) Tests synthesized from a2a-tck, a2a-itk, agntcy/csit, and agentbin to validate the ACTS format covers real-world scenarios. Co-authored-by: Copilot <[email protected]>
New test files: - history.acts.yaml (6 tests: history length, ordering, content) - version-negotiation.acts.yaml (2 tests: version errors, defaults) - transport-bindings.acts.yaml (8 tests: JSON-RPC, REST, gRPC) Additions to existing files: - core-operations: +3 (failure, content-type error, list tasks) - streaming: +5 (first event, message-only, concurrent, resubscribe) - error-handling: +4 (malformed request, capability errors, error data) - discovery: +3 (caching, schema validation, extended card) - data-types: +3 (timestamps, schema validation, tolerance) - push-notifications: +6 (list, errors, idempotent delete, delivery) Co-authored-by: Copilot <[email protected]>
Cross-referenced every MUST and SHOULD in the A2A specification against existing ACTS tests. Found 23 uncovered testable requirements and created tests for all of them. New test files: - auth-security.acts.yaml (12 tests: auth rejection, extended card access, in-task AUTH_REQUIRED state, push webhook auth) Additions to existing files: - core-operations: +2 (ListTasks includeArtifacts, nextPageToken) - multi-turn: +2 (mismatched contextId/taskId, rejected client contextId) - error-handling: +3 (error @type field, ErrorInfo, missing-vs-unauthorized) - discovery: +1 (protocol declaration in Agent Card) - transport-bindings: +1 (REST application/a2a+json content type) - client-parsing: +2 (extended card caching, capability checking) Coverage: 76 testable spec requirements now have matching tests. 99 additional requirements are process/documentation/deployment concerns not testable via conformance tests. Co-authored-by: Copilot <[email protected]>
Reconcile 4 critical naming mismatches between spec and tests: - action/request -> operation/params (JSON-RPC alignment) - raw_request/raw_expect -> raw/expect (flat block, reuse expect) - golden_response -> client_response (clearer naming) - rawBody -> body_raw (snake_case consistency) Add 3 structural improvements identified during format review: - status field in expect-block (tests already use it) - runner_requirements enum for runner-special tests - named-assertion / assertions block (used by 9 tests) Updated both inline CDDL and Appendix A consolidated grammar. Co-authored-by: Copilot <[email protected]>
§12.6 stated the report format was 'not prescribed' (MAY), but §13 mandates a JSON report format (MUST). Updated §12.6 to reference §13 and align the normative language. Co-authored-by: Copilot <[email protected]>
- Interactive viewer with search, filter by level/tag - Syntax-highlighted YAML rendering - Expand/collapse all tests - Stats dashboard showing 111 tests (MUST/SHOULD/MAY breakdown) - Standalone HTML file, zero dependencies
There was a problem hiding this comment.
Code Review
This pull request introduces the A2A Conformance Test Specification (ACTS) along with a comprehensive suite of YAML-based conformance tests covering core operations, streaming, discovery, error handling, and security. The review feedback identifies several schema and specification violations across the test files, including incorrect abstract operation names, invalid keys in error expectations, mismatched field names for file content, and incorrect JSON-RPC error codes. Additionally, the gRPC-to-HTTP error mapping table in the specification document should be updated to prioritize canonical transcoding mappings.
| - id: set-config | ||
| operation: set_push_notification_config |
| expect_error: | ||
| code: UnsupportedOperationError |
There was a problem hiding this comment.
| - file: | ||
| name: "report.pdf" | ||
| mediaType: "application/pdf" | ||
| bytes: "JVBERi0xLjQ=" |
There was a problem hiding this comment.
| expect: | ||
| status: error |
There was a problem hiding this comment.
| error: | ||
| code: -32009 |
| | `TaskNotCancelableError` | -32002 | `FAILED_PRECONDITION` | 409 | | ||
| | `UnsupportedOperationError` | -32004 | `UNIMPLEMENTED` | 405 | | ||
| | `ContentTypeNotSupportedError` | -32005 | `INVALID_ARGUMENT` | 415 | | ||
| | `InvalidParamsError` | -32602 | `INVALID_ARGUMENT` | 400 | | ||
| | `VersionNotSupportedError` | -32006 | `UNIMPLEMENTED` | 406 | |
There was a problem hiding this comment.
The mapping of gRPC statuses to HTTP statuses in this table does not align with the general rule to prioritize compatibility with gRPC transcoding systems by using the canonical mapping. Specifically:
TaskNotCancelableError(gRPCFAILED_PRECONDITION) should map to HTTP400(canonical mapping forFAILED_PRECONDITION), not409.UnsupportedOperationError(gRPCUNIMPLEMENTED) should map to HTTP501(canonical mapping forUNIMPLEMENTED), not405.VersionNotSupportedError(gRPCUNIMPLEMENTED) should map to HTTP501, not406.ContentTypeNotSupportedError(gRPCINVALID_ARGUMENT) should map to HTTP400, not415.
References
- When mapping gRPC statuses to HTTP statuses, prioritize compatibility with gRPC transcoding systems by using the canonical mapping, even if a more specific HTTP status code is available.
| expect: | ||
| error: | ||
| exists: true |
There was a problem hiding this comment.
|
ACTS scopes protocol conformance cleanly. One gap worth flagging: two implementations can pass all 111 tests and still produce different cryptographic outputs from the same input — JCS canonicalization, hash derivation, and signature binding sit below the transport layer ACTS validates. We hit this recently when our own JCS serializer diverged on Unicode handling that six other implementations got right; the shared test vectors caught it, not protocol-level tests. A derivation conformance layer would compose well as a separate test class or companion suite. |
|
test (edit later) |
|
We have an adversarial bench live -- 138 profiles across 30 categories, tested against our own A2A agent at On @andysalvo's point about JCS and cryptographic outputs: that layer is below protocol-observable behaviour and cannot be reached by protocol assertions -- it needs shared test vectors that implementations run locally and compare byte-for-byte. A derivation conformance suite would compose alongside ACTS as a separate test class rather than an extension of it. Profile schema is public if it is useful for expressing an adversarial class in the ACTS format. AlgoVoi (chopmob-cloud) -- Acquisition enquiries: https://docs.algovoi.co.uk/acquisition |
|
The gap is real and sits below what ACTS validates. Two implementations can pass all 111 ACTS tests and still diverge on JCS canonical output for the same input — particularly on unicode normalisation, number representation, and key ordering edge cases. ACTS validates the transport and protocol layer; it does not validate the cryptographic substrate underneath. The 8-implementation cross-validation corpus at \chopmob-cloud/algovoi-jcs-conformance-vectors\ covers exactly this layer: Python (rfc8785), TypeScript (canonicalize), Go (gowebpki/jcs), Rust (serde_json), Java (cyberphone/json-canonicalization), PHP, .NET, Ruby — all producing byte-identical output across the same vector set, including the non-ASCII UTF-8 cases that diverge most frequently in practice. A complete A2A conformance spec needs both layers: ACTS for protocol, a JCS byte-match suite for the cryptographic substrate. The two are complementary rather than overlapping. AlgoVoi (chopmob-cloud) -- Acquisition enquiries: https://docs.algovoi.co.uk/acquisition |
|
Solid work here. I have a few observations after reading through the spec and test structure. CDDL (RFC 8610) for test declarations makes sense for a multi-language ecosystem. But CDDL is a data definition language, not a behavioral one. You mention "state machine validation" for streaming tests, and I'm curious how temporal ordering constraints are actually expressed. If it's just an ordered sequence of expected events in the YAML, that works, but the spec should call out how runners distinguish "messages arrived in correct order" from "messages are individually well-formed." Those are different guarantees. The transport abstraction is the right call since A2A is transport-agnostic in theory. In practice though, do any of the tests exercise transport-specific edge cases? Things like HTTP/2 stream resets, gRPC deadline propagation, WebSocket close frames. If not, worth noting that gap explicitly so nobody assumes transport conformance is covered. One more thing. You state all "testable" requirements are mapped. What's the methodology for deciding something isn't testable? Some MUST NOT requirements are hard to test positively but straightforward to test via negative assertions (send bad input, verify rejection). Listing the excluded requirements would let reviewers push back on that classification where they disagree. The HTML viewer is a nice touch for adoption. A machine-readable coverage matrix (requirement ID to test ID) would also help SDK maintainers wire this into CI. |
|
Tried to express a canonicalization corpus in this format and could not, and the reason is structural, not a missing field. A test requires Two cases make it concrete. One of our vectors turns on whether an e-acute arrives as the literal character or as its six-character JSON escape, a distinction destroyed the moment a document is parsed, and every step kind parses first. Another turns on The extension is small. A fifth step kind carrying a derivation function, an input and expected bytes, an open registry-backed function name, and one more runner requirement. Around twenty lines of CDDL, and nothing else in the format changes. With it, all 57 of our vectors convert. Worth saying plainly because it bears on what this proposal is for: across the whole diff, signature, 8785, jcs, canonicaliz and digest return nothing. Positive control, This is the gap I would close before the format becomes the canonical one, because none of the four efforts it unifies covers that layer either. I checked all four. Two say so in their own files: a2a-tck tags its four card-signing requirements not-automatable with no executable test referencing any of them, and agentbin publishes a matrix reading not-tested for the same four across five languages. Of the other two, csit's byte-for-byte assertions compare sentinel strings and its A2A fixture sets signatures to none, and a2a-itk returns nothing for 8785, jcs, jws, dsse or ed25519. Happy to open the CDDL change as its own pull request if that is useful, or to leave it here. |
## Summary Adds the ACTS conformance corpus and the code to load it: a schema derived from the spec's CDDL grammar, a compat layer, and a loader that flattens a manifest into an ordered run plan. Nothing executes tests yet - this is the input side. **The corpus is a verbatim mirror.** `scenarios/acts/*.acts.yaml` is byte-identical to `tests/acts/` at `a2aproject/A2A@dbcabfba` (head of a2aproject/A2A#1882), and MUST NOT be edited by hand. Refreshing is then a copy rather than a three-waymerge, and defects stay visible to the people who can fix them upstream. That creates a problem: 26 of the 111 tests violate the ACTS CDDL and cannot be validated as written. Losing them is expensive - it takes out all push-notification coverage, all capability-error coverage, and the only gRPC error-status test. So `test_suite/acts/compat.py` rewrites them at load time instead, under four rules: | Rule | Defect | Sites | |---|---|---| | `expect-error-code-key` | `expect_error` keys the error name as `code`; the CDDL says `error_type` | 13 | | `push-config-operation-name` | `operation:` uses push-config names absent from the spec's `abstract-operation` enum | 18 | | `expect-field-outside-body` | a response field placed directly under `expect`, which admits only `status` and `body` | 2 | | `expect-error-as-expect-field` | `expect: {error: …}` used to assert a failure, which belongs in `expect_error` | 2 | Every rule is a rename or a move the document already determines; none invents a value. A defect needing a judgement call is left broken and belongs upstream - a runner that guesses what a malformed conformance test *meant* is worse than one that reports it. Site counts are pinned, so when upstream fixes a defect the count drops, a test fails, and the rule gets deleted. `compat=False` on any loader entry point shows the corpus exactly as shipped. Keeping the rules out of `schema.py` is the point of the split: the schema stays a statement of what the CDDL permits, so it can still tell a valid ACTS document from an invalid one. ## Notes - **Assertion trees are deliberately untyped.** Spec §5.2 makes `{status: {state: FOO}}` (nested paths, exact match) syntactically identical to `{type: array, count_gte: 1}` (two operators). Only an evaluator holding a real response can tell them apart, so `expect.body`, `params`, `wire_payload`, `expect_parsed` and friends stay as plain data. - **`TransportBinding` is separate from `test_suite.transports.Transport`** on purpose - ACTS says `rest` where the traversal engine says `http_json`, and sharing one enum would silently mistranslate whichever suite lost. - **Some corpus defects parse fine and are left wrong**, pinned by tests that fail when upstream fixes them: `REST-PD-001` asserts an RFC 7807 body where A2A §11.6 mandates `google.rpc.Status`; `CLIENT-PARSE-006` uses `file.bytes` for `file.raw`; a gRPC-only test asserts an HTTP status; and 23 tests tagged `runner-special` describe their real check only in prose, because `expect-block` has no `headers` key. `scenarios/acts/PROVENANCE.md` has the register.
|
Hi Darrel, I exercised the current corpus through the loader, JSON-RPC dispatcher and runner from ITK #64, using in-process synthetic HTTP fixtures:
These checks explicitly supplied the corpus's I'd propose valid requests, verified credential roles and positive controls, authentication-specific rejection checks, and a targeted protected/missing-task comparison. The existing raw captures and substitutions are sufficient to detect the demonstrated message leak. I'd start verification with JSON-RPC, while keeping cross-binding behavior explicit. Custom JSON-RPC authentication errors and normalization of variable response fields need an agreed contract; I would not assume a universal auth error number or byte-identical bodies. I'm aware PROVENANCE already documents the missing Would this be a useful bounded follow-up here, coordinated with Jakub's work? |
From what I've found out during tests with python sdk, not only this tests are not compliant with A2A spec. |
| pushNotificationConfig: | ||
| url: "{{webhookUrl}}" | ||
| expect_error: | ||
| code: UnsupportedOperationError |
There was a problem hiding this comment.
|
In order to address the issues with correctness of the corpus we propose: #2227 |
…nd CI workflows (#715) # Description SUT for ACTS conformance tests, mirrors [python](a2aproject/a2a-python#1230) Ci workflows, mirrors [python](a2aproject/a2a-python#1243) Based on spec: a2aproject/A2A#1882
…436) # Description SUT for ACTS conformance tests, mirrors [python](a2aproject/a2a-python#1230) Ci workflows, mirrors [python](a2aproject/a2a-python#1243) Based on spec: a2aproject/A2A#1882
|
The false passes you reproduced are why I want vectors that need no live system: an input, the expected bytes, positive controls, reject cases. The canonicalization corpus this thread argued over is at a2aproject/a2a-tck#228 under conformance-vectors/a2a-jcs-v01: 57 RFC 8785 vectors with a Python runner and a Go runner. I'd like the pass and fail counts here from a run against your registry's card canonicalizer and signature check. A vector that disagrees with your bytes is the report. |
|
astrogilda — Lars |
|
Thanks, Lars, for the run, and for the mutations that found this. You were right: both runners passed A2-REJECT-003 and A2-REJECT-004 by checking the fixture, whatever the implementation did. At 5cf977d on a2aproject/a2a-tck#228 they compare the implementation's signing bytes instead, so keeping |
|
astrogilda — |
|
@MoltyCel thank you, Lars, for the re-run and the negative control. I ran the same control on the TCK's own CARD-SIGN-002 test and it still checked the fixture; After your A5-002 fix, may I list that record in probityai/agent-evidence-vectors |
|
A5-002 is fixed and the verify path is now at 57/57 against 5cf977d, with corpus integrity unchanged at 57 vectors, no sha256 deviation, corpusDigest 2ec93667…. |
|
and re your question eralier, both, yes, with conditions that concern pinning. |
|
The fix has landed. moltrust-api main is at 9b33b41f11e9221363262599ee1915e0967475ba, with lib/agent_card_verify.py at blob a9e478eff792c8e03c394c780a5efcf01ba0f3c9, and the squash left the blob identical to the one on the pull request head. |
|
A correction to my comment of 26 September, where I reported 57/57 on both of our paths. |
|
@MoltyCel, fixed in 7a3197d, on a2aproject/a2a-tck#228. External adapters must now declare The 16 new regression tests include all five lone-surrogate cases. The crash negative control now scores 48/53 with five errors and exit status 1. All 389 unit tests and lint pass; the reference targets remain 53/53 and 57/57. Remote CI is green on the new head. Vector bytes, dispositions and corpus digest are unchanged. The README records your correction and the merged CI. When taking the new pin, name each path's actual refusal type rather than a base class as shorthand. |
|
@MoltyCel thank you, Lars, for that correction: you caught that your 57/57 depended on the runner counting any exception as a refusal, and you fixed the cause in c81b571. It changes what I list. RUNS.md in probityai/agent-evidence-vectors, our public corpus, records outside runs, and your entry will give each path with its refusal class: raw canonicaliser 53/53, card signing 57/57, card verify 57/57 under CardVerificationError. I'll also drop the builtins:ValueError line from the a2a-jcs-conformance workflow. |
|
ooh, good catch on the refusal classes, Lars. I've recorded the corrected result by implementation path, with the MolTrust commit, code blobs, corpus revision and digest pinned: probityai/agent-evidence-vectors@8ef8ddc. Your run stays the external result; Probity is recording it with the classification you actually reported. next, let's take this through an effect-side check. We now have a native authority-to-ticket run that retains the selected kernel decision, framework tool call, raw HTTP exchange and signed readback together: probityai-archive/agent-evidence-observer#22. I'd start with one permit and one denial on your own host/key/store/clock/checkpoint setup, with you retaining the result. That gives us a concrete outside-operated comparison. This uses the unsigned kernel; we'll keep JWS issuer verification as its own check. |
|
Two updates to the entry, and a note on where the numbers come from, since the canonicaliser in app/signature.py forwards to the jcs library and raises nothing of its own. The class that reaches your runner is whatever jcs raises, so I measured it rather than read it off the source. Across every reject vector on both the raw and the signing path, the result is UnicodeEncodeError on the five lone-surrogate rejects (A3-REJECT-011, A3-REJECT-012, A4-REJECT-013/014/015) and ValueError on the three number rejects (A5-REJECT-016/017/018). Both are declared as of 1e4c4b7c in moltrust-api. Your runner in #228 classifies with The four numbers hold on both corpus states: raw canonicaliser 53/53, card signing 57/57, card verify 57/57, negative control 53/57, exit 0 in either direction, and under exact all four records read refusalMatch: exact. Between 97b0072 and 7a3197d only README.md and run_python.py differ, with no vector file changed, so the declarations hold against the bytes the pin evaluates. One line in the entry has gone stale: "The builtins:ValueError declaration is being removed" happened on 3 October, in #526. |
|
@MoltyCel, thanks for catching the stale line, and for measuring which exception classes jcs actually raises. The entry now records #526 and both declarations: https://github.com/probityai/agent-evidence-vectors/blob/1f4fe3ea555a4224305c568cb8acf9a50d0bf774/RUNS.md |
Summary
This PR introduces ACTS (A2A Conformance Test Specification) — a unified YAML format for A2A protocol conformance tests,plus 111 tests covering all testable MUST/SHOULD requirements from the A2A v1.0 spec.
Problem
The A2A ecosystem has 4 fragmented conformance testing efforts (a2a-tck, a2a-itk, agntcy/csit, agentbin), each withdifferent test definitions. This makes it impossible to verify that SDKs passing "conformance tests" can actuallyinteroperate.
Solution
One canonical test format that all SDKs test against. Language-agnostic YAML declarations + freedom to implement runners in any language = guaranteed interoperability.
What's Included
📋 Specification (docs/acts-specification.md)
✅ Test Suite (111 tests across 14 files)
🎨 HTML Viewer (tests/acts/test-viewer.html)
Coverage Validation
✅ Spec audit: All 76 testable MUST/SHOULD requirements have tests
✅ Gap analysis: All scenarios from 4 existing repos covered
✅ CDDL validation: All files validate against RFC 8610 grammar