9c6d69153e
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / lint (pull_request) Failing after 18s
CI / helm (pull_request) Successful in 23s
CI / security (pull_request) Failing after 52s
CI / typecheck (pull_request) Failing after 54s
CI / coverage (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / unit_tests (pull_request) Failing after 1m47s
CI / docker (pull_request) Has been skipped
CI / quality (pull_request) Successful in 3m42s
CI / e2e_tests (pull_request) Failing after 14m21s
CI / integration_tests (pull_request) Failing after 20m58s
CI / status-check (pull_request) Failing after 1s
Rewrites the A2aRequest and A2aResponse Pydantic models to use the field names mandated by the JSON-RPC 2.0 specification, fixing a fundamental protocol compliance issue that prevented external A2A-compliant clients from communicating with the server. Changes: - A2aRequest: a2a_version→jsonrpc (fixed '2.0'), request_id→id, operation→method; auth field removed (not in JSON-RPC 2.0) - A2aResponse: a2a_version→jsonrpc, request_id→id, status+data→result (success path), timing_ms removed; added _result_xor_error validator enforcing mutual exclusion of result and error fields - A2aLocalFacade.dispatch(): updated to use request.method, request.id, result=data, error=A2aErrorDetail(...) - A2aHttpTransport.send(): updated to use request.method - CLI call sites (session.py, plan.py): updated A2aRequest(method=...) and response.result / response.error field access - All existing A2A Behave step files updated to new field names - New 35-scenario Behave feature (a2a_jsonrpc_wire_format.feature) covering serialisation, deserialisation, validation, and facade dispatch - New 7-test Robot Framework suite (a2a_jsonrpc_wire_format.robot) for end-to-end wire format verification ISSUES CLOSED: #1501
74 lines
3.8 KiB
Plaintext
74 lines
3.8 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration tests verifying A2aRequest/A2aResponse produce
|
|
... JSON-RPC 2.0 compliant wire frames end-to-end.
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER} ${CURDIR}/helper_a2a_jsonrpc_wire_format.py
|
|
|
|
*** Test Cases ***
|
|
A2A Request Wire Frame Is JSON-RPC 2.0 Compliant
|
|
[Documentation] Verify A2aRequest serialises to JSON-RPC 2.0 wire format
|
|
... with jsonrpc, id, method, params fields and no non-standard fields.
|
|
${result}= Run Process ${PYTHON} ${HELPER} request-wire-format cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-request-wire-format-ok
|
|
|
|
A2A Response Success Wire Frame Is JSON-RPC 2.0 Compliant
|
|
[Documentation] Verify A2aResponse (success) serialises to JSON-RPC 2.0 wire format
|
|
... with jsonrpc, id, result fields and no non-standard fields.
|
|
${result}= Run Process ${PYTHON} ${HELPER} response-success-wire-format cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-response-success-wire-format-ok
|
|
|
|
A2A Response Error Wire Frame Is JSON-RPC 2.0 Compliant
|
|
[Documentation] Verify A2aResponse (error) serialises to JSON-RPC 2.0 wire format
|
|
... with jsonrpc, id, error fields and no non-standard fields.
|
|
${result}= Run Process ${PYTHON} ${HELPER} response-error-wire-format cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-response-error-wire-format-ok
|
|
|
|
A2A Facade Dispatch Produces JSON-RPC 2.0 Response
|
|
[Documentation] Verify end-to-end: facade.dispatch() returns a response
|
|
... with jsonrpc="2.0", id matching the request, and result set.
|
|
${result}= Run Process ${PYTHON} ${HELPER} facade-dispatch-jsonrpc cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-facade-dispatch-jsonrpc-ok
|
|
|
|
A2A Request Deserialises From JSON-RPC 2.0 Payload
|
|
[Documentation] Verify A2aRequest can be constructed from a JSON-RPC 2.0 dict
|
|
... (simulating inbound network payload).
|
|
${result}= Run Process ${PYTHON} ${HELPER} request-deserialise cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-request-deserialise-ok
|
|
|
|
A2A Response Deserialises From JSON-RPC 2.0 Payload
|
|
[Documentation] Verify A2aResponse can be constructed from a JSON-RPC 2.0 dict
|
|
... (simulating inbound network payload).
|
|
${result}= Run Process ${PYTHON} ${HELPER} response-deserialise cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-response-deserialise-ok
|
|
|
|
A2A Request Rejects Non-Standard Field Names
|
|
[Documentation] Verify that A2aRequest no longer accepts old non-standard
|
|
... field names (a2a_version, request_id, operation).
|
|
${result}= Run Process ${PYTHON} ${HELPER} request-rejects-old-fields cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} a2a-request-rejects-old-fields-ok
|