[PR #625] fix(checkpoint-mongodb): fix filter support, store state deltas, populate pendingWrites #894

Open
opened 2026-02-15 19:16:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/625
Author: @benjamincburns
Created: 10/23/2024
Status: 🔄 Open

Base: mainHead: fix-checkpoint-mongodb-filter


📝 Commits (3)

  • e8b90f3 fix(checkpoint-mongodb): apply filters correctly in list method
  • 795f7b1 fix(checkpoint-mongodb): fix state deltas, pendingWrites, pending_sends
  • aae0e51 Skip containerized tests in GHA on M-series mac

📊 Changes

15 files changed (+842 additions, -139 deletions)

View changed files

📝 libs/checkpoint-mongodb/package.json (+2 -0)
📝 libs/checkpoint-mongodb/src/index.ts (+381 -81)
libs/checkpoint-mongodb/src/migrations/1_object_metadata.ts (+110 -0)
libs/checkpoint-mongodb/src/migrations/base.ts (+73 -0)
libs/checkpoint-mongodb/src/migrations/index.ts (+21 -0)
📝 libs/checkpoint-mongodb/src/tests/checkpoints.int.test.ts (+4 -2)
libs/checkpoint-mongodb/src/tests/migrations/1_object_metadata.test.ts (+183 -0)
libs/checkpoint-mongodb/src/tests/utils.ts (+33 -0)
📝 libs/checkpoint-sqlite/src/index.ts (+1 -27)
📝 libs/checkpoint-validation/package.json (+1 -2)
📝 libs/checkpoint-validation/src/spec/list.ts (+1 -17)
📝 libs/checkpoint-validation/src/spec/put.ts (+0 -3)
📝 libs/checkpoint/src/index.ts (+1 -0)
📝 libs/checkpoint/src/types.ts (+23 -0)
📝 yarn.lock (+8 -7)

📄 Description

Breaking changes:

  • Changes the format of stored documents in mongo, requiring existing databases to be migrated by calling the MongoDBSaver.migrate method.

Non-breaking changes:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/625 **Author:** [@benjamincburns](https://github.com/benjamincburns) **Created:** 10/23/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-checkpoint-mongodb-filter` --- ### 📝 Commits (3) - [`e8b90f3`](https://github.com/langchain-ai/langgraphjs/commit/e8b90f37199e2bbc58d6b7eb6c1fec50b88f7be2) fix(checkpoint-mongodb): apply filters correctly in list method - [`795f7b1`](https://github.com/langchain-ai/langgraphjs/commit/795f7b1d3167b81860e0ae82e07283f491c013ca) fix(checkpoint-mongodb): fix state deltas, pendingWrites, pending_sends - [`aae0e51`](https://github.com/langchain-ai/langgraphjs/commit/aae0e5135f86cf9bee8f470735651ba42c41825c) Skip containerized tests in GHA on M-series mac ### 📊 Changes **15 files changed** (+842 additions, -139 deletions) <details> <summary>View changed files</summary> 📝 `libs/checkpoint-mongodb/package.json` (+2 -0) 📝 `libs/checkpoint-mongodb/src/index.ts` (+381 -81) ➕ `libs/checkpoint-mongodb/src/migrations/1_object_metadata.ts` (+110 -0) ➕ `libs/checkpoint-mongodb/src/migrations/base.ts` (+73 -0) ➕ `libs/checkpoint-mongodb/src/migrations/index.ts` (+21 -0) 📝 `libs/checkpoint-mongodb/src/tests/checkpoints.int.test.ts` (+4 -2) ➕ `libs/checkpoint-mongodb/src/tests/migrations/1_object_metadata.test.ts` (+183 -0) ➕ `libs/checkpoint-mongodb/src/tests/utils.ts` (+33 -0) 📝 `libs/checkpoint-sqlite/src/index.ts` (+1 -27) 📝 `libs/checkpoint-validation/package.json` (+1 -2) 📝 `libs/checkpoint-validation/src/spec/list.ts` (+1 -17) 📝 `libs/checkpoint-validation/src/spec/put.ts` (+0 -3) 📝 `libs/checkpoint/src/index.ts` (+1 -0) 📝 `libs/checkpoint/src/types.ts` (+23 -0) 📝 `yarn.lock` (+8 -7) </details> ### 📄 Description Breaking changes: - Changes the format of stored documents in mongo, requiring existing databases to be migrated by calling the `MongoDBSaver.migrate` method. Non-breaking changes: - Adds filter logic to the `list` method to support the `options.filter` argument, fixes #581 - Adds basic document format version tagging and migration support - Migrates existing stored metadata to stored as BSON objects rather than binary data. - Includes a change to `checkpoint-sqlite` and `checkpoint` libraries to centralize an array that I'm using in multiple packages to sanitize filter inputs. - Stores `channel_values` by version on change, respecting the `newVersions` argument to `put`, fixes #595 - Populates `pendingWrites` and `pending_sends` correctly, fixes #589 - Updates `checkpoint-validation` to no longer skip tests that exercise the above fixes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:16:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#894