fix: preserve collection_name on MCP search retry - #1624
Merged
igorls merged 1 commit intoJun 14, 2026
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that the configured collection name is preserved and passed during search retries in tool_search. It also adds a unit test to verify this behavior. There are no review comments, so I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes transient-retry behavior in
mempalace_searchso the retry call preservescollection_name.tool_searchpassedcollection_nameon the initialsearch_memories(...)call but dropped it on retry._config.collection_nameon the retry call as well.test_search_retry_preserves_collection_nameto ensure both attempts use the same configured collection.Closes #1623.
How to test
uv run pytest tests/test_mcp_server.py -k "search_retries_once_on_hnsw_flush_transient or search_retry_preserves_collection_name or search_with_wing_filter or search_with_room_filter" -qValidation run for this PR:
uv run ruff check .-> pass4 passed)uv run pytest tests/ -v --ignore=tests/benchmarkstests/test_cli.py,tests/test_repair.py, andtests/test_searcher.py.Checklist
python -m pytest tests/ -v)ruff check .)