Commit Graph

2 Commits

Author SHA1 Message Date
HAL9000 419775b0d1 fix(plan-lifecycle): correct DoD gating test assertions
The test scenario 'validation_summary is populated after DoD evaluation'
was expecting 'total' and 'required_passed' keys which are not added by
the DoD evaluation. These keys are only present when the plan goes through
the Execute phase validation gate. The DoD evaluation only adds
'dod_evaluated', 'dod_all_passed', and 'dod' keys.

Updated the test to check for the 'dod' key instead, which correctly
reflects the structure of the validation_summary after DoD evaluation.

ISSUES CLOSED: #7927
2026-06-02 05:14:43 -04:00
HAL9000 0dcf7bf152 fix(plan-lifecycle): gate Apply phase on Definition-of-Done evaluation
Before transitioning to the Apply phase, PlanLifecycleService.apply_plan
now evaluates the plan's definition_of_done criteria using DoDEvaluator
(TextMatchEvaluator). If any required criteria fail, a DoDGatingError is
raised and the plan remains in Execute/COMPLETE state. The evaluation
result is stored in plan.validation_summary with dod_evaluated=True and
dod_all_passed reflecting the outcome. Plans with no DoD text skip
evaluation and proceed normally.

Adds DoDGatingError exception class and _evaluate_dod() helper method.
Adds BDD feature file and step definitions for DoD gating scenarios.

ISSUES CLOSED: #7927
2026-06-02 05:14:43 -04:00