Skip to content

fix(langgraph): align DeltaChannel overwrite semantics#8124

Closed
Sydney Runkle (sydney-runkle) wants to merge 3 commits into
mainfrom
fix-delta-overwrite-binop-semantics
Closed

fix(langgraph): align DeltaChannel overwrite semantics#8124
Sydney Runkle (sydney-runkle) wants to merge 3 commits into
mainfrom
fix-delta-overwrite-binop-semantics

Conversation

@sydney-runkle

@sydney-runkle Sydney Runkle (sydney-runkle) commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Simplifies DeltaChannel Overwrite handling by matching BinaryOperatorAggregate: an Overwrite bypasses the reducer for the entire superstep, so same-step writes before or after it are ignored.

Alt to https://github.com/langchain-ai/langgraph/pull/7956/changes

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/checkpoint/langgraph/checkpoint/base/__init__.py Outdated

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

)
remaining = [v for i, v in enumerate(values) if i != overwrite_idx]
self.value = self.reducer(base, remaining) if remaining else base
self.value = base

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Checkpoint replay keeps discarded writes

This makes live execution treat an overwrite as a hard reset for the whole superstep, but the checkpoint history/replay path still records and replays the other writes from that same superstep. For example, a parallel step that writes Overwrite(["b"]) and ["c"] now returns ["b"] live at that step, but after the next checkpoint reload DeltaChannel.replay_writes() sees both writes and reconstructs ["b", "c"] (and subsequent deltas build on that wrong state). I reproduced this with the new parallel DeltaChannel graph shape: invoke() returned {'messages': ['b', 'd']} while get_state() reconstructed {'messages': ['b', 'c', 'd']}. Please update the replay/history side to drop the same-step deltas that live execution now discards, or otherwise make replay use the same hard-reset semantics.

(Refers to line 180)


Your feedback helps Open SWE learn. React with 👍 or 👎 to tell us if this review comment was useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants