diff --git a/tests/integration/test_milestone_live.py b/tests/integration/test_milestone_live.py index a10e63c..18337b1 100644 --- a/tests/integration/test_milestone_live.py +++ b/tests/integration/test_milestone_live.py @@ -16,6 +16,7 @@ from nisse_dev.control import ( AWAIT_INPUT, AWAIT_MILESTONE_SIGNOFF, EXECUTING, + PR_OPEN, Orchestrator, ) from nisse_dev.executor import LLMExecutor @@ -45,7 +46,9 @@ def _drive_to_execution( if state.state == AWAIT_INPUT: transport.receive("don", "Use your best judgement and proceed.") elif state.state == AWAIT_MILESTONE_SIGNOFF and gate.get("approved"): + # The milestone runs to completion inside this command. transport.receive("don", "start milestone 1") + return elif state.state in (AWAIT_ARCH_SIGNOFF, AWAIT_MILESTONE_SIGNOFF): transport.receive("don", "approve") else: @@ -85,7 +88,9 @@ def test_plan_approve_execute_produces_a_real_file( state = store.get_state() assert state is not None - assert state.state in (EXECUTING, AWAIT_INPUT) + # Never EXECUTING at rest: with no publisher a finished milestone waits in + # PR_OPEN, and one that stopped short waits for the operator. + assert state.state in (PR_OPEN, AWAIT_INPUT) created = list(workspace.root.rglob("*.py")) assert created, f"executor created no Python file; said: {transport.outbound[-1]}"