- actor.py, actor_run.py: extend except to catch typer.Exit alongside
click.exceptions.Exit so unknown actor name exits are not swallowed by
the generic Exception handler, causing wrong exit codes in integration tests
- db_repositories_cov_r3_steps.py: initialize context.drcov3_error = None
before the try block so the @then assertion does not raise AttributeError
on the successful-prune path
- plan_correct_revert_append_modes_steps.py: fix import path from
src.cleveragents to cleveragents (package installs without the src. prefix)
Consolidate the four extended @when variants (with guidance, without
--yes, with --yes, with --dry-run) into a single @when step that reads
option flags from context variables set by @given steps. Behave's
registration-time conflict detection uses re.search without end anchors,
so the base mode "{mode}" pattern falsely matched all four longer
variants as prefixes.
Also:
- Add decision ID validation to the @when step so the "decision not
found" scenario actually raises an error instead of silently passing
- Rename "affected decisions" @then step to avoid pattern collision with
the identical step already defined in correction_flows_steps.py
- Fix ruff format violations (wrapped long decorator and assertion lines)
ISSUES CLOSED: #9286
Add BDD feature file and step definitions for plan correction functionality.
Implements support for both revert mode (prunes decision tree and re-executes LLM)
and append mode (adds guidance without re-executing).
Features:
- Revert mode with confirmation prompt and --yes flag support
- Append mode with guidance text support
- Dry-run mode for impact analysis
- Plan and decision ID validation
- Non-correctable plan state rejection
- Decision tree persistence to database
ISSUES CLOSED: #9286