feat(domain): align plan model with spec

This commit is contained in:
2026-02-12 22:58:15 -05:00
parent 3adc9c1f47
commit 36b4ec2b8d
45 changed files with 5971 additions and 864 deletions
+5 -7
View File
@@ -34,7 +34,6 @@ from cleveragents.domain.models.core.action import (
ArgumentType,
)
from cleveragents.domain.models.core.plan import (
ActionState,
NamespacedName,
PlanIdentity,
PlanPhase,
@@ -141,7 +140,7 @@ def step_plan_should_be_in_state(context: Context) -> None:
# After fail_strategize, the plan is actually in ERRORED state.
# This step verifies that fail_strategize overwrites the COMPLETE state.
# The plan should actually be ERRORED now (fail overwrites complete).
assert context.plan.processing_state in (
assert context.plan.state in (
ProcessingState.COMPLETE,
ProcessingState.ERRORED,
)
@@ -747,8 +746,8 @@ def step_try_create_plan_empty_desc(context: Context) -> None:
identity=PlanIdentity(plan_id="01ARZ3NDEKTSV4RRFFQ69G5FAV"),
namespaced_name=NamespacedName(namespace="local", name="test"),
description="",
phase=PlanPhase.STRATEGIZE,
processing_state=ProcessingState.QUEUED,
action_name="local/test-action",
state=ProcessingState.QUEUED,
)
except (PydanticValidationError, ValueError) as exc:
context.pydantic_error = exc
@@ -767,9 +766,8 @@ def step_try_create_plan_action_with_processing(context: Context) -> None:
identity=PlanIdentity(plan_id="01ARZ3NDEKTSV4RRFFQ69G5FAV"),
namespaced_name=NamespacedName(namespace="local", name="test"),
description="Test plan",
phase=PlanPhase.ACTION,
action_state=ActionState.DRAFT,
processing_state=ProcessingState.QUEUED,
action_name="",
state=ProcessingState.QUEUED,
)
except (PydanticValidationError, ValueError) as exc:
context.pydantic_error = exc