UAT: A2A facade docs show wrong dispatch() signature — async with method+params vs sync with A2aRequest #6620

Closed
opened 2026-04-09 22:22:38 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: A2A Protocol — A2A Facade documentation

Spec Reference

docs/reference/a2a.md — Local Facade section, Methods table and code example.

Expected Behavior

The documentation should accurately reflect the actual dispatch() API.

Actual Behavior

Documentation shows:

Methods table:

| dispatch(method, params) | dict | Route extension method to handler |

Code example:

# Extension method
result = await facade.dispatch("_cleveragents/plan/status", {"plan_id": "01J..."})

Actual implementation (src/cleveragents/a2a/facade.py):

def dispatch(self, request: A2aRequest) -> A2aResponse:
    """Route an A2aRequest to the appropriate handler."""

The documentation has two errors:

  1. Wrong signature: docs show dispatch(method, params) but actual is dispatch(request: A2aRequest)
  2. Wrong async: docs show await facade.dispatch(...) but the method is synchronous
  3. Wrong return type: docs show dict return but actual return is A2aResponse

Code Location

  • docs/reference/a2a.md — Local Facade section, Methods table and code example
  • src/cleveragents/a2a/facade.pydispatch() method

Impact

  • Developers integrating with the A2A facade will write incorrect code based on the documentation
  • The await in the example will cause a TypeError at runtime since dispatch() is synchronous
  • Passing (method, params) instead of A2aRequest will cause a TypeError

Fix Required

Update docs/reference/a2a.md:

  1. Methods table: change dispatch(method, params) to dispatch(request: A2aRequest)
  2. Return type: change dict to A2aResponse
  3. Code example: remove await and update to use A2aRequest:
from cleveragents.a2a.models import A2aRequest

result = facade.dispatch(A2aRequest(
    method="_cleveragents/plan/status",
    params={"plan_id": "01J..."}
))

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** A2A Protocol — A2A Facade documentation ### Spec Reference `docs/reference/a2a.md` — Local Facade section, Methods table and code example. ### Expected Behavior The documentation should accurately reflect the actual `dispatch()` API. ### Actual Behavior **Documentation shows:** Methods table: ``` | dispatch(method, params) | dict | Route extension method to handler | ``` Code example: ```python # Extension method result = await facade.dispatch("_cleveragents/plan/status", {"plan_id": "01J..."}) ``` **Actual implementation** (`src/cleveragents/a2a/facade.py`): ```python def dispatch(self, request: A2aRequest) -> A2aResponse: """Route an A2aRequest to the appropriate handler.""" ``` The documentation has **two errors**: 1. **Wrong signature**: docs show `dispatch(method, params)` but actual is `dispatch(request: A2aRequest)` 2. **Wrong async**: docs show `await facade.dispatch(...)` but the method is synchronous 3. **Wrong return type**: docs show `dict` return but actual return is `A2aResponse` ### Code Location - `docs/reference/a2a.md` — Local Facade section, Methods table and code example - `src/cleveragents/a2a/facade.py` — `dispatch()` method ### Impact - Developers integrating with the A2A facade will write incorrect code based on the documentation - The `await` in the example will cause a `TypeError` at runtime since `dispatch()` is synchronous - Passing `(method, params)` instead of `A2aRequest` will cause a `TypeError` ### Fix Required Update `docs/reference/a2a.md`: 1. Methods table: change `dispatch(method, params)` to `dispatch(request: A2aRequest)` 2. Return type: change `dict` to `A2aResponse` 3. Code example: remove `await` and update to use `A2aRequest`: ```python from cleveragents.a2a.models import A2aRequest result = facade.dispatch(A2aRequest( method="_cleveragents/plan/status", params={"plan_id": "01J..."} )) ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6620
No description provided.