even more code review
This commit is contained in:
@@ -154,10 +154,11 @@ def execute_node_use(
|
||||
f"no handler registered for node def {node.node!r}"
|
||||
)
|
||||
|
||||
frame = run.current_frame()
|
||||
resolved_input, context, state_view = _resolve_node_execution(
|
||||
workflow=workflow,
|
||||
run=run,
|
||||
frame=run.current_frame(),
|
||||
frame=frame,
|
||||
node=node,
|
||||
node_def=node_def,
|
||||
)
|
||||
@@ -165,7 +166,7 @@ def execute_node_use(
|
||||
return _finalize_node_execution(
|
||||
workflow=workflow,
|
||||
run=run,
|
||||
frame=run.current_frame(),
|
||||
frame=frame,
|
||||
node=node,
|
||||
node_def=node_def,
|
||||
resolved_input=resolved_input,
|
||||
@@ -189,10 +190,11 @@ async def execute_node_use_async(
|
||||
f"no handler registered for node def {node.node!r}"
|
||||
)
|
||||
|
||||
frame = run.current_frame()
|
||||
resolved_input, context, state_view = _resolve_node_execution(
|
||||
workflow=workflow,
|
||||
run=run,
|
||||
frame=run.current_frame(),
|
||||
frame=frame,
|
||||
node=node,
|
||||
node_def=node_def,
|
||||
)
|
||||
@@ -204,7 +206,7 @@ async def execute_node_use_async(
|
||||
return _finalize_node_execution(
|
||||
workflow=workflow,
|
||||
run=run,
|
||||
frame=run.current_frame(),
|
||||
frame=frame,
|
||||
node=node,
|
||||
node_def=node_def,
|
||||
resolved_input=resolved_input,
|
||||
|
||||
@@ -30,6 +30,8 @@ def state_view_for_frame(run: RunState, frame: ExecutionFrame) -> dict[str, Any]
|
||||
if pending is None:
|
||||
return run.state
|
||||
|
||||
# Correctness first: this full copy isolates sibling reads. If state grows
|
||||
# large, replace this with a lazy/copy-on-write overlay.
|
||||
state_view = deepcopy(run.state)
|
||||
for destination, value in pending.patch.changes.items():
|
||||
path = StatePath.parse(destination)
|
||||
|
||||
Reference in New Issue
Block a user