Files
freemo 6281924674 ```
fix(a2a): wire plan/correct and plan/rollback handlers to PlanLifecycleService

Implemented wiring for the A2A facade to properly delegate to PlanLifecycleService when available, with safe fallbacks when not wired.

What was implemented
- _handle_plan_correct in src/cleveragents/a2a/facade.py now delegates to PlanLifecycleService.revert_plan(plan_id, PlanPhase.STRATEGIZE, reason=...) when the PlanLifecycleService is wired. If the service is None or the plan_id is empty, it falls back to the existing stub behavior.
- _handle_plan_rollback in src/cleveragents/a2a/facade.py implemented with the same wiring pattern as _handle_plan_correct.
- Added PlanPhase import (from cleveragents.domain.models.core.plan) to facade.py to support PlanPhase.STRATEGIZE.
- Added 8 BDD scenarios in features/a2a_plan_correct_rollback_wiring.feature covering wired and unwired paths for both handlers.
- Added step definitions in features/steps/a2a_plan_correct_rollback_wiring_steps.py to support the new scenarios.

Key design decisions
- Both handlers now use revert_plan(plan_id, PlanPhase.STRATEGIZE) to revert the plan to the strategize phase, aligning with the CLI plan revert command.
- The wiring follows the exact same pattern as _handle_plan_cancel: check if the service is None or plan_id is empty, delegate to PlanLifecycleService, and return the result without the stub key when wired.
- stub: True is only present in responses when the service is None or plan_id is empty to preserve existing behavior in unwired scenarios.

Modules/components affected
- src/cleveragents/a2a/facade.py (wiring logic and import)
- tests additions:
- features/a2a_plan_correct_rollback_wiring.feature
- features/steps/a2a_plan_correct_rollback_wiring_steps.py

Impact
- With a wired PlanLifecycleService, fix ensures correct and rollback handlers perform real plan reversions, consistent with CLI semantics.
- When the service is unavailable or plan_id is missing, existing stub behavior remains in effect, avoiding regressions.

ISSUES CLOSED: #3117
```
2026-04-05 10:15:51 +00:00
..
```
2026-04-05 10:15:51 +00:00
```
2026-04-05 10:15:51 +00:00
2026-02-23 03:11:12 +00:00