UAT: A2A facade _cleveragents/plan/explain always returns "Not yet implemented" stub — no service delegation implemented #3147

Open
opened 2026-04-05 06:52:23 +00:00 by freemo · 4 comments
Owner

Metadata

  • Branch: fix/a2a-plan-explain-implementation
  • Commit Message: fix(a2a): implement plan/explain handler with DecisionService delegation
  • Milestone: (backlog — see note below)
  • Parent Epic: #933

Backlog note: This issue was discovered during autonomous operation
on milestone v3.5.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Bug Report

Feature Area: A2A Facade — Plan Lifecycle Operations (M6: Autonomy Hardening)

What was tested

The A2A local facade handler for _cleveragents/plan/explain operation.

Expected behavior (from spec)

Per docs/specification.md §Plan Lifecycle, _cleveragents/plan/explain should return an explanation of a specific decision node in the plan's decision tree, including the rationale, alternatives considered, and impact.

Actual behavior (from code analysis)

In src/cleveragents/a2a/facade.py, _handle_plan_explain (lines 518-526) unconditionally returns a stub:

def _handle_plan_explain(self, params: dict[str, Any]) -> dict[str, Any]:
    plan_id = params.get("plan_id", "")
    decision_id = params.get("decision_id", "")
    return {
        "plan_id": plan_id,
        "decision_id": decision_id,
        "explanation": "Not yet implemented",
        "stub": True,
    }

Unlike other handlers that at least check for the service and delegate when available, _handle_plan_explain has NO service delegation at all — it always returns a stub regardless of whether plan_lifecycle_service is wired.

The DecisionService has methods to retrieve decision data that could power this endpoint.

Code location

  • src/cleveragents/a2a/facade.py, lines 518-526 (_handle_plan_explain)

Steps to reproduce

  1. Wire a PlanLifecycleService into A2aLocalFacade
  2. Dispatch _cleveragents/plan/explain with a valid plan_id and decision_id
  3. Observe that the response always contains "explanation": "Not yet implemented" and "stub": True

Impact

  • Decision explanation is a core M6 Autonomy Hardening feature for understanding hierarchical plan decomposition
  • Any A2A client calling _cleveragents/plan/explain receives a fake "not implemented" response
  • This breaks the plan explanation workflow entirely

Subtasks

  • Wire _handle_plan_explain to DecisionService to fetch decision node data
  • Return structured explanation with rationale, alternatives, and impact
  • Add BDD tests for the handler
  • Remove "stub": True from the response
  • All nox stages pass
  • Coverage >= 97%

