UAT: A2aEventQueue not wired in cli_bootstrap.py — event_queue is always None in the facade, making event subscribe permanently stub #3278

Open
opened 2026-04-05 09:01:50 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: bugfix/m6-event-queue-wiring
  • Commit Message: fix(a2a): wire A2aEventQueue into cli_bootstrap facade services dict
  • Milestone: v3.5.0
  • Parent Epic: #933

Background and Context

A2aEventQueue is fully implemented in src/cleveragents/a2a/events.py with working publish(), subscribe_local(), and get_events() methods. However, cli_bootstrap.py's _build_facade() never instantiates or registers it in the facade's services dict. This means A2aLocalFacade._event_queue always returns None, causing all event.subscribe calls to fall through to the stub path (returning a fake subscription ID with no real queue backing).

This is distinct from issue #3172 (no-op callback in _handle_event_subscribe). Even if #3172 were fixed, the event_queue would still be None because it is never wired in cli_bootstrap.py. Both bugs must be fixed for event queue publish/subscribe to work end-to-end.

Per docs/specification.md §Event Streaming, the event queue publish/subscribe mechanism must be operational. This is a v3.5.0 M6 Autonomy Hardening acceptance criterion: "Event queue publish/subscribe operational."

Current Behavior

In src/cleveragents/a2a/cli_bootstrap.py, _build_facade() (lines 28–51) only wires:

services["plan_lifecycle_service"] = container.plan_lifecycle_service()
services["session_service"] = container.session_service()
services["resource_registry_service"] = container.resource_registry_service()
services["tool_registry"] = container.tool_registry()

The "event_queue" key is never set. As a result:

  • A2aLocalFacade._event_queue (src/cleveragents/a2a/facade.py lines 154–155) always returns None
  • _handle_event_subscribe (src/cleveragents/a2a/facade.py lines 483–492) always takes the stub path, returning a fake subscription_id with no real queue backing
  • Plan lifecycle events (PLAN_CREATED, PLAN_PHASE_CHANGED, etc.) are never delivered to A2A subscribers

Expected Behavior

cli_bootstrap.py must instantiate an A2aEventQueue and register it under services["event_queue"] so that A2aLocalFacade._event_queue returns a live queue object and event.subscribe creates real subscriptions.

Steps to Reproduce

  1. Call get_facade() from cli_bootstrap
  2. Dispatch event.subscribe via the facade
  3. Observe that queue is None and the stub path is taken (fake subscription ID returned)
  4. Publish an event — no subscribers receive it

Affected Code Locations

  • src/cleveragents/a2a/cli_bootstrap.py_build_facade(): missing event_queue wiring
  • src/cleveragents/a2a/facade.py_event_queue property (lines 154–155)
  • src/cleveragents/a2a/facade.py_handle_event_subscribe (lines 483–492)
  • src/cleveragents/a2a/events.pyA2aEventQueue (fully implemented, no changes needed)

Acceptance Criteria

  • _build_facade() in cli_bootstrap.py instantiates an A2aEventQueue and sets services["event_queue"]
  • A2aLocalFacade._event_queue returns the registered A2aEventQueue instance (not None)
  • event.subscribe dispatched via the CLI facade creates a real subscription backed by the queue
  • Published events are delivered to subscribers (end-to-end smoke test)
  • The TDD issue-capture test (tagged @tdd_issue_3276) passes with @tdd_expected_fail removed
  • All nox stages pass
  • Coverage >= 97%

