Skip to content

feat(acts): transport adapters - #60

Merged
JakubWorek merged 2 commits into
mainfrom
jakubworek/acts-transport-adapters
Sep 9, 2026
Merged

JakubWorek merged 2 commits into
mainfrom
jakubworek/acts-transport-adapters

Conversation

@JakubWorek

@JakubWorek JakubWorek commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Binds ACTS's abstract operations and error names to the three wire protocols, so the runner can dispatch a step without knowing which binding carries it. Follows 4.1's corpus and loader; nothing evaluates assertions yet.

test_suite/acts/wire_map.py is the single mapping table:

  • operation -> {jsonrpc_method, grpc_method, rest_method, rest_path},
  • error_type -> {jsonrpc_code, grpc_status, http_status, reason}, plus reverse lookups.

It tracks A2A §5.3 and §5.4, not the ACTS restatements of them, which ACTS §6.2's own footnote defers to and which are stale: §4.1 writes GET for subscribe_to_task, drops the Task infix from all four push-config methods and calls the collection pushNotifications - a dispatcher built from that table 404s on every push-config call - while §6.2 gives VersionNotSupportedError a code that belongs to InvalidAgentResponseError, and assigns -32007 to an error A2A does not define.

test_suite/acts/dispatcher/ holds the three adapters behind one interface: dispatch, dispatch_raw and stream, all returning a common WireResponse. An error from the SUT comes back as response.error; only a failure to complete the exchange raises. payload is always the response message - JSON-RPC unwraps result, REST has no envelope, gRPC is MessageToDict - so expect.body reads identically on all three. Errors are identified by JSON-RPC error.code or google.rpc.ErrorInfo.reason, never by status: A2A §11.6 mandates that ErrorInfo precisely because status is not injective, and a SUT that omits it leaves the error unnamed rather than guessed at.

dispatcher/params.py reshapes two operations whose params don't fit their request message, identically on every binding since all three carry the same messages. send_message passes taskId/contextId beside message, but those are Message fields; create_push_config nests pushNotificationConfig: {url}, but the request message is TaskPushNotificationConfig with url at the top level. Neither is a guess - the same tests already assert expect.body against the reshaped form. A test pins that every operation step in the corpus now parses into a valid A2A request.

Other changes

  • a2a-sdk dependency is dropped. Nothing in the repo imported it; it arrived with the first commit and would have gained its first real user here, for the generated protobuf types. build_protos.sh now fetches specification/a2a.proto at a pinned A2A_SPEC_REF and generates pyproto/a2a_pb2{,_grpc}.py beside the existing instruction_pb2 ones - the proto is not vendored, the stubs are committed, same pattern as before.
  • pydantic is now declared dependency

Comment thread test_suite/acts/dispatcher/grpc.py Resolved
Comment thread test_suite/acts/dispatcher/grpc.py Resolved
Comment thread test_suite/acts/dispatcher/http_base.py Resolved
Comment thread test_suite/acts/dispatcher/rest.py Resolved
Comment thread test_suite/acts/wire_map.py Resolved
…le redirect following across all dispatchers
@JakubWorek
JakubWorek merged commit 89f4560 into main Sep 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants