Repository navigation
Python: Fix VolatileMemoryStore.get_nearest_match returning an un-awaited coroutine - #14523
Open
PRABHU KIRAN VANDRANKI (VANDRANKI) wants to merge 1 commit into
Conversation
PRABHU KIRAN VANDRANKI (VANDRANKI)
requested a review
from a team
as a code owner
October 1, 2026 16:56
PRABHU KIRAN VANDRANKI (VANDRANKI)
deployed
to
github-app-auth
October 1, 2026 16:56 — with
GitHub Actions
Active
PRABHU KIRAN VANDRANKI (VANDRANKI)
deployed
to
github-app-auth
October 1, 2026 16:57 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
PRABHU KIRAN VANDRANKI (VANDRANKI)
October 1, 2026 16:57
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix matches established implementations and is covered by targeted regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes VolatileMemoryStore.get_nearest_match to return the nearest record and score instead of an un-awaited coroutine.
Changes:
- Awaits
get_nearest_matchesand returns its first result. - Adds regression tests for tuple results and relevance thresholds.
| File | Description |
|---|---|
python/semantic_kernel/memory/volatile_memory_store.py |
Corrects asynchronous result handling. |
python/tests/unit/memory/test_volatile_memory_store.py |
Adds regression coverage for nearest-match behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4 tasks done
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.
Motivation and Context
VolatileMemoryStore.get_nearest_matchisasync defbut returnedself.get_nearest_matches(...)without awaiting it, so callers received a coroutine instead of a(MemoryRecord, score)tuple. Fixes #14521.Description
Await
get_nearest_matchesand return its first element, the same wayChromaMemoryStore.get_nearest_matchdoes. Addedtests/unit/memory/test_volatile_memory_store.pywith two tests. Both fail on main (they receive a coroutine) and pass with the change.Contribution Checklist