test(checkpoint): cover InMemorySaver before and limit listing#7235
test(checkpoint): cover InMemorySaver before and limit listing#7235ycc (yangcongcong-coding) wants to merge 2 commits intolangchain-ai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 283221582a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| search_results_6 = list( | ||
| self.memory_saver.list( | ||
| {"configurable": {"thread_id": "thread-2"}}, | ||
| before=search_results_5[1].config, |
There was a problem hiding this comment.
Select the
before cursor deterministically in list tests
The new before coverage depends on search_results_5[1] being the inner namespace, but the preceding assertion explicitly treats search_results_5 as unordered by comparing a set of namespaces. InMemorySaver.list() currently iterates namespaces in insertion order, so a harmless refactor that changes that order would make this cursor point at the root checkpoint instead and turn the expected one-row result into an empty list even though before still works. Please choose the cursor by checkpoint_ns (or sort first) rather than by positional index; the same issue is duplicated in test_asearch.
Useful? React with 👍 / 👎.
|
This PR has been automatically closed because it does not link to an approved issue. All external contributions must reference an approved issue or discussion. Please:
Maintainers: reopen this PR or remove the |
Description:\nAdds missing before/limit coverage for InMemorySaver listing in both sync and async tests. The new assertions keep the checks thread-scoped so they verify the current in-memory listing semantics without depending on cross-thread ordering.\n\nIssue: N/A\n\nDependencies: None\n\nTwitter handle: @yangcongcongcc