diff --git a/features/steps/cli_lifecycle_robot_alignment_steps.py b/features/steps/cli_lifecycle_robot_alignment_steps.py index 3566beea5..d5f1f6ae5 100644 --- a/features/steps/cli_lifecycle_robot_alignment_steps.py +++ b/features/steps/cli_lifecycle_robot_alignment_steps.py @@ -28,7 +28,6 @@ from cleveragents.domain.models.core.change import ( InMemoryChangeSetStore, ) from cleveragents.domain.models.core.plan import ( - AutomationLevel, AutomationProfileProvenance, AutomationProfileRef, NamespacedName, @@ -83,7 +82,6 @@ def _mock_plan( action_name="local/lifecycle-action", phase=phase, processing_state=state, - automation_level=AutomationLevel.MANUAL, project_links=[ProjectLink(project_name="proj-a")], arguments={"target_coverage": 80}, arguments_order=["target_coverage"], diff --git a/features/steps/persistence_robot_alignment_steps.py b/features/steps/persistence_robot_alignment_steps.py index ea974c1b3..68e65c3d0 100644 --- a/features/steps/persistence_robot_alignment_steps.py +++ b/features/steps/persistence_robot_alignment_steps.py @@ -19,7 +19,6 @@ from sqlalchemy.orm import Session from cleveragents.domain.models.core.action import Action, ActionState from cleveragents.domain.models.core.plan import ( - AutomationLevel, NamespacedName, Plan, PlanIdentity, @@ -78,12 +77,9 @@ def step_create_action(context: Context, name: str) -> None: @given( - 'a persistence alignment plan "{plan_id}" in phase "{phase}" ' - 'with state "{state}"' + 'a persistence alignment plan "{plan_id}" in phase "{phase}" with state "{state}"' ) -def step_create_plan( - context: Context, plan_id: str, phase: str, state: str -) -> None: +def step_create_plan(context: Context, plan_id: str, phase: str, state: str) -> None: session: Session = context._pra_session factory = lambda: session # noqa: E731 now: datetime = datetime(2026, 3, 1, tzinfo=UTC) @@ -95,7 +91,6 @@ def step_create_plan( definition_of_done="Alignment pass", phase=_phase_from_str(phase), processing_state=_state_from_str(state), - automation_level=AutomationLevel.MANUAL, strategy_actor="local/strat", execution_actor="local/exec", project_links=[ProjectLink(project_name="local/proj-aligned")], @@ -139,27 +134,21 @@ def step_check_phase(context: Context, phase: str) -> None: ) -@then( - 'the persistence alignment plan processing state should be "{state}"' -) +@then('the persistence alignment plan processing state should be "{state}"') def step_check_state(context: Context, state: str) -> None: assert context._pra_plan.processing_state == _state_from_str(state), ( f"Expected state {state}, got {context._pra_plan.processing_state}" ) -@then( - 'the persistence alignment plan description should be "{desc}"' -) +@then('the persistence alignment plan description should be "{desc}"') def step_check_desc(context: Context, desc: str) -> None: assert context._pra_plan.description == desc, ( f"Expected '{desc}', got '{context._pra_plan.description}'" ) -@then( - "the persistence alignment plan should have {count:d} project link" -) +@then("the persistence alignment plan should have {count:d} project link") def step_check_links(context: Context, count: int) -> None: actual: int = len(context._pra_plan.project_links) assert actual == count, f"Expected {count} links, got {actual}" diff --git a/features/steps/subplan_model_steps.py b/features/steps/subplan_model_steps.py index ae2b784d9..c833218b6 100644 --- a/features/steps/subplan_model_steps.py +++ b/features/steps/subplan_model_steps.py @@ -7,7 +7,6 @@ from behave.runner import Context from pydantic import ValidationError from cleveragents.domain.models.core.plan import ( - AutomationLevel, ExecutionMode, NamespacedName, Plan, @@ -35,7 +34,6 @@ def _plan( att: int = 1, ph: PlanPhase = PlanPhase.STRATEGIZE, ps: ProcessingState = ProcessingState.QUEUED, - al: AutomationLevel = AutomationLevel.MANUAL, sc: SubplanConfig | None = None, ss: list[SubplanStatus] | None = None, ) -> Plan: @@ -56,7 +54,6 @@ def _plan( action_name="local/subplan-action", phase=ph, processing_state=ps, - automation_level=al, subplan_config=sc, subplan_statuses=ss or [], ) @@ -294,10 +291,10 @@ def step_t10(ctx: Context) -> None: assert not ctx.subplan_plan.is_errored -@then('the subplan-test plan automation level should be "{e}"') -def step_t11(ctx: Context, e: str) -> None: - """Automation level check.""" - assert ctx.subplan_plan.automation_level.value == e +@then("the subplan-test plan automation profile should be none") +def step_t11(ctx: Context) -> None: + """Automation profile defaults to None.""" + assert ctx.subplan_plan.automation_profile is None @then("the subplan-test plan subplan_config should be none") diff --git a/features/subplan_model.feature b/features/subplan_model.feature index 226ee1111..57922d0ef 100644 --- a/features/subplan_model.feature +++ b/features/subplan_model.feature @@ -37,9 +37,9 @@ Feature: Subplan Model Hierarchy and Configuration And the subplan-test plan should not be terminal And the subplan-test plan should not be errored - Scenario: New plan defaults to manual automation level + Scenario: New plan defaults to no automation profile Given I create a subplan-test default plan - Then the subplan-test plan automation level should be "manual" + Then the subplan-test plan automation profile should be none Scenario: New plan has no subplan config by default Given I create a subplan-test default plan diff --git a/robot/helper_cli_lifecycle.py b/robot/helper_cli_lifecycle.py index 8f9f13a32..9cc72aed7 100644 --- a/robot/helper_cli_lifecycle.py +++ b/robot/helper_cli_lifecycle.py @@ -32,7 +32,6 @@ from cleveragents.domain.models.core.change import ( # noqa: E402 SpecChangeSet, ) from cleveragents.domain.models.core.plan import ( # noqa: E402 - AutomationLevel, AutomationProfileProvenance, AutomationProfileRef, NamespacedName, @@ -89,7 +88,6 @@ def _mock_plan( action_name="local/lifecycle-action", phase=phase, processing_state=state, - automation_level=AutomationLevel.MANUAL, project_links=[ProjectLink(project_name="proj-a")], arguments={"target_coverage": 80}, arguments_order=["target_coverage"], diff --git a/robot/helper_persistence_lifecycle.py b/robot/helper_persistence_lifecycle.py index c746a5b30..792d8ef3a 100644 --- a/robot/helper_persistence_lifecycle.py +++ b/robot/helper_persistence_lifecycle.py @@ -39,7 +39,6 @@ from cleveragents.domain.models.core.action import ( # noqa: E402 ArgumentType, ) from cleveragents.domain.models.core.plan import ( # noqa: E402 - AutomationLevel, NamespacedName, Plan, PlanIdentity, @@ -107,7 +106,6 @@ def _make_plan( definition_of_done="E2E assertions pass", phase=phase, processing_state=state, - automation_level=AutomationLevel.MANUAL, strategy_actor="local/strat", execution_actor="local/exec", project_links=project_links or [ProjectLink(project_name="local/proj-lc")], @@ -265,7 +263,6 @@ def _reopen_plan_status() -> None: assert got is not None, "plan missing after reopen" assert got.phase == PlanPhase.STRATEGIZE, f"bad phase: {got.phase}" assert got.processing_state == ProcessingState.PROCESSING - assert got.automation_level == AutomationLevel.MANUAL assert got.tags == ["lifecycle"] session2.close()