Subtasks

  • In cli_bootstrap.py _build_facade(), instantiate A2aEventQueue and set services["event_queue"]
  • Verify A2aLocalFacade._event_queue now returns the live queue instance (not None)
  • Remove @tdd_expected_fail tag from the TDD issue-capture test #3275 (leave @tdd_issue and @tdd_issue_3276 in place)
  • Run the TDD scenario and confirm it now passes normally
  • Tests (Behave): Add/update scenarios for event queue wiring and subscribe/publish round-trip
  • Tests (Robot): Add integration test for event.subscribe → publish → receive via CLI facade
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

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, 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.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • The TDD issue-capture test (issue #3275) passes with @tdd_expected_fail removed.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `bugfix/m6-event-queue-wiring` - **Commit Message**: `fix(a2a): wire A2aEventQueue into cli_bootstrap facade services dict` - **Milestone**: v3.5.0 - **Parent Epic**: #933 ## Background and Context `A2aEventQueue` is fully implemented in `src/cleveragents/a2a/events.py` with working `publish()`, `subscribe_local()`, and `get_events()` methods. However, `cli_bootstrap.py`'s `_build_facade()` never instantiates or registers it in the facade's services dict. This means `A2aLocalFacade._event_queue` always returns `None`, causing all `event.subscribe` calls to fall through to the stub path (returning a fake subscription ID with no real queue backing). This is distinct from issue #3172 (no-op callback in `_handle_event_subscribe`). Even if #3172 were fixed, the `event_queue` would still be `None` because it is never wired in `cli_bootstrap.py`. Both bugs must be fixed for event queue publish/subscribe to work end-to-end. Per `docs/specification.md` §Event Streaming, the event queue publish/subscribe mechanism must be operational. This is a v3.5.0 M6 Autonomy Hardening acceptance criterion: "Event queue publish/subscribe operational." ## Current Behavior In `src/cleveragents/a2a/cli_bootstrap.py`, `_build_facade()` (lines 28–51) only wires: ```python services["plan_lifecycle_service"] = container.plan_lifecycle_service() services["session_service"] = container.session_service() services["resource_registry_service"] = container.resource_registry_service() services["tool_registry"] = container.tool_registry() ``` The `"event_queue"` key is never set. As a result: - `A2aLocalFacade._event_queue` (`src/cleveragents/a2a/facade.py` lines 154–155) always returns `None` - `_handle_event_subscribe` (`src/cleveragents/a2a/facade.py` lines 483–492) always takes the stub path, returning a fake `subscription_id` with no real queue backing - Plan lifecycle events (`PLAN_CREATED`, `PLAN_PHASE_CHANGED`, etc.) are never delivered to A2A subscribers ## Expected Behavior `cli_bootstrap.py` must instantiate an `A2aEventQueue` and register it under `services["event_queue"]` so that `A2aLocalFacade._event_queue` returns a live queue object and `event.subscribe` creates real subscriptions. ## Steps to Reproduce 1. Call `get_facade()` from `cli_bootstrap` 2. Dispatch `event.subscribe` via the facade 3. Observe that `queue` is `None` and the stub path is taken (fake subscription ID returned) 4. Publish an event — no subscribers receive it ## Affected Code Locations - `src/cleveragents/a2a/cli_bootstrap.py` — `_build_facade()`: missing `event_queue` wiring - `src/cleveragents/a2a/facade.py` — `_event_queue` property (lines 154–155) - `src/cleveragents/a2a/facade.py` — `_handle_event_subscribe` (lines 483–492) - `src/cleveragents/a2a/events.py` — `A2aEventQueue` (fully implemented, no changes needed) ## Acceptance Criteria - [ ] `_build_facade()` in `cli_bootstrap.py` instantiates an `A2aEventQueue` and sets `services["event_queue"]` - [ ] `A2aLocalFacade._event_queue` returns the registered `A2aEventQueue` instance (not `None`) - [ ] `event.subscribe` dispatched via the CLI facade creates a real subscription backed by the queue - [ ] Published events are delivered to subscribers (end-to-end smoke test) - [ ] The TDD issue-capture test (tagged `@tdd_issue_3276`) passes with `@tdd_expected_fail` removed - [ ] All nox stages pass - [ ] Coverage >= 97% ## Subtasks - [ ] In `cli_bootstrap.py` `_build_facade()`, instantiate `A2aEventQueue` and set `services["event_queue"]` - [ ] Verify `A2aLocalFacade._event_queue` now returns the live queue instance (not `None`) - [ ] Remove `@tdd_expected_fail` tag from the TDD issue-capture test #3275 (leave `@tdd_issue` and `@tdd_issue_3276` in place) - [ ] Run the TDD scenario and confirm it now passes normally - [ ] Tests (Behave): Add/update scenarios for event queue wiring and subscribe/publish round-trip - [ ] Tests (Robot): Add integration test for `event.subscribe` → publish → receive via CLI facade - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## 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, 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. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - The TDD issue-capture test (issue #3275) passes with `@tdd_expected_fail` removed. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.5.0 milestone 2026-04-05 09:06:28 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — A2aEventQueue is not wired in cli_bootstrap.py, making event_queue always None in the facade. This means event subscription is permanently stubbed — no events can be received by any client.
  • Milestone: v3.5.0 (already assigned)
  • MoSCoW: Must Have — The A2A event system is a core part of the protocol. Without event subscription, clients cannot receive real-time updates about plan execution, session state changes, or any other asynchronous events. This is a fundamental infrastructure gap.

This is now the 6th Critical Must Have bug in v3.5.0. Paired with #3275 (TDD test).


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

Issue triaged by project owner: - **State**: Verified ✅ - **Priority**: Critical — A2aEventQueue is not wired in `cli_bootstrap.py`, making `event_queue` always `None` in the facade. This means event subscription is permanently stubbed — no events can be received by any client. - **Milestone**: v3.5.0 (already assigned) - **MoSCoW**: Must Have — The A2A event system is a core part of the protocol. Without event subscription, clients cannot receive real-time updates about plan execution, session state changes, or any other asynchronous events. This is a fundamental infrastructure gap. This is now the **6th Critical Must Have bug** in v3.5.0. Paired with #3275 (TDD test). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.5.0 milestone 2026-04-06 21:05:27 +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#3278
No description provided.