even more code review

This commit is contained in:
lda
2026-05-22 22:10:44 +07:00 Verified
parent 6c1c8abc52
commit 9fe9c1452b
8 changed files with 51 additions and 53 deletions
+6 -4
View File
@@ -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,
+2
View File
@@ -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)