Repository navigation
fix(agentcore): return SDK reflection text - #5183
Merged
nicoloboschi merged 2 commits intoOct 6, 2026
Merged
nicoloboschi merged 2 commits into
nicoloboschi merged 2 commits into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
… reflect test - drop the hand-built client that overrode the adapter's, so the real client path is exercised
Collaborator
|
Thanks! Pushed one small follow-up: the HTTP reflect test now lets the adapter build its own SDK client from the URL (instead of swapping in a hand-built one), so the real client path is covered too. |
This was referenced Oct 8, 2026
Merged
This was referenced Oct 16, 2026
Merged
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 this fixes
AgentCore's
RecallPolicy(mode="reflect")receives the SDK'sReflectResponse, whose response field istext. The adapter readsanswerinstead. A successful real reflection therefore raisesAttributeError, is caught by the existing graceful-degradation handler, and produces empty memory context.Read
resp.textand preserve empty-response behavior. Replace the existing fabricatedMagicMock.answertest with the actual generated SDK model. Add Unicode/empty-text controls and a loopback HTTP regression through the real Hindsight Python SDK, asserting both the returned context and reflection request fields.Validation
ReflectResponse; the HTTP test calls realHindsight.areflectagainst a local server and closes the owned SDK session.git diff --checkpass../scripts/hooks/lint.shinvoked offline stops before lint jobs because the sparse checkout lackshindsight-all; full repository lint is not claimed green.AI-assisted implementation and tests; source and regression evidence independently reviewed before publication.