UAT: A2aHttpTransport raises A2aNotAvailableError on all operations — no functional HTTP transport for server mode communication #2167

Open
opened 2026-04-03 04:39:15 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/m7-a2a-http-transport-stub
  • Commit Message: fix(a2a): implement A2aHttpTransport for server mode HTTP communication
  • Milestone: v3.7.0
  • Parent Epic: #933

Background and Context

The specification designates the A2A Protocol as the sole communication protocol for all client-server interaction, operating over HTTP in server mode (spec §Architecture, §A2A Protocol). The A2aHttpTransport class in src/cleveragents/a2a/transport.py is the foundational transport layer that clients (CLI, TUI, IDE plugins) rely on to communicate with the CleverAgents server for all A2A operations including entity synchronization, plan execution, and all other server-mode operations.

Current Behavior

The A2aHttpTransport class raises A2aNotAvailableError for every single method. The module docstring explicitly states this is a stub pending a future "separate project":

# transport.py — all methods raise A2aNotAvailableError
def send(self, request: A2aRequest) -> A2aResponse:
    raise A2aNotAvailableError(_SERVER_MODE_MSG, details={"method": request.method})

def connect(self, base_url: str) -> None:
    raise A2aNotAvailableError(_SERVER_MODE_MSG, details={"base_url": base_url})

def disconnect(self) -> None:
    raise A2aNotAvailableError(_SERVER_MODE_MSG)

def is_connected(self) -> bool:
    return False  # Always False

Additionally, subscribe_remote() in A2aEventQueue (events.py lines 122–136) also raises A2aNotAvailableError with the message "Remote event subscriptions are not available in local mode - server mode will be implemented as a separate project."

Code Locations:

  • src/cleveragents/a2a/transport.py lines 1–70: Entire A2aHttpTransport class raises on all methods
  • src/cleveragents/a2a/events.py lines 122–136: A2aEventQueue.subscribe_remote() raises A2aNotAvailableError

Expected Behavior

Per the specification, A2aHttpTransport must provide a functional HTTP transport for server mode:

  1. connect(base_url) — Opens an HTTP connection to the A2A server at the given URL
  2. disconnect() — Closes the connection to the A2A server
  3. is_connected() — Returns True when a live connection exists
  4. send(request) — Sends an A2A JSON-RPC 2.0 request over HTTP and returns the parsed response

A2aEventQueue.subscribe_remote() must similarly support remote event subscriptions over HTTP/SSE.

Steps to Reproduce

from cleveragents.a2a.transport import A2aHttpTransport
from cleveragents.a2a.errors import A2aNotAvailableError
from cleveragents.a2a.models import A2aRequest

transport = A2aHttpTransport()

# All operations raise A2aNotAvailableError — server mode is non-functional
try:
    transport.connect("https://agents.example.com")
    assert False, "Should have raised"
except A2aNotAvailableError:
    pass

assert transport.is_connected() is False  # Always False — never connects

req = A2aRequest(method="_cleveragents/health/check", params={})
try:
    transport.send(req)
    assert False, "Should have raised"
except A2aNotAvailableError:
    pass

Subtasks

  • Implement A2aHttpTransport.connect(base_url) — establish HTTP session to A2A server
  • Implement A2aHttpTransport.disconnect() — cleanly close the HTTP session
  • Implement A2aHttpTransport.is_connected() — return live connection state
  • Implement A2aHttpTransport.send(request) — POST JSON-RPC 2.0 request and parse response
  • Implement A2aEventQueue.subscribe_remote() — remote event subscription over HTTP/SSE
  • Add unit tests (pytest) for all A2aHttpTransport methods including error paths
  • Add Behave scenario: client connects to server and sends a JSON-RPC 2.0 request via HTTP transport
  • Add Robot integration test: end-to-end HTTP transport round-trip
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions) and fix any errors

