fix(a2a): wire ContextAssemblyPipeline to A2A facade — _cleveragents/context/show returns hardcoded stub #3592

Open
opened 2026-04-05 20:12:47 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/v3.5.0/a2a-context-pipeline-wiring
  • Commit Message: fix(a2a): wire ContextAssemblyPipeline to A2A facade context handlers
  • Milestone: v3.5.0
  • Parent Epic: #369

Summary

The A2A local facade handler for _cleveragents/context/show (and related context operations _cleveragents/context/inspect, _cleveragents/context/simulate, _cleveragents/context/set) returns hardcoded stub responses instead of delegating to the implemented ContextAssemblyPipeline.

What Was Tested

Code-level analysis of src/cleveragents/a2a/facade.py and src/cleveragents/application/services/acms_pipeline.py.

Expected Behavior (from spec)

Per docs/specification.md §25197 and the A2A architecture (ADR-047/ADR-048), the _cleveragents/context/show A2A operation should invoke the ACMS ContextAssemblyPipeline to assemble and return context for the requested project/plan. The pipeline (ContextAssemblyPipeline in acms_pipeline.py) is fully implemented with all 10 stages.

Actual Behavior

In src/cleveragents/a2a/facade.py, the _handle_context_get method (line ~471) returns:

return {
    "context": {},
    "stub": True,
    "message": "ACMS ContextAssemblyPipeline not yet wired",
}

The _handle_context_stub method (used for inspect, simulate, set) also returns:

return {"context": {}, "stub": True}

This means ALL context-related A2A operations return empty stub responses, even though the ContextAssemblyPipeline is fully implemented in acms_pipeline.py.

Code Locations

  • Stub handler: src/cleveragents/a2a/facade.py lines ~471-476 (_handle_context_get)
  • Stub handler: src/cleveragents/a2a/facade.py lines ~480-481 (_handle_context_stub)
  • Implemented pipeline: src/cleveragents/application/services/acms_pipeline.py (ContextAssemblyPipeline)
  • Implemented service: src/cleveragents/application/services/acms_service.py (ACMSPipeline)

Impact

Every CLI command that uses context (agents project context show, agents project context inspect, agents project context simulate) returns empty data. The ACMS — a core M6 deliverable — is completely inaccessible through the A2A interface despite being implemented.

Steps to Reproduce

  1. Call _cleveragents/context/show via A2A
  2. Observe {"context": {}, "stub": True, "message": "ACMS ContextAssemblyPipeline not yet wired"} response

Subtasks

  • Inject ContextAssemblyPipeline (or ACMSPipeline service) into A2AFacade.__init__ via dependency injection
  • Replace _handle_context_get stub body with a call to ContextAssemblyPipeline.run(project_id, plan_id, params)
  • Replace _handle_context_stub body for inspect, simulate, and set operations with proper pipeline delegation
  • Add/update Behave unit tests in features/ covering the wired context handlers (mock pipeline, assert delegation)
  • Add/update Robot Framework integration test in robot/ verifying _cleveragents/context/show returns real context data
  • Ensure all type annotations are correct and nox -e typecheck passes
  • Verify nox -e coverage_report reports >= 97%

