UAT: A2A event subscription not implemented in TUI — no real-time plan/session updates per ADR-044 #5984

Open
opened 2026-04-09 12:52:52 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: TUI Main Screen — A2A Event Subscription
Severity: Critical — blocks v3.7.0 milestone acceptance
Spec Reference: ADR-044 §A2A Event Subscription Architecture
Found by: UAT Testing Pool (uat-pool-1), worker: tui-main-screen


What Was Tested

Code-level analysis of src/cleveragents/tui/ for A2A event subscription implementation.

Expected Behavior (from spec/ADR-044)

ADR-044 §A2A Event Subscription Architecture defines that the TUI subscribes to A2A events for real-time updates:

A2AClient (local or server)
    │
    ├── events.subscribe(plan_id=*, event_type=*)
    │       │
    │       ├──► plan.phase_changed    ──► SideBar.PlansPanel: update phase indicator
    │       ├──► plan.state_changed    ──► SideBar.PlansPanel: update state badge
    │       ├──► plan.decision_made    ──► SideBar.PlansPanel: update depth counter
    │       ├──► tool.invoked          ──► Conversation: mount ToolCall widget (pending)
    │       ├──► tool.completed        ──► Conversation: update ToolCall widget (done/fail)
    │       ├──► validation.completed  ──► Conversation: append validation result
    │       ├──► plan.apply_completed  ──► SideBar: update terminal state
    │       │                              Flash: show completion notification
    │       ├──► plan.error            ──► Flash: show error notification
    │       └──► session.message       ──► Conversation: stream ActorResponse content
    │
    └── Local mode: RxPY Observable subscription
        Server mode: A2A TaskStatusUpdateEvent / TaskArtifactUpdateEvent via SSE

ADR-044 §Constraints states:

"The TUI must not block the main thread during A2A operations; all A2A calls are async"
"The TUI must communicate with the Application layer exclusively through A2A — no direct imports from Domain or Infrastructure layers"

Actual Behavior

The CleverAgentsTuiApp has no A2A client, no event subscription, and no async A2A operations. The app's global state:

def __init__(self, ...) -> None:
    super().__init__()
    self._command_router = command_router  # Synchronous slash command router
    self._persona_state = persona_state    # Local persona state
    self._session = SessionView(...)       # Local session view
    # No A2AClient
    # No event subscription
    # No async A2A calls

The TuiCommandRouter in commands.py uses the DI container directly (bypassing A2A), which violates the ADR-044 constraint that the TUI must communicate exclusively through A2A.

No A2AClient global state exists. No RxPY observable subscriptions. No SSE event stream handling.

Steps to Reproduce

grep -r "A2AClient\|a2a_client\|events.subscribe\|TaskStatusUpdateEvent\|TaskArtifactUpdateEvent\|RxPY\|observable" src/cleveragents/tui/ --include="*.py"
# No matches

grep -r "from cleveragents.a2a\|import a2a" src/cleveragents/tui/ --include="*.py"
# No matches

Impact

Without A2A event subscription:

  • The TUI cannot display real-time plan progress
  • Tool invocations are not shown as they happen
  • Actor responses cannot stream into the conversation
  • The TUI is effectively a static interface with no live updates

This is a fundamental architectural gap — the TUI is supposed to be the real-time monitoring surface for CleverAgents, but it has no connection to the A2A event bus.

Code Location

  • src/cleveragents/tui/app.py — no A2AClient, no event subscription
  • src/cleveragents/tui/commands.pyTuiCommandRouter uses DI container directly (violates ADR-044 constraint)

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

## Bug Report **Feature Area:** TUI Main Screen — A2A Event Subscription **Severity:** Critical — blocks v3.7.0 milestone acceptance **Spec Reference:** ADR-044 §A2A Event Subscription Architecture **Found by:** UAT Testing Pool (uat-pool-1), worker: tui-main-screen --- ## What Was Tested Code-level analysis of `src/cleveragents/tui/` for A2A event subscription implementation. ## Expected Behavior (from spec/ADR-044) ADR-044 §A2A Event Subscription Architecture defines that the TUI subscribes to A2A events for real-time updates: ``` A2AClient (local or server) │ ├── events.subscribe(plan_id=*, event_type=*) │ │ │ ├──► plan.phase_changed ──► SideBar.PlansPanel: update phase indicator │ ├──► plan.state_changed ──► SideBar.PlansPanel: update state badge │ ├──► plan.decision_made ──► SideBar.PlansPanel: update depth counter │ ├──► tool.invoked ──► Conversation: mount ToolCall widget (pending) │ ├──► tool.completed ──► Conversation: update ToolCall widget (done/fail) │ ├──► validation.completed ──► Conversation: append validation result │ ├──► plan.apply_completed ──► SideBar: update terminal state │ │ Flash: show completion notification │ ├──► plan.error ──► Flash: show error notification │ └──► session.message ──► Conversation: stream ActorResponse content │ └── Local mode: RxPY Observable subscription Server mode: A2A TaskStatusUpdateEvent / TaskArtifactUpdateEvent via SSE ``` ADR-044 §Constraints states: > "The TUI must not block the main thread during A2A operations; all A2A calls are async" > "The TUI must communicate with the Application layer exclusively through A2A — no direct imports from Domain or Infrastructure layers" ## Actual Behavior The `CleverAgentsTuiApp` has **no A2A client, no event subscription, and no async A2A operations**. The app's global state: ```python def __init__(self, ...) -> None: super().__init__() self._command_router = command_router # Synchronous slash command router self._persona_state = persona_state # Local persona state self._session = SessionView(...) # Local session view # No A2AClient # No event subscription # No async A2A calls ``` The `TuiCommandRouter` in `commands.py` uses the DI container directly (bypassing A2A), which violates the ADR-044 constraint that the TUI must communicate exclusively through A2A. No `A2AClient` global state exists. No RxPY observable subscriptions. No SSE event stream handling. ## Steps to Reproduce ```bash grep -r "A2AClient\|a2a_client\|events.subscribe\|TaskStatusUpdateEvent\|TaskArtifactUpdateEvent\|RxPY\|observable" src/cleveragents/tui/ --include="*.py" # No matches grep -r "from cleveragents.a2a\|import a2a" src/cleveragents/tui/ --include="*.py" # No matches ``` ## Impact Without A2A event subscription: - The TUI cannot display real-time plan progress - Tool invocations are not shown as they happen - Actor responses cannot stream into the conversation - The TUI is effectively a static interface with no live updates This is a fundamental architectural gap — the TUI is supposed to be the real-time monitoring surface for CleverAgents, but it has no connection to the A2A event bus. ## Code Location - `src/cleveragents/tui/app.py` — no A2AClient, no event subscription - `src/cleveragents/tui/commands.py` — `TuiCommandRouter` uses DI container directly (violates ADR-044 constraint) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 13:05:27 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#5984
No description provided.