fix(tests): remove AutomationLevel references after legacy field removal
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 19s
CI / lint (pull_request) Failing after 22s
CI / build (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 55s
CI / coverage (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / security (pull_request) Successful in 1m7s
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 19s
CI / lint (pull_request) Failing after 22s
CI / build (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 55s
CI / coverage (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / security (pull_request) Successful in 1m7s
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
Master's refactor(automation) commit removed the AutomationLevel enum and automation_level field from Plan. Update all behave steps, robot helpers, and feature scenarios that referenced the removed type: - cli_lifecycle_robot_alignment_steps.py: drop import and field assignment - persistence_robot_alignment_steps.py: drop import and field assignment - subplan_model_steps.py: drop import, parameter, and field assignment - subplan_model.feature: replace automation level scenario with profile check - helper_cli_lifecycle.py: drop import and field assignment - helper_persistence_lifecycle.py: drop import, field assignment, and assertion
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user