UAT: asgi.py ASGI app has no A2A JSON-RPC endpoint — only health probes served; POST / or POST /a2a returns 404 #4870

Open
opened 2026-04-08 20:10:58 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Tested by: UAT tester instance uat-tester-a2a-protocol
Feature area: A2A Protocol — server HTTP mode
Severity: Medium — the ASGI app cannot serve A2A JSON-RPC requests in server mode


What Was Tested

Code-level analysis of src/cleveragents/a2a/asgi.py — the ASGI application routing.

Expected Behavior (from spec)

In server HTTP mode, the ASGI app should expose an A2A JSON-RPC endpoint (e.g., POST / or POST /a2a) that:

  1. Accepts JSON-RPC 2.0 request bodies
  2. Dispatches them to A2aLocalFacade (or a server-mode equivalent)
  3. Returns JSON-RPC 2.0 response bodies

The spec describes the server as accepting A2A protocol requests over HTTP.

Actual Behavior

The asgi.py app only serves health/readiness probes:

_KNOWN_PATHS: frozenset[str] = frozenset({"/", "/live", "/ready", "/health"})

Routes handled:

  • GET /live{"status": "alive"}
  • GET /ready{"status": "ready"}
  • GET /health{"status": "ok"}
  • GET /{"service": "cleveragents"}
  • Any known path with wrong method → 405
  • Unknown path → 404

There is no POST / or POST /a2a handler for A2A JSON-RPC requests. Sending a JSON-RPC request to the server returns 405 (wrong method for /) or 404 (for /a2a).

Code Location

  • src/cleveragents/a2a/asgi.pyapp() ASGI callable

Steps to Reproduce

# Start the ASGI app (e.g., with uvicorn)
uvicorn cleveragents.a2a.asgi:app --port 8080

# Try to send an A2A request
curl -X POST http://localhost:8080/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"_cleveragents/health/check","params":{}}'
# Returns: 405 Method Not Allowed

curl -X POST http://localhost:8080/a2a \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"_cleveragents/health/check","params":{}}'
# Returns: 404 Not Found

Note on Scope

The module docstring acknowledges this is intentional for the current state:

"It intentionally keeps behavior minimal and dependency-free (no FastAPI/Starlette dependency) while providing the required health probe endpoint for container and Kubernetes deployments."

However, this means the "server HTTP mode" described in the spec is not actually functional — the ASGI app cannot serve A2A protocol requests. This is a gap between the spec's server mode description and the current implementation.


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

## Bug Report **Tested by:** UAT tester instance `uat-tester-a2a-protocol` **Feature area:** A2A Protocol — server HTTP mode **Severity:** Medium — the ASGI app cannot serve A2A JSON-RPC requests in server mode --- ### What Was Tested Code-level analysis of `src/cleveragents/a2a/asgi.py` — the ASGI application routing. ### Expected Behavior (from spec) In server HTTP mode, the ASGI app should expose an A2A JSON-RPC endpoint (e.g., `POST /` or `POST /a2a`) that: 1. Accepts JSON-RPC 2.0 request bodies 2. Dispatches them to `A2aLocalFacade` (or a server-mode equivalent) 3. Returns JSON-RPC 2.0 response bodies The spec describes the server as accepting A2A protocol requests over HTTP. ### Actual Behavior The `asgi.py` app only serves health/readiness probes: ```python _KNOWN_PATHS: frozenset[str] = frozenset({"/", "/live", "/ready", "/health"}) ``` Routes handled: - `GET /live` → `{"status": "alive"}` - `GET /ready` → `{"status": "ready"}` - `GET /health` → `{"status": "ok"}` - `GET /` → `{"service": "cleveragents"}` - Any known path with wrong method → 405 - Unknown path → 404 There is **no `POST /` or `POST /a2a` handler** for A2A JSON-RPC requests. Sending a JSON-RPC request to the server returns 405 (wrong method for `/`) or 404 (for `/a2a`). ### Code Location - `src/cleveragents/a2a/asgi.py` — `app()` ASGI callable ### Steps to Reproduce ```bash # Start the ASGI app (e.g., with uvicorn) uvicorn cleveragents.a2a.asgi:app --port 8080 # Try to send an A2A request curl -X POST http://localhost:8080/ \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"1","method":"_cleveragents/health/check","params":{}}' # Returns: 405 Method Not Allowed curl -X POST http://localhost:8080/a2a \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"1","method":"_cleveragents/health/check","params":{}}' # Returns: 404 Not Found ``` ### Note on Scope The module docstring acknowledges this is intentional for the current state: > "It intentionally keeps behavior minimal and dependency-free (no FastAPI/Starlette dependency) while providing the required health probe endpoint for container and Kubernetes deployments." However, this means the "server HTTP mode" described in the spec is not actually functional — the ASGI app cannot serve A2A protocol requests. This is a gap between the spec's server mode description and the current implementation. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:16:29 +00:00
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#4870
No description provided.