Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/application/test_automation_goal_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,13 @@ def inject_unreserved_turn(*args, **kwargs):
assert foreign.prompt == "A legacy client won the race"
assert foreign.id != execution.run.turn_id

# Submission can return before the Agent consumes its scripted step.
# Interrupt only after that step is claimed, so the Automation receives
# the second (completing) step rather than the foreign Turn's gate.
_wait_until(
lambda: factory.started_prompts == [foreign.prompt],
"foreign Agent to consume its scripted step",
)
accepted, interrupted = application.turns.interrupt(
automation.thread_id,
foreign.id,
Expand Down
Loading