mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 01:22:24 +02:00
Replaces the three sequential SELECT roundtrips in _get_channel_writes_history (checkpoints, checkpoint_writes, checkpoint_blobs) with one combined UNION ALL query tagged by a _kind discriminator column. Both sync and async paths now do one execute + one fetchall regardless of pipeline mode. _build_delta_channel_writes_history is updated to accept the single tagged rows list and dispatch on _kind while building its lookup dicts; the three old SQL constants are removed. Also fixes write-collection ordering in _build_delta_channel_writes_history: the seed-terminator blob check previously fired before collecting that ancestor's writes, silently dropping the transition writes needed to reconstruct the child's state. Writes are now collected first. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>