Add Behave and Robot Framework tests capturing bug #969: the plan correct
CLI command treats its first positional argument strictly as a decision_id,
but the M3 acceptance test passes a plan_id. When a plan_id is given as the
first positional argument, the command should auto-resolve to the root
decision of that plan. Currently it uses the plan_id as target_decision_id,
which fails because the plan ID is not a valid decision ID.
The test asserts that request_correction is called with the root decision ID
as target_decision_id (not the plan_id). This assertion currently fails,
confirming the bug exists. The @tdd_expected_fail tag inverts the failure so
CI passes while the bug is unfixed.
Both revert and append correction modes are tested, since the bug affects
target_decision_id resolution before the mode-specific branching.
Shared mock fixtures (constants, mock builders, CLI args helper) are
centralised in features/mocks/tdd_plan_correct_plan_id_fixtures.py to
eliminate duplication between the Behave steps and Robot helper.
Files added:
- features/tdd_plan_correct_plan_id.feature (Behave scenarios: revert + append)
- features/steps/tdd_plan_correct_plan_id_steps.py (step definitions)
- features/mocks/tdd_plan_correct_plan_id_fixtures.py (shared fixtures)
- robot/tdd_plan_correct_plan_id.robot (Robot integration tests: revert + append)
- robot/helper_tdd_plan_correct_plan_id.py (Robot test helper)
Files modified:
- CHANGELOG.md (added entry for #979)
ISSUES CLOSED: #979