UAT: A2A facade context operations (context/show, context/inspect, context/simulate, context/set) return stub responses instead of real ACMS data #3495

Open
opened 2026-04-05 18:39:23 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/m5-a2a-facade-context-wiring
  • Commit Message: fix(a2a): wire context facade operations to ACMS pipeline and project context services
  • Milestone: v3.4.0
  • Parent Epic: #396

Background

The A2A facade (src/cleveragents/a2a/facade.py) registers four context-related operations but all return stub/placeholder responses instead of delegating to the real ACMS services. This means any agent or external system using the A2A protocol to query or configure ACMS context receives no useful data, blocking milestone acceptance.

The CLI commands (agents project context show/inspect/simulate/set) are implemented in src/cleveragents/cli/commands/project_context.py and call the real services. The A2A facade simply needs to be wired to the same underlying services.

Affected Operations

Operation Current (stub) response Expected behaviour
_cleveragents/context/show {"context": {}, "stub": True, "message": "ACMS ContextAssemblyPipeline not yet wired"} Call project context policy service; return active context policy
_cleveragents/context/inspect {"context": {}, "stub": True} Call ACMS tier service; return tier metrics, fragment counts, UKO graph state
_cleveragents/context/simulate {"context": {}, "stub": True} Run dry-run via ContextAssemblyPipeline; return assembled fragments
_cleveragents/context/set {"context": {}, "stub": True} Persist context policy update via project context service

Code location: src/cleveragents/a2a/facade.py lines 471–476 and the _handle_context_stub method.

Steps to Reproduce

  1. Send an A2A request with method _cleveragents/context/show and any params.
  2. Observe the response contains "stub": True and no actual context data.

Subtasks

  • Write failing Behave scenarios for each of the four A2A context operations (context/show, context/inspect, context/simulate, context/set) that assert real ACMS data is returned
  • Inject ContextTierService, ProjectContextPolicy repository, and ContextAssemblyPipeline into the A2A facade
  • Implement _handle_context_show — delegate to project context policy service and return the active context policy
  • Implement _handle_context_inspect — delegate to ContextTierService and return tier metrics, fragment counts, and UKO graph state
  • Implement _handle_context_simulate — invoke ContextAssemblyPipeline in dry-run mode and return assembled fragments
  • Implement _handle_context_set — persist context policy update via project context service
  • Remove _handle_context_stub method and all stub response paths
  • Add/update Robot Framework integration tests exercising all four operations end-to-end via A2A
  • Ensure nox -e typecheck passes (no # type: ignore suppressions)
  • Ensure nox -e coverage_report reports >= 97%

Definition of Done

  • All four Behave scenarios pass against the real ACMS services (no stubs)
  • Robot Framework integration tests for all four A2A context operations pass against real services
  • _handle_context_stub method is deleted; no "stub": True keys remain in context handler responses
  • nox -e typecheck passes without errors
  • All nox stages pass
  • Coverage >= 97%
  • PR merged and this issue closed

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

## Metadata - **Branch**: `fix/m5-a2a-facade-context-wiring` - **Commit Message**: `fix(a2a): wire context facade operations to ACMS pipeline and project context services` - **Milestone**: v3.4.0 - **Parent Epic**: #396 ## Background The A2A facade (`src/cleveragents/a2a/facade.py`) registers four context-related operations but all return stub/placeholder responses instead of delegating to the real ACMS services. This means any agent or external system using the A2A protocol to query or configure ACMS context receives no useful data, blocking milestone acceptance. The CLI commands (`agents project context show/inspect/simulate/set`) **are** implemented in `src/cleveragents/cli/commands/project_context.py` and call the real services. The A2A facade simply needs to be wired to the same underlying services. ## Affected Operations | Operation | Current (stub) response | Expected behaviour | |---|---|---| | `_cleveragents/context/show` | `{"context": {}, "stub": True, "message": "ACMS ContextAssemblyPipeline not yet wired"}` | Call project context policy service; return active context policy | | `_cleveragents/context/inspect` | `{"context": {}, "stub": True}` | Call ACMS tier service; return tier metrics, fragment counts, UKO graph state | | `_cleveragents/context/simulate` | `{"context": {}, "stub": True}` | Run dry-run via `ContextAssemblyPipeline`; return assembled fragments | | `_cleveragents/context/set` | `{"context": {}, "stub": True}` | Persist context policy update via project context service | **Code location:** `src/cleveragents/a2a/facade.py` lines 471–476 and the `_handle_context_stub` method. ## Steps to Reproduce 1. Send an A2A request with method `_cleveragents/context/show` and any params. 2. Observe the response contains `"stub": True` and no actual context data. ## Subtasks - [ ] Write failing Behave scenarios for each of the four A2A context operations (`context/show`, `context/inspect`, `context/simulate`, `context/set`) that assert real ACMS data is returned - [ ] Inject `ContextTierService`, `ProjectContextPolicy` repository, and `ContextAssemblyPipeline` into the A2A facade - [ ] Implement `_handle_context_show` — delegate to project context policy service and return the active context policy - [ ] Implement `_handle_context_inspect` — delegate to `ContextTierService` and return tier metrics, fragment counts, and UKO graph state - [ ] Implement `_handle_context_simulate` — invoke `ContextAssemblyPipeline` in dry-run mode and return assembled fragments - [ ] Implement `_handle_context_set` — persist context policy update via project context service - [ ] Remove `_handle_context_stub` method and all stub response paths - [ ] Add/update Robot Framework integration tests exercising all four operations end-to-end via A2A - [ ] Ensure `nox -e typecheck` passes (no `# type: ignore` suppressions) - [ ] Ensure `nox -e coverage_report` reports >= 97% ## Definition of Done - [ ] All four Behave scenarios pass against the real ACMS services (no stubs) - [ ] Robot Framework integration tests for all four A2A context operations pass against real services - [ ] `_handle_context_stub` method is deleted; no `"stub": True` keys remain in context handler responses - [ ] `nox -e typecheck` passes without errors - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] PR merged and this issue closed --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.4.0 milestone 2026-04-05 18:39:27 +00:00
Author
Owner

Issue verified and triaged:

  • Priority: Critical — all four A2A facade context operations return stub responses, blocking any agent or external system from querying ACMS context via A2A.
  • Milestone: v3.4.0 (already assigned)
  • Story Points: 5 (L) — requires wiring 4 facade operations to real ACMS services and removing all stub paths.
  • Parent Epic: #396 (already linked)
  • Next step: This issue is now ready for implementation.

Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: ca-human-liaison

Issue verified and triaged: - **Priority**: Critical — all four A2A facade context operations return stub responses, blocking any agent or external system from querying ACMS context via A2A. - **Milestone**: v3.4.0 (already assigned) - **Story Points**: 5 (L) — requires wiring 4 facade operations to real ACMS services and removing all stub paths. - **Parent Epic**: #396 (already linked) - **Next step**: This issue is now ready for implementation. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: ca-human-liaison
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
#396 Epic: ACMS Context Pipeline
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3495
No description provided.