interrupt goes first
This commit is contained in:
@@ -74,6 +74,7 @@ def advance_frame(
|
||||
*,
|
||||
outcome: str,
|
||||
next_node_id: str,
|
||||
front: bool = False,
|
||||
) -> None:
|
||||
frame.prior_outcome = outcome
|
||||
frame.activated_incoming_edge = frame.node_id
|
||||
@@ -84,7 +85,7 @@ def advance_frame(
|
||||
wake_parent_for_child_progress(run, frame.id)
|
||||
else:
|
||||
frame.finished_at_node_id = None
|
||||
mark_frame_pending(run, frame.id)
|
||||
mark_frame_pending(run, frame.id, front=front)
|
||||
run.sync_from_current_frame()
|
||||
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ def complete_step(
|
||||
) -> RunState:
|
||||
"""Record a completed step and advance the active frame."""
|
||||
next_node_id = index.next_node_id(node_id, outcome)
|
||||
next_step = index.nodes_by_id.get(next_node_id)
|
||||
|
||||
append_step_result_trace(
|
||||
run,
|
||||
@@ -67,6 +68,7 @@ def complete_step(
|
||||
run.frames[frame_id],
|
||||
outcome=outcome,
|
||||
next_node_id=next_node_id,
|
||||
front=isinstance(next_step, InterruptNode),
|
||||
)
|
||||
return run
|
||||
|
||||
|
||||
Reference in New Issue
Block a user