Conversation
929bcec to
ba6a3b4
Compare
ba6a3b4 to
9a2536a
Compare
9a2536a to
b13e514
Compare
b13e514 to
6d97db1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
=======================================
Coverage ? 91.17%
=======================================
Files ? 58
Lines ? 5018
Branches ? 765
=======================================
Hits ? 4575
Misses ? 252
Partials ? 191
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
notgitika
approved these changes
Apr 21, 2026
Contributor
notgitika
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding this
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
AgentCoreMemorySessionManager.retrieve_customer_contextfilters retrieved memories usingm.get("relevanceScore", ...), but theMemoryRecordSummaryshape returned byretrieve_memory_recordsdefines the field asscore(confirmed via the AWS service model).The field name mismatch means the fallback value is always used — set to
retrieval_config.relevance_scoreitself — so the conditionrelevance_score >= relevance_scoreis always
True. Every memory passes the filter regardless of the configured threshold.Root cause
The
MemoryRecordSummaryboto3 service model shape:Fix
Using
0.0as the default ensures records without a score are excluded rather than silentlypassed through.
Changes
session_manager.py: fix field name in relevance filtertest_agentcore_memory_session_manager.py: update mock memory records to use"score"tomatch the actual API response shape