mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 06:35:46 +02:00
## Summary - Ports the langgraph API checkpointer fix to the OSS Postgres checkpoint. - The `'b'` (seed-blob) branch of `_build_delta_stage2_sql`'s `UNION ALL` was missing column aliases (`AS _kind`, `AS checkpoint_id`, `AS task_id`, `AS idx`). - In PostgreSQL, `UNION ALL` column names are taken from the **first** `SELECT`. When `channels_with_chain` is empty but `channels_with_seed` is not (e.g. very first run of a DeltaChannel graph, or `snapshot_frequency=1`), the `'b'` branch becomes the first `SELECT`, so columns got default names (`text`, `null`) instead of the expected aliases — causing `KeyError: '_kind'` in `_build_delta_channels_writes_history`. ## Test plan - [ ] Existing `checkpoint-postgres` delta channel tests pass (`make test` in `libs/checkpoint-postgres`) - [ ] Manually verified fix matches the correction suggested in the upstream API PR review comment 🤖 Generated with [Claude Code](https://claude.com/claude-code)