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
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