Repository navigation
Python: await get_nearest_matches in VolatileMemoryStore.get_nearest_match - #14580
Open
lsmlhi_25 (FOWEPJF255) wants to merge 2 commits into
Open
lsmlhi_25 (FOWEPJF255) wants to merge 2 commits into
lsmlhi_25 (FOWEPJF255) wants to merge 2 commits into
Conversation
lsmlhi_25 (FOWEPJF255)
deployed
to
github-app-auth
October 12, 2026 16:35 — with
GitHub Actions
Active
lsmlhi_25 (FOWEPJF255)
deployed
to
github-app-auth
October 12, 2026 16:35 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Empty search results currently produce an unintended raw IndexError.
1 open finding
What changed in this PR
Fixes VolatileMemoryStore.get_nearest_match to return the nearest record and score rather than a coroutine.
Changes:
- Awaits
get_nearest_matchesand returns its first result. - Adds a regression test for tuple return behavior.
| File | Description |
|---|---|
python/semantic_kernel/memory/volatile_memory_store.py |
Corrects asynchronous nearest-match retrieval. |
python/tests/unit/memory/test_volatile_memory_store.py |
Tests the corrected return value. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
lsmlhi_25 (FOWEPJF255)
deployed
to
github-app-auth
October 13, 2026 11:10 — with
GitHub Actions
Active
…rest_match Return the top (record, score) tuple instead of an un-awaited coroutine (microsoft#14521). Co-authored-by: Cursor <cursoragent@cursor.com>
…h finds nothing Match PostgresMemoryStore empty-result behavior and cover it with a unit test. Co-authored-by: Cursor <cursoragent@cursor.com>
lsmlhi_25 (FOWEPJF255)
force-pushed
the
fix/14521-volatile-get-nearest-match
branch
from
October 16, 2026 03:42
9a6cd1f to
dbac7a6
Compare
lsmlhi_25 (FOWEPJF255)
deployed
to
github-app-auth
October 16, 2026 03:42 — with
GitHub Actions
Active
This branch was successfully deployed
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.

Summary
VolatileMemoryStore.get_nearest_matchnow awaitsget_nearest_matchesand returns the top(MemoryRecord, score)tuple.MemoryStoreBase.Fixes #14521
Test plan
python/tests/unit/memory/test_volatile_memory_store.pyAI disclosure: Assisted by an AI coding agent; I own and can explain this change.