Skip to content

fix(langgraph): treat DeltaChannel Overwrite as a hard reset in update()#7956

Open
Christian Bromann (christian-bromann) wants to merge 1 commit into
mainfrom
cb/fix-delta-channel-overwrite-replay-divergence
Open

fix(langgraph): treat DeltaChannel Overwrite as a hard reset in update()#7956
Christian Bromann (christian-bromann) wants to merge 1 commit into
mainfrom
cb/fix-delta-channel-overwrite-replay-divergence

Conversation

@christian-bromann

Copy link
Copy Markdown
Member

Summary

  • DeltaChannel.update() and replay_writes() disagreed when a plain write was ordered before an Overwrite in the same super-step (e.g. parallel fan-in / Send): update() kept the pre-overwrite write, replay_writes() dropped it. This broke the DeltaChannel invariant that reconstruction from a checkpoint reproduces the live state.
  • Fixed update() to treat Overwrite as a hard reset — drop everything up to and including the overwrite, keep only writes that follow it — matching replay_writes().

DeltaChannel.update() kept writes ordered before an Overwrite within the
same super-step, while replay_writes() dropped them, so reconstructing a
thread from a checkpoint produced different state than the live run. Align
update() with replay_writes() (drop everything up to and including the
overwrite) so reload reproduces live state.
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