diff --git a/features/plan_status_json_envelope.feature b/features/plan_status_json_envelope.feature index a143498d2..628019f5f 100644 --- a/features/plan_status_json_envelope.feature +++ b/features/plan_status_json_envelope.feature @@ -147,7 +147,6 @@ Feature: Plan status JSON envelope compliance Scenario: ACTION phase progress shows queued for Strategize and Execute steps Given a plan status JSON envelope plan exists in action phase When I run plan status with format json - And a plan status JSON envelope mocked lifecycle service Then the plan status JSON data progress step "Strategize" should be "queued" And the plan status JSON data progress step "Execute" should be "queued" diff --git a/features/steps/plan_status_json_envelope_steps.py b/features/steps/plan_status_json_envelope_steps.py index 6f69d95bc..11d6fdf57 100644 --- a/features/steps/plan_status_json_envelope_steps.py +++ b/features/steps/plan_status_json_envelope_steps.py @@ -313,10 +313,10 @@ def step_status_envelope_no_child_plans(context: Context) -> None: @given("a plan status JSON envelope plan exists in action phase") def step_status_envelope_action_phase(context: Context) -> None: - """Set up a plan in the ACTION/SUBMIT (non-strategize/execute/apply) phase.""" + """Set up a plan in the ACTION (non-strategize/execute/apply) phase.""" context.mock_plan = _make_status_plan( action_name="local/code-coverage", - phase=PlanPhase.SUBMIT, + phase=PlanPhase.ACTION, state=ProcessingState.QUEUED, project_links=[ProjectLink(project_name="local/api-service")], automation_profile=AutomationProfileRef( diff --git a/src/cleveragents/domain/models/core/plan.py b/src/cleveragents/domain/models/core/plan.py index bcda823a0..aca8032d9 100644 --- a/src/cleveragents/domain/models/core/plan.py +++ b/src/cleveragents/domain/models/core/plan.py @@ -809,6 +809,17 @@ class Plan(BaseModel): description="Status tracking for spawned subplans", ) + # Child plan IDs — flattened lists derived from subplan statuses for + # convenience access in status rendering and cross-plan-correction logic. + child_plan_ids: list[str] = Field( + default_factory=list, + description="Plan IDs of all spawned child plans", + ) + completed_child_plan_ids: list[str] = Field( + default_factory=list, + description="Plan IDs of child plans that have completed execution", + ) + # Resume metadata (step-level progress for plan resume) last_completed_step: int = Field( default=-1,