[PR #600] [MERGED] feat(checkpoint-validation): add custom checkpointer validation tool #875

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/600
Author: @benjamincburns
Created: 10/14/2024
Status: Merged
Merged: 10/21/2024
Merged by: @nfcampos

Base: mainHead: checkpoint-acceptance-tests


📝 Commits (7)

  • 624bd62 feat(checkpoint-validation): add custom checkpointer validation tool
  • be4ab79 drop invalid put test
  • dd64de1 fix invalid getTuple test (supply thread_id)
  • ef088b9 skip dockerized tests in CI on Windows and M-series mac
  • 2c40e3f style fixes
  • 81f13e0 Clean up CLI arg parsing & passing
  • 0ea8824 bump yarn.lock

📊 Changes

39 files changed (+3291 additions, -37 deletions)

View changed files

📝 .gitignore (+2 -1)
libs/checkpoint-validation/.env.example (+6 -0)
libs/checkpoint-validation/.eslintrc.cjs (+69 -0)
libs/checkpoint-validation/.gitignore (+7 -0)
libs/checkpoint-validation/.prettierrc (+19 -0)
libs/checkpoint-validation/.release-it.json (+13 -0)
libs/checkpoint-validation/LICENSE (+21 -0)
libs/checkpoint-validation/README.md (+96 -0)
libs/checkpoint-validation/bin/cli.js (+5 -0)
libs/checkpoint-validation/bin/jest.config.js (+22 -0)
libs/checkpoint-validation/jest.config.cjs (+38 -0)
libs/checkpoint-validation/jest.env.cjs (+12 -0)
libs/checkpoint-validation/langchain.config.js (+21 -0)
libs/checkpoint-validation/package.json (+107 -0)
libs/checkpoint-validation/src/cli.ts (+23 -0)
libs/checkpoint-validation/src/import_utils.ts (+68 -0)
libs/checkpoint-validation/src/index.ts (+18 -0)
libs/checkpoint-validation/src/parse_args.ts (+103 -0)
libs/checkpoint-validation/src/runner.ts (+18 -0)
libs/checkpoint-validation/src/spec/get_tuple.ts (+249 -0)

...and 19 more files

📄 Description

What's in the box?

This change adds the package @langgraph/checkpoint-validation-tool, which provides a portable black-box acceptance test suite for validating both internal and external checkpoint saver implementations.

This change fixes #541.

How can I use it?

It can be ran as a CLI tool, or by embedding it into an existing Jest test project. Interfacing between the test suite and custom checkpoint saver code is handled by a user-provided object that contains a set of simple functions that are used for infrastructure and component setup/teardown. Full usage details can be found in the README.md introduced in this PR.

Why is the build failing?

This package is also configured to exercise the existing checkpoint saver implementations during normal test runs (via yarn test). I use TestContainers where needed (MongoDB and PostgreSQL savers) for infrastructure provisioning.

A number of problems were discovered in the existing LangGraph checkpoint saver implementations while working on this PR. I've submitted additional PRs to correct some of the problems that I discovered (#578, #580, #582, #583, #584), and raised GH issues for others (#581, #589, #590, #591, #592, #593, #594, #595).

In the case of the problems that are described in GH issues, I've included implementation-specific carve-outs in the test logic to avoid test failures. These carve-outs are marked with TODO comments in the code.

In the case of the problems for which I've submitted PRs, I have not included any carve-outs in this test suite for those. As a result, the tests introduced by this PR will fail until the above mentioned PRs are accepted.

What's the best way to evaluate this whole mess?

To solve the chicken-and-egg problem that's caused by the dependence of this PR on so many others, I've created a merge branch that contains all of those fixes, along with the changes in this PR. I will endeavor to keep that branch in sync as things change.


🔄 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/600 **Author:** [@benjamincburns](https://github.com/benjamincburns) **Created:** 10/14/2024 **Status:** ✅ Merged **Merged:** 10/21/2024 **Merged by:** [@nfcampos](https://github.com/nfcampos) **Base:** `main` ← **Head:** `checkpoint-acceptance-tests` --- ### 📝 Commits (7) - [`624bd62`](https://github.com/langchain-ai/langgraphjs/commit/624bd6282049ee5a7c9e0fd6bcbea530aa027cb2) feat(checkpoint-validation): add custom checkpointer validation tool - [`be4ab79`](https://github.com/langchain-ai/langgraphjs/commit/be4ab79a8329cf595c7b99a83f614ed33bb10f05) drop invalid put test - [`dd64de1`](https://github.com/langchain-ai/langgraphjs/commit/dd64de186535c09cb7774240470b93e1bbe17550) fix invalid getTuple test (supply thread_id) - [`ef088b9`](https://github.com/langchain-ai/langgraphjs/commit/ef088b973b355258d7c6a4e0a5a9b64aeac7a97f) skip dockerized tests in CI on Windows and M-series mac - [`2c40e3f`](https://github.com/langchain-ai/langgraphjs/commit/2c40e3fdc78eba548d0f2c883979308a672ff23c) style fixes - [`81f13e0`](https://github.com/langchain-ai/langgraphjs/commit/81f13e0f26f5467d833f8ec2001236c185e5916a) Clean up CLI arg parsing & passing - [`0ea8824`](https://github.com/langchain-ai/langgraphjs/commit/0ea882488b6eac698e4f9a0450b193d71b0577a2) bump yarn.lock ### 📊 Changes **39 files changed** (+3291 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) ➕ `libs/checkpoint-validation/.env.example` (+6 -0) ➕ `libs/checkpoint-validation/.eslintrc.cjs` (+69 -0) ➕ `libs/checkpoint-validation/.gitignore` (+7 -0) ➕ `libs/checkpoint-validation/.prettierrc` (+19 -0) ➕ `libs/checkpoint-validation/.release-it.json` (+13 -0) ➕ `libs/checkpoint-validation/LICENSE` (+21 -0) ➕ `libs/checkpoint-validation/README.md` (+96 -0) ➕ `libs/checkpoint-validation/bin/cli.js` (+5 -0) ➕ `libs/checkpoint-validation/bin/jest.config.js` (+22 -0) ➕ `libs/checkpoint-validation/jest.config.cjs` (+38 -0) ➕ `libs/checkpoint-validation/jest.env.cjs` (+12 -0) ➕ `libs/checkpoint-validation/langchain.config.js` (+21 -0) ➕ `libs/checkpoint-validation/package.json` (+107 -0) ➕ `libs/checkpoint-validation/src/cli.ts` (+23 -0) ➕ `libs/checkpoint-validation/src/import_utils.ts` (+68 -0) ➕ `libs/checkpoint-validation/src/index.ts` (+18 -0) ➕ `libs/checkpoint-validation/src/parse_args.ts` (+103 -0) ➕ `libs/checkpoint-validation/src/runner.ts` (+18 -0) ➕ `libs/checkpoint-validation/src/spec/get_tuple.ts` (+249 -0) _...and 19 more files_ </details> ### 📄 Description ## What's in the box? This change adds the package `@langgraph/checkpoint-validation-tool`, which provides a portable black-box acceptance test suite for validating both internal and external checkpoint saver implementations. This change fixes #541. ## How can I use it? It can be ran as a CLI tool, or by embedding it into an existing Jest test project. Interfacing between the test suite and custom checkpoint saver code is handled by a user-provided object that contains a set of simple functions that are used for infrastructure and component setup/teardown. Full usage details can be found in the `README.md` introduced in this PR. ## Why is the build failing? This package is also configured to exercise the existing checkpoint saver implementations during normal test runs (via `yarn test`). I use [TestContainers](https://testcontainers.com/guides/getting-started-with-testcontainers-for-nodejs/) where needed (MongoDB and PostgreSQL savers) for infrastructure provisioning. A number of problems were discovered in the existing LangGraph checkpoint saver implementations while working on this PR. I've submitted additional PRs to correct some of the problems that I discovered (#578, #580, #582, #583, #584), and raised GH issues for others (#581, #589, #590, #591, #592, #593, #594, #595). In the case of the problems that are described in GH issues, I've included implementation-specific carve-outs in the test logic to avoid test failures. These carve-outs are marked with `TODO` comments in the code. In the case of the problems for which I've submitted PRs, I have **not** included any carve-outs in this test suite for those. As a result, the tests introduced by this PR will fail until the above mentioned PRs are accepted. ## What's the best way to evaluate this whole mess? To solve the chicken-and-egg problem that's caused by the dependence of this PR on so many others, I've created [a merge branch](https://github.com/benjamincburns/langgraphjs/tree/compiled-checkpoint-fixes) that contains all of those fixes, along with the changes in this PR. I will endeavor to keep that branch in sync as things change. --- <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:14 -05:00
yindo closed this issue 2026-02-15 19:16:14 -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#875