Files
cleveragents-core/features
HAL9000 a71b22f043 fix(plans): address PR review blocking issues in correction engine
Resolves all blocking issues identified in the 2026-05-04 code review
(review #7409, reviewer: HAL9001):

1. TYPE SAFETY: Removed two `# type: ignore[arg-type]` annotations in
   `build_decision_tree()` in plan.py by using `cast()` to properly
   narrow the type of `node["children"]` from `object` to
   `list[dict[str, object]]`. No type suppressions remain in the
   new correction engine code.

2. FILE SIZE (correction_service.py): Split the 1,255-line module into:
   - `correction_impact_service.py` (498 lines): BFS traversal,
     risk classification, rollback tier computation, dry-run reports,
     and subtree isolation validation.
   - `correction_service.py` (490 lines): Orchestration facade
     delegating impact analysis to CorrectionImpactService. Backward-
     compatible static shims ensure existing tests continue to work.

3. FILE SIZE (plan.py): Extracted the `correct` and `rollback` CLI
   command handlers (509 lines) to `plan_correction_cli.py`. They are
   imported and registered on the `app` Typer instance in plan.py.

4. EMPTY STEP FILE: Removed `consolidated_correction_steps.py` (was
   0 bytes, unreferenced by any feature file).

ISSUES CLOSED: #9562
2026-06-03 09:35:15 -04:00
..