Definition of Done

  • _handle_context_get delegates to ContextAssemblyPipeline and returns assembled context
  • _handle_context_stub replaced for inspect, simulate, set with proper pipeline calls
  • No "stub": True keys present in any context A2A response
  • Behave unit tests cover the new wiring (mocked pipeline)
  • Robot Framework integration test passes end-to-end
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/v3.5.0/a2a-context-pipeline-wiring` - **Commit Message**: `fix(a2a): wire ContextAssemblyPipeline to A2A facade context handlers` - **Milestone**: v3.5.0 - **Parent Epic**: #369 ## Summary The A2A local facade handler for `_cleveragents/context/show` (and related context operations `_cleveragents/context/inspect`, `_cleveragents/context/simulate`, `_cleveragents/context/set`) returns hardcoded stub responses instead of delegating to the implemented `ContextAssemblyPipeline`. ## What Was Tested Code-level analysis of `src/cleveragents/a2a/facade.py` and `src/cleveragents/application/services/acms_pipeline.py`. ## Expected Behavior (from spec) Per `docs/specification.md` §25197 and the A2A architecture (ADR-047/ADR-048), the `_cleveragents/context/show` A2A operation should invoke the ACMS `ContextAssemblyPipeline` to assemble and return context for the requested project/plan. The pipeline (`ContextAssemblyPipeline` in `acms_pipeline.py`) is fully implemented with all 10 stages. ## Actual Behavior In `src/cleveragents/a2a/facade.py`, the `_handle_context_get` method (line ~471) returns: ```python return { "context": {}, "stub": True, "message": "ACMS ContextAssemblyPipeline not yet wired", } ``` The `_handle_context_stub` method (used for `inspect`, `simulate`, `set`) also returns: ```python return {"context": {}, "stub": True} ``` This means ALL context-related A2A operations return empty stub responses, even though the `ContextAssemblyPipeline` is fully implemented in `acms_pipeline.py`. ## Code Locations - Stub handler: `src/cleveragents/a2a/facade.py` lines ~471-476 (`_handle_context_get`) - Stub handler: `src/cleveragents/a2a/facade.py` lines ~480-481 (`_handle_context_stub`) - Implemented pipeline: `src/cleveragents/application/services/acms_pipeline.py` (`ContextAssemblyPipeline`) - Implemented service: `src/cleveragents/application/services/acms_service.py` (`ACMSPipeline`) ## Impact Every CLI command that uses context (`agents project context show`, `agents project context inspect`, `agents project context simulate`) returns empty data. The ACMS — a core M6 deliverable — is completely inaccessible through the A2A interface despite being implemented. ## Steps to Reproduce 1. Call `_cleveragents/context/show` via A2A 2. Observe `{"context": {}, "stub": True, "message": "ACMS ContextAssemblyPipeline not yet wired"}` response ## Subtasks - [ ] Inject `ContextAssemblyPipeline` (or `ACMSPipeline` service) into `A2AFacade.__init__` via dependency injection - [ ] Replace `_handle_context_get` stub body with a call to `ContextAssemblyPipeline.run(project_id, plan_id, params)` - [ ] Replace `_handle_context_stub` body for `inspect`, `simulate`, and `set` operations with proper pipeline delegation - [ ] Add/update Behave unit tests in `features/` covering the wired context handlers (mock pipeline, assert delegation) - [ ] Add/update Robot Framework integration test in `robot/` verifying `_cleveragents/context/show` returns real context data - [ ] Ensure all type annotations are correct and `nox -e typecheck` passes - [ ] Verify `nox -e coverage_report` reports >= 97% ## Definition of Done - [ ] `_handle_context_get` delegates to `ContextAssemblyPipeline` and returns assembled context - [ ] `_handle_context_stub` replaced for `inspect`, `simulate`, `set` with proper pipeline calls - [ ] No `"stub": True` keys present in any context A2A response - [ ] Behave unit tests cover the new wiring (mocked pipeline) - [ ] Robot Framework integration test passes end-to-end - [ ] 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 20:12:51 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Critical — A2A context handlers (_cleveragents/context/show, inspect, simulate, set) return hardcoded stubs instead of delegating to the implemented ContextAssemblyPipeline. This means the A2A facade's context operations are completely non-functional.
  • Milestone: v3.5.0 (already assigned)
  • Story Points: 3 — M — Wire existing pipeline to A2A handlers. The pipeline is implemented; this is an integration wiring issue.
  • MoSCoW: Must Have — The A2A context integration is essential for v3.5.0 (Corrections + Context). Without this, agents cannot access context through the A2A protocol, which is a core architectural requirement.
  • Parent Epic: #369 (dependency link already exists)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Critical — A2A context handlers (`_cleveragents/context/show`, `inspect`, `simulate`, `set`) return hardcoded stubs instead of delegating to the implemented `ContextAssemblyPipeline`. This means the A2A facade's context operations are completely non-functional. - **Milestone**: v3.5.0 (already assigned) - **Story Points**: 3 — M — Wire existing pipeline to A2A handlers. The pipeline is implemented; this is an integration wiring issue. - **MoSCoW**: Must Have — The A2A context integration is essential for v3.5.0 (Corrections + Context). Without this, agents cannot access context through the A2A protocol, which is a core architectural requirement. - **Parent Epic**: #369 (dependency link already exists) --- **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:30 +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.

Blocks
#369 Epic: Large Project Autonomy & Context
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3592
No description provided.