mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-06 17:57:49 +02:00
fix: preserve updated_channels shape in update_state delta path
The supersteps-based delta history walk requires update_state to write counters_since_delta_snapshot metadata, but passing updated_channels to create_checkpoint also overrode checkpoint["updated_channels"] (was None), breaking deferred-node triggering on resume for non-delta graphs (test_in_one_fan_out_state_graph_defer_node). Keep updated_channels at its default so resume/trigger semantics are unchanged; still write the counter metadata and snapshot delta channels that hit their cadence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
728fb748be
commit
8e77945f40
@@ -2045,11 +2045,14 @@ class Pregel(
|
||||
saved.metadata if saved else None,
|
||||
updated_channel_names,
|
||||
)
|
||||
# Keep `updated_channels` at its default (None) — matching the
|
||||
# historical checkpoint shape here — so resume/trigger semantics
|
||||
# (e.g. deferred nodes) are unaffected. `get_next_version` /
|
||||
# `channels_to_snapshot` are no-ops unless a delta channel snapshots.
|
||||
checkpoint = create_checkpoint(
|
||||
checkpoint,
|
||||
channels,
|
||||
step + 1,
|
||||
updated_channels=updated_channel_names,
|
||||
get_next_version=checkpointer.get_next_version,
|
||||
channels_to_snapshot=channels_to_snapshot,
|
||||
)
|
||||
@@ -2535,11 +2538,14 @@ class Pregel(
|
||||
saved.metadata if saved else None,
|
||||
updated_channel_names,
|
||||
)
|
||||
# Keep `updated_channels` at its default (None) — matching the
|
||||
# historical checkpoint shape here — so resume/trigger semantics
|
||||
# (e.g. deferred nodes) are unaffected. `get_next_version` /
|
||||
# `channels_to_snapshot` are no-ops unless a delta channel snapshots.
|
||||
checkpoint = create_checkpoint(
|
||||
checkpoint,
|
||||
channels,
|
||||
step + 1,
|
||||
updated_channels=updated_channel_names,
|
||||
get_next_version=checkpointer.get_next_version,
|
||||
channels_to_snapshot=channels_to_snapshot,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user