Definition of Done

  • A2aHttpTransport.connect() successfully establishes an HTTP session to a live A2A server
  • A2aHttpTransport.is_connected() returns True after a successful connect() and False after disconnect()
  • A2aHttpTransport.send() correctly POSTs a JSON-RPC 2.0 request and returns a parsed A2aResponse
  • A2aEventQueue.subscribe_remote() supports remote event subscriptions without raising A2aNotAvailableError
  • No method in A2aHttpTransport raises A2aNotAvailableError during normal operation
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/m7-a2a-http-transport-stub` - **Commit Message**: `fix(a2a): implement A2aHttpTransport for server mode HTTP communication` - **Milestone**: v3.7.0 - **Parent Epic**: #933 ## Background and Context The specification designates the A2A Protocol as the **sole** communication protocol for all client-server interaction, operating over **HTTP in server mode** (spec §Architecture, §A2A Protocol). The `A2aHttpTransport` class in `src/cleveragents/a2a/transport.py` is the foundational transport layer that clients (CLI, TUI, IDE plugins) rely on to communicate with the CleverAgents server for all A2A operations including entity synchronization, plan execution, and all other server-mode operations. ## Current Behavior The `A2aHttpTransport` class raises `A2aNotAvailableError` for **every single method**. The module docstring explicitly states this is a stub pending a future "separate project": ```python # transport.py — all methods raise A2aNotAvailableError def send(self, request: A2aRequest) -> A2aResponse: raise A2aNotAvailableError(_SERVER_MODE_MSG, details={"method": request.method}) def connect(self, base_url: str) -> None: raise A2aNotAvailableError(_SERVER_MODE_MSG, details={"base_url": base_url}) def disconnect(self) -> None: raise A2aNotAvailableError(_SERVER_MODE_MSG) def is_connected(self) -> bool: return False # Always False ``` Additionally, `subscribe_remote()` in `A2aEventQueue` (`events.py` lines 122–136) also raises `A2aNotAvailableError` with the message "Remote event subscriptions are not available in local mode - server mode will be implemented as a separate project." **Code Locations:** - `src/cleveragents/a2a/transport.py` lines 1–70: Entire `A2aHttpTransport` class raises on all methods - `src/cleveragents/a2a/events.py` lines 122–136: `A2aEventQueue.subscribe_remote()` raises `A2aNotAvailableError` ## Expected Behavior Per the specification, `A2aHttpTransport` must provide a functional HTTP transport for server mode: 1. `connect(base_url)` — Opens an HTTP connection to the A2A server at the given URL 2. `disconnect()` — Closes the connection to the A2A server 3. `is_connected()` — Returns `True` when a live connection exists 4. `send(request)` — Sends an A2A JSON-RPC 2.0 request over HTTP and returns the parsed response `A2aEventQueue.subscribe_remote()` must similarly support remote event subscriptions over HTTP/SSE. ## Steps to Reproduce ```python from cleveragents.a2a.transport import A2aHttpTransport from cleveragents.a2a.errors import A2aNotAvailableError from cleveragents.a2a.models import A2aRequest transport = A2aHttpTransport() # All operations raise A2aNotAvailableError — server mode is non-functional try: transport.connect("https://agents.example.com") assert False, "Should have raised" except A2aNotAvailableError: pass assert transport.is_connected() is False # Always False — never connects req = A2aRequest(method="_cleveragents/health/check", params={}) try: transport.send(req) assert False, "Should have raised" except A2aNotAvailableError: pass ``` ## Subtasks - [ ] Implement `A2aHttpTransport.connect(base_url)` — establish HTTP session to A2A server - [ ] Implement `A2aHttpTransport.disconnect()` — cleanly close the HTTP session - [ ] Implement `A2aHttpTransport.is_connected()` — return live connection state - [ ] Implement `A2aHttpTransport.send(request)` — POST JSON-RPC 2.0 request and parse response - [ ] Implement `A2aEventQueue.subscribe_remote()` — remote event subscription over HTTP/SSE - [ ] Add unit tests (pytest) for all `A2aHttpTransport` methods including error paths - [ ] Add Behave scenario: client connects to server and sends a JSON-RPC 2.0 request via HTTP transport - [ ] Add Robot integration test: end-to-end HTTP transport round-trip - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions) and fix any errors ## Definition of Done - [ ] `A2aHttpTransport.connect()` successfully establishes an HTTP session to a live A2A server - [ ] `A2aHttpTransport.is_connected()` returns `True` after a successful `connect()` and `False` after `disconnect()` - [ ] `A2aHttpTransport.send()` correctly POSTs a JSON-RPC 2.0 request and returns a parsed `A2aResponse` - [ ] `A2aEventQueue.subscribe_remote()` supports remote event subscriptions without raising `A2aNotAvailableError` - [ ] No method in `A2aHttpTransport` raises `A2aNotAvailableError` during normal operation - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-03 04:39:20 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical (confirmed) — The HTTP transport is a complete stub. All methods raise A2aNotAvailableError. Server mode communication is entirely non-functional. However, this is a known stub — the milestone description explicitly states server mode is deferred.
  • Milestone: v3.7.0 (already assigned, though this is arguably v3.8.0 scope)
  • MoSCoW: Should Have — While Critical in severity, server mode is explicitly deferred. This is important for eventual server implementation but not blocking current M1-M6 work.
  • Parent Epic: #933 (confirmed correct)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical (confirmed) — The HTTP transport is a complete stub. All methods raise `A2aNotAvailableError`. Server mode communication is entirely non-functional. However, this is a **known stub** — the milestone description explicitly states server mode is deferred. - **Milestone**: v3.7.0 (already assigned, though this is arguably v3.8.0 scope) - **MoSCoW**: Should Have — While Critical in severity, server mode is explicitly deferred. This is important for eventual server implementation but not blocking current M1-M6 work. - **Parent Epic**: #933 (confirmed correct) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo self-assigned this 2026-04-03 16:57:59 +00:00
Author
Owner

Starting implementation on branch fix/m7-a2a-http-transport-stub.

Issue: Implement functional A2aHttpTransport to replace the stub that raises A2aNotAvailableError on all operations.

Affected files:

  • src/cleveragents/a2a/transport.py — Full A2aHttpTransport implementation
  • src/cleveragents/a2a/events.pyA2aEventQueue.subscribe_remote() implementation

Wave plan:

  • Wave 1 (parallel): Subtasks 1–5 (implement all transport/event methods)
  • Wave 2 (parallel): Subtasks 6–8 (unit tests, Behave scenario, Robot integration test)
  • Wave 3 (sequential): Subtasks 9–10 (coverage verification, nox full run)

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/m7-a2a-http-transport-stub`. **Issue**: Implement functional `A2aHttpTransport` to replace the stub that raises `A2aNotAvailableError` on all operations. **Affected files**: - `src/cleveragents/a2a/transport.py` — Full `A2aHttpTransport` implementation - `src/cleveragents/a2a/events.py` — `A2aEventQueue.subscribe_remote()` implementation **Wave plan**: - Wave 1 (parallel): Subtasks 1–5 (implement all transport/event methods) - Wave 2 (parallel): Subtasks 6–8 (unit tests, Behave scenario, Robot integration test) - Wave 3 (sequential): Subtasks 9–10 (coverage verification, nox full run) --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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.

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