Definition of Done

  • _handle_plan_explain returns actual decision explanation data when the service is available
  • BDD tests cover the handler with a wired service
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/a2a-plan-explain-implementation` - **Commit Message**: `fix(a2a): implement plan/explain handler with DecisionService delegation` - **Milestone**: (backlog — see note below) - **Parent Epic**: #933 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.5.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Report **Feature Area**: A2A Facade — Plan Lifecycle Operations (M6: Autonomy Hardening) ### What was tested The A2A local facade handler for `_cleveragents/plan/explain` operation. ### Expected behavior (from spec) Per `docs/specification.md` §Plan Lifecycle, `_cleveragents/plan/explain` should return an explanation of a specific decision node in the plan's decision tree, including the rationale, alternatives considered, and impact. ### Actual behavior (from code analysis) In `src/cleveragents/a2a/facade.py`, `_handle_plan_explain` (lines 518-526) unconditionally returns a stub: ```python def _handle_plan_explain(self, params: dict[str, Any]) -> dict[str, Any]: plan_id = params.get("plan_id", "") decision_id = params.get("decision_id", "") return { "plan_id": plan_id, "decision_id": decision_id, "explanation": "Not yet implemented", "stub": True, } ``` Unlike other handlers that at least check for the service and delegate when available, `_handle_plan_explain` has NO service delegation at all — it always returns a stub regardless of whether `plan_lifecycle_service` is wired. The `DecisionService` has methods to retrieve decision data that could power this endpoint. ### Code location - `src/cleveragents/a2a/facade.py`, lines 518-526 (`_handle_plan_explain`) ### Steps to reproduce 1. Wire a `PlanLifecycleService` into `A2aLocalFacade` 2. Dispatch `_cleveragents/plan/explain` with a valid `plan_id` and `decision_id` 3. Observe that the response always contains `"explanation": "Not yet implemented"` and `"stub": True` ### Impact - Decision explanation is a core M6 Autonomy Hardening feature for understanding hierarchical plan decomposition - Any A2A client calling `_cleveragents/plan/explain` receives a fake "not implemented" response - This breaks the plan explanation workflow entirely ## Subtasks - [ ] Wire `_handle_plan_explain` to `DecisionService` to fetch decision node data - [ ] Return structured explanation with rationale, alternatives, and impact - [ ] Add BDD tests for the handler - [ ] Remove `"stub": True` from the response - [ ] All nox stages pass - [ ] Coverage >= 97% ## Definition of Done - [ ] `_handle_plan_explain` returns actual decision explanation data when the service is available - [ ] BDD tests cover the handler with a wired service - [ ] 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 06:57:52 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog — the plan/explain stub is a known gap but the functional rollback/correction workflows work without it
  • Milestone: v3.5.0 (M6: Autonomy Hardening) — plan/explain is an A2A facade operation that belongs in the autonomy hardening milestone
  • MoSCoW: Should Have — the spec defines _cleveragents/plan/explain as a plan lifecycle operation. It's important for the decision explanation workflow but not strictly blocking the milestone's core acceptance criteria (hierarchical decomposition, parallel execution, validation-gated apply).
  • Parent Epic: #933 (A2A Protocol Compliance)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog — the plan/explain stub is a known gap but the functional rollback/correction workflows work without it - **Milestone**: v3.5.0 (M6: Autonomy Hardening) — plan/explain is an A2A facade operation that belongs in the autonomy hardening milestone - **MoSCoW**: Should Have — the spec defines `_cleveragents/plan/explain` as a plan lifecycle operation. It's important for the decision explanation workflow but not strictly blocking the milestone's core acceptance criteria (hierarchical decomposition, parallel execution, validation-gated apply). - **Parent Epic**: #933 (A2A Protocol Compliance) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.5.0 milestone 2026-04-05 06:59:40 +00:00
freemo added this to the v3.5.0 milestone 2026-04-05 07:08:58 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog (elevated to Medium consideration)
  • Milestone: v3.5.0 (assigned — was previously unassigned; A2A facade plan operations are M6 Autonomy Hardening scope)
  • MoSCoW: Should Have — the A2A facade should delegate to real services when available; stub responses break the plan explanation workflow for A2A clients
  • Parent Epic: #933 (A2A Protocol Compliance)

Dependency link to parent Epic already existed.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog (elevated to Medium consideration) - **Milestone**: v3.5.0 (assigned — was previously unassigned; A2A facade plan operations are M6 Autonomy Hardening scope) - **MoSCoW**: Should Have — the A2A facade should delegate to real services when available; stub responses break the plan explanation workflow for A2A clients - **Parent Epic**: #933 (A2A Protocol Compliance) Dependency link to parent Epic already existed. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Milestone Triage Decision: Moved to Backlog

This stub implementation issue has been moved out of v3.5.0 during aggressive milestone triage. It represents a nice-to-have feature that does not block core autonomy hardening functionality.

Reasoning:

  • v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle)
  • This issue: Plan explanation feature - nice-to-have for debugging/UX
  • Impact: User experience enhancement, not functional capability

Will be addressed in a future milestone after core autonomy functionality is stable.

**Milestone Triage Decision: Moved to Backlog** This stub implementation issue has been moved out of v3.5.0 during aggressive milestone triage. It represents a nice-to-have feature that does not block core autonomy hardening functionality. **Reasoning:** - v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle) - This issue: Plan explanation feature - nice-to-have for debugging/UX - Impact: User experience enhancement, not functional capability Will be addressed in a future milestone after core autonomy functionality is stable.
freemo removed this from the v3.5.0 milestone 2026-04-06 22:39:57 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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#3147
No description provided.