mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-25 09:02:25 +02:00
MemorySaverAssertImmutable recorded the checkpoint object handed to put, then compared it against one read back through get. Those two are not the same shape: channel_values are stored per (channel, version), so a channel a step did not write is refilled from the blob its inherited version still points at. Every channel except DeltaChannel writes its value into channel_values on every checkpoint, so the two agreed by accident. A DeltaChannel stores nothing except at a snapshot, so once one snapshots and a later step does not write it, the saver reports a checkpoint that changed after it was written when nothing was mutated. Reproducible on main with no fork involved: a delta channel with snapshot_frequency=1 written by the first node and left alone by the next two trips the assertion. Existing delta tests miss it only because they all use snapshot_frequency=1000. Record what the saver reads back instead. Comparing read-back against read-back still catches a checkpoint whose stored data really changed.