Skip to content

fix(langgraph): unwrap an Overwrite first write on an empty BinaryOperatorAggregate channel - #9018

Closed
哈基米 (BlueX888) wants to merge 1 commit into
langchain-ai:mainfrom
BlueX888:fix/binop-overwrite-first-write
Closed

哈基米 (BlueX888) wants to merge 1 commit into
langchain-ai:mainfrom
BlueX888:fix/binop-overwrite-first-write

Conversation

@BlueX888

Copy link
Copy Markdown

Fixes #9017

BinaryOperatorAggregate.update now runs the first write through _get_overwrite when the channel is empty, so an Overwrite first write stores its payload instead of the wrapper — matching the already-seeded behavior of the same method and DeltaChannel.update. The seeded seen_overwrite flag also means a second Overwrite in the same update still raises, and plain values after a leading Overwrite are skipped exactly as they are on a seeded channel.

Verified with three new unit tests in tests/test_channels.py (first-write unwrap, later plain values skipped, two overwrites raise), plus the full pytest tests/ suite passing except the redis/remote cases that also fail on main in this environment without those services.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically closed because you are not assigned to the linked issue.

External contributors must be assigned to an issue before opening a PR for it. Please:

  1. Comment on the linked issue to request assignment from a maintainer
  2. Once assigned, your PR will be reopened automatically

Maintainers: reopen this PR or remove the missing-issue-link label to bypass this check.

@github-actions github-actions Bot closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BinaryOperatorAggregate stores the Overwrite wrapper itself when it is the first write to an empty channel

1 participant