chore: update emphemeral local (#6091)

basically - for conditional edges, we use this to merge the updates from
state with the state object (before the actual update really occurs in
the tick.after)

otherwise - an emphemeral value will actually last through the logic in
the conditional edge of the node after
This commit is contained in:
Harrison Chase
2025-09-07 09:42:11 -04:00
committed by GitHub
parent 8f6ad0b25a
commit b543752878
+3 -6
View File
@@ -194,15 +194,12 @@ def local_read(
for c, v in task.writes:
if c in select:
updated[c].append(v)
if fresh and updated:
if fresh:
# apply writes
local_channels: dict[str, BaseChannel] = {}
for k in channels:
if k in updated:
cc = channels[k].copy()
cc.update(updated[k])
else:
cc = channels[k]
cc = channels[k].copy()
cc.update(updated[k])
local_channels[k] = cc
# read fresh values
values = read_channels(local_channels, select)