mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 17:42:24 +02:00
Adds _get_tuple_raw / _aget_tuple_raw as the pure-storage-read layer that _get_channel_writes_history calls instead of get_tuple. Default implementation delegates to get_tuple for full backward compatibility — no changes needed for existing savers whose get_tuple is a plain storage query. Savers that perform channel hydration inside get_tuple can override _get_tuple_raw with the raw read to structurally break any possible cycle; a Python RecursionError surfaces the problem if they don't, rather than the previous silent data corruption (returning empty writes). Also fixes write-collection ordering in the reference implementation: pending writes from the seed-terminator ancestor were silently dropped because the terminator check fired before the collection loop. Writes are now collected first so the seed ancestor's transition writes are included in reconstruction. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>