TEST-INFRA: [coverage-gaps] Zero coverage for src/cleveragents/a2a/transport.py — A2aHttpTransport stub uncovered #2317

Open
opened 2026-04-03 14:10:12 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: test/a2a-transport-coverage
  • Commit Message: test(a2a): add BDD scenarios for A2aHttpTransport stub — send, connect, disconnect, is_connected
  • Milestone: v3.8.0
  • Parent Epic: #933

Background and Context

The file src/cleveragents/a2a/transport.py currently has 0% test coverage. This file defines A2aHttpTransport, the stub HTTP transport for A2A server mode. All four public methods (send, connect, disconnect, is_connected) are completely uncovered by the test suite.

The stub is intentionally designed to raise A2aNotAvailableError for all mutating operations (server mode is not yet implemented), and to return False from is_connected. Despite being a stub, the argument validation logic, warning log calls, and error-raising paths all represent real, testable behaviour that must be covered to maintain the project's ≥97% coverage threshold.

Current Behaviour

Running nox -s coverage_report shows src/cleveragents/a2a/transport.py at 0% coverage — none of the 70 lines in the module are exercised by any existing Behave, Robot, or ASV test.

Expected Behaviour

All four public methods of A2aHttpTransport are covered by BDD scenarios:

  • send(request) — raises A2aNotAvailableError for valid A2aRequest; raises TypeError for invalid argument.
  • connect(base_url) — raises A2aNotAvailableError for a valid URL string; raises ValueError for empty/non-string input.
  • disconnect() — raises A2aNotAvailableError unconditionally.
  • is_connected() — returns False.

Acceptance Criteria

  • A Behave feature file exists covering all four methods of A2aHttpTransport with happy-path and error-path scenarios.
  • Step definitions are implemented (or extended from existing a2a step files) with no placeholder steps.
  • Coverage for src/cleveragents/a2a/transport.py reaches 100% (all lines and branches).
  • Overall project coverage remains ≥ 97%.
  • All nox default sessions pass without errors.

Supporting Information

  • Source file: src/cleveragents/a2a/transport.py
  • Class under test: A2aHttpTransport
  • Methods: send, connect, disconnect, is_connected
  • Error type raised: cleveragents.a2a.errors.A2aNotAvailableError
  • Related coverage issues: #2291 (errors.py), #2280 (clients.py), #2311 (models.py), #2314 (server_config.py)
  • Parent Epic: #933 (A2A Protocol Compliance)

Subtasks

  • Audit src/cleveragents/a2a/transport.py and list all uncovered lines/branches
  • Check existing Behave step files under features/steps/ for reusable a2a steps
  • Write features/a2a_transport_coverage.feature with scenarios for all four methods
  • Implement step definitions in features/steps/a2a_transport_coverage_steps.py (or extend an existing a2a steps file)
  • Verify send() raises TypeError when passed a non-A2aRequest argument
  • Verify send() raises A2aNotAvailableError for a valid A2aRequest
  • Verify connect() raises ValueError for empty/non-string base_url
  • Verify connect() raises A2aNotAvailableError for a valid URL string
  • Verify disconnect() raises A2aNotAvailableError
  • Verify is_connected() returns False
  • Run nox -s coverage_report and confirm transport.py is at 100%
  • Run nox (all default sessions) and confirm all pass

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (test(a2a): add BDD scenarios for A2aHttpTransport stub — send, connect, disconnect, is_connected), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (test/a2a-transport-coverage).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage ≥ 97%.

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

## Metadata - **Branch**: `test/a2a-transport-coverage` - **Commit Message**: `test(a2a): add BDD scenarios for A2aHttpTransport stub — send, connect, disconnect, is_connected` - **Milestone**: v3.8.0 - **Parent Epic**: #933 ## Background and Context The file `src/cleveragents/a2a/transport.py` currently has **0% test coverage**. This file defines `A2aHttpTransport`, the stub HTTP transport for A2A server mode. All four public methods (`send`, `connect`, `disconnect`, `is_connected`) are completely uncovered by the test suite. The stub is intentionally designed to raise `A2aNotAvailableError` for all mutating operations (server mode is not yet implemented), and to return `False` from `is_connected`. Despite being a stub, the argument validation logic, warning log calls, and error-raising paths all represent real, testable behaviour that must be covered to maintain the project's ≥97% coverage threshold. ## Current Behaviour Running `nox -s coverage_report` shows `src/cleveragents/a2a/transport.py` at **0% coverage** — none of the 70 lines in the module are exercised by any existing Behave, Robot, or ASV test. ## Expected Behaviour All four public methods of `A2aHttpTransport` are covered by BDD scenarios: - `send(request)` — raises `A2aNotAvailableError` for valid `A2aRequest`; raises `TypeError` for invalid argument. - `connect(base_url)` — raises `A2aNotAvailableError` for a valid URL string; raises `ValueError` for empty/non-string input. - `disconnect()` — raises `A2aNotAvailableError` unconditionally. - `is_connected()` — returns `False`. ## Acceptance Criteria - [ ] A Behave feature file exists covering all four methods of `A2aHttpTransport` with happy-path and error-path scenarios. - [ ] Step definitions are implemented (or extended from existing a2a step files) with no placeholder steps. - [ ] Coverage for `src/cleveragents/a2a/transport.py` reaches **100%** (all lines and branches). - [ ] Overall project coverage remains **≥ 97%**. - [ ] All `nox` default sessions pass without errors. ## Supporting Information - Source file: `src/cleveragents/a2a/transport.py` - Class under test: `A2aHttpTransport` - Methods: `send`, `connect`, `disconnect`, `is_connected` - Error type raised: `cleveragents.a2a.errors.A2aNotAvailableError` - Related coverage issues: #2291 (errors.py), #2280 (clients.py), #2311 (models.py), #2314 (server_config.py) - Parent Epic: #933 (A2A Protocol Compliance) ## Subtasks - [ ] Audit `src/cleveragents/a2a/transport.py` and list all uncovered lines/branches - [ ] Check existing Behave step files under `features/steps/` for reusable a2a steps - [ ] Write `features/a2a_transport_coverage.feature` with scenarios for all four methods - [ ] Implement step definitions in `features/steps/a2a_transport_coverage_steps.py` (or extend an existing a2a steps file) - [ ] Verify `send()` raises `TypeError` when passed a non-`A2aRequest` argument - [ ] Verify `send()` raises `A2aNotAvailableError` for a valid `A2aRequest` - [ ] Verify `connect()` raises `ValueError` for empty/non-string `base_url` - [ ] Verify `connect()` raises `A2aNotAvailableError` for a valid URL string - [ ] Verify `disconnect()` raises `A2aNotAvailableError` - [ ] Verify `is_connected()` returns `False` - [ ] Run `nox -s coverage_report` and confirm `transport.py` is at 100% - [ ] Run `nox` (all default sessions) and confirm all pass ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`test(a2a): add BDD scenarios for A2aHttpTransport stub — send, connect, disconnect, is_connected`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`test/a2a-transport-coverage`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage ≥ 97%. --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 14:10:17 +00:00
freemo removed this from the v3.8.0 milestone 2026-04-07 01:01:52 +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.

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