Chore: Fixed bad formatting
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 29s
CI / typecheck (pull_request) Successful in 36s
CI / integration_tests (pull_request) Successful in 2m34s
CI / unit_tests (pull_request) Successful in 4m41s
CI / docker (pull_request) Successful in 38s
CI / benchmark-regression (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled

This commit is contained in:
2026-02-21 10:17:34 -05:00
parent 2980b14e7b
commit 34a9672e7f
2 changed files with 11 additions and 14 deletions
@@ -64,9 +64,7 @@ def step_create_executor_with_sandbox(context: Context) -> None:
context.stream_events = []
def _create_plan_in_strategize(
context: Context, definition: str
) -> str:
def _create_plan_in_strategize(context: Context, definition: str) -> str:
"""Helper to create a plan in strategize/queued state."""
action = context.lifecycle_service.create_action(
name="local/test-executor-action",
@@ -91,7 +89,6 @@ def step_plan_strategize_queued(context: Context, definition: str) -> None:
_create_plan_in_strategize(context, definition)
@given("I have a plan in strategize queued state with empty definition")
def step_plan_strategize_empty_definition(context: Context) -> None:
"""Create a plan in strategize/queued state with empty definition.
@@ -105,6 +102,7 @@ def step_plan_strategize_empty_definition(context: Context) -> None:
plan.definition_of_done = None
context.lifecycle_service._commit_plan(plan)
@given("I have a plan with invariants in strategize queued state")
def step_plan_with_invariants(context: Context) -> None:
"""Create a plan with invariants in strategize/queued state."""
@@ -167,6 +165,7 @@ def step_plan_execute_no_decisions(context: Context) -> None:
@given("the strategize actor is configured to fail")
def step_strategize_actor_fails(context: Context) -> None:
"""Configure the strategize actor to raise an error."""
def _failing_execute(*args: Any, **kwargs: Any) -> Any:
raise RuntimeError("Strategize actor deliberate failure")
@@ -176,6 +175,7 @@ def step_strategize_actor_fails(context: Context) -> None:
@given("the execute actor is configured to fail")
def step_execute_actor_fails(context: Context) -> None:
"""Configure the execute actor to raise an error."""
def _failing_execute(*args: Any, **kwargs: Any) -> Any:
raise RuntimeError("Execute actor deliberate failure")
@@ -480,9 +480,10 @@ def step_check_plan_error_phase(context: Context) -> None:
def step_check_plan_error_decisions(context: Context) -> None:
"""Verify a PlanError was raised about missing decisions."""
assert context.error is not None, "Expected a PlanError but none was raised"
assert "decision" in str(context.error).lower() or "strategize" in str(
context.error
).lower(), f"Error should mention decisions: {context.error}"
assert (
"decision" in str(context.error).lower()
or "strategize" in str(context.error).lower()
), f"Error should mention decisions: {context.error}"
@then("the plan should be in errored state")
@@ -61,9 +61,7 @@ class StrategyDecision(BaseModel):
decision_id: str = Field(..., description="ULID for this decision node")
step_text: str = Field(..., description="The step description text")
sequence: int = Field(..., ge=0, description="Order in the decision tree")
parent_id: str | None = Field(
default=None, description="Parent decision node ULID"
)
parent_id: str | None = Field(default=None, description="Parent decision node ULID")
model_config = ConfigDict(
str_strip_whitespace=True,
@@ -481,15 +479,13 @@ class PlanExecutor:
# Guard: must be in Execute phase
if plan.phase != PlanPhase.EXECUTE:
raise PlanError(
f"Plan {plan_id} is not in Execute phase "
f"(current: {plan.phase.value})"
f"Plan {plan_id} is not in Execute phase (current: {plan.phase.value})"
)
# Guard: must be in QUEUED state
if plan.state != ProcessingState.QUEUED:
raise PlanError(
f"Plan {plan_id} is not queued for execution "
f"(current: {plan.state})"
f"Plan {plan_id} is not queued for execution (current: {plan.state})"
)
# Extract decisions from plan metadata (decision_root_id must exist)