fix(a2a): wire _cleveragents/plan/execute handler to full PlanExecutor lifecycle #3353

Open
freemo wants to merge 2 commits from fix/a2a-plan-execute-full-lifecycle into master

2 Commits

Author SHA1 Message Date
controller-ci-rerun 72eadbb07f chore: re-trigger CI [controller]
CI / lint (pull_request) Successful in 35s
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 30s
CI / push-validation (pull_request) Successful in 33s
CI / typecheck (pull_request) Successful in 1m11s
CI / quality (pull_request) Successful in 1m21s
CI / security (pull_request) Failing after 1m22s
CI / integration_tests (pull_request) Failing after 18m27s
CI / unit_tests (pull_request) Failing after 18m31s
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
2026-06-18 10:58:12 -04:00
freemo 0c457e7aa6 fix(a2a): wire _cleveragents/plan/execute handler to full PlanExecutor lifecycle
CI / push-validation (pull_request) Successful in 21s
CI / build (pull_request) Failing after 11m41s
CI / integration_tests (pull_request) Failing after 11m43s
CI / unit_tests (pull_request) Failing after 11m44s
CI / quality (pull_request) Failing after 11m46s
CI / security (pull_request) Failing after 11m46s
CI / typecheck (pull_request) Failing after 11m46s
CI / lint (pull_request) Failing after 11m47s
CI / helm (pull_request) Failing after 11m3s
CI / status-check (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
The A2A plan execution flow has been refactored to integrate with the
PlanExecutor lifecycle while preserving backward compatibility.

- Refactored A2aLocalFacade._handle_plan_execute in
  src/cleveragents/a2a/facade.py to drive the full PlanExecutor lifecycle.
- Introduced plan_executor as an injectable service on A2aLocalFacade
  and added a _plan_executor property accessor.
- Implemented phase-conditional logic mirroring CLI agents plan execute:
  - Strategize/queued or Strategize/processing: run run_strategize(),
    then transition to Execute and run run_execute().
  - Strategize/complete: transition to Execute/queued then run_execute().
  - Execute/queued: run run_execute() directly.
- Added backward-compatible fallback: when no plan_executor is wired,
  the handler falls back to the legacy execute_plan() stub.
- Handler returns the plan's final phase and state after all phases.
- Added BDD scenarios in features/a2a_facade_wiring.feature covering
  all three entry states (Strategize/queued, Strategize/complete,
  Execute/queued) plus the legacy fallback path.
- Added step definitions in features/steps/a2a_facade_wiring_steps.py
  using real PlanPhase/ProcessingState StrEnum values.

ISSUES CLOSED: #2610
2026-05-30 14:57:55 -04:00