Skip to content

fix(unit-only): Re-apply PR #1299's one-line change in all three Strands ... (#665)#31

Draft
aidandaly24 wants to merge 3 commits into
mainfrom
fix/665
Draft

fix(unit-only): Re-apply PR #1299's one-line change in all three Strands ... (#665)#31
aidandaly24 wants to merge 3 commits into
mainfrom
fix/665

Conversation

@aidandaly24

Copy link
Copy Markdown
Owner

Refs aws#665

Issues

Root cause

PR aws#1299 (1402057) fixed the SUMMARIZATION retrieval namespace; squash release 845c1bd (aws#1547) reverted that exact line, re-shipping f"/summaries/{actor_id}/{session_id}" in v0.20.2's three vended session.py templates at line 31, which prefix-matches only the current session and never finds prior sessions' summaries (SDK retrieve_memories namespace_path is prefix-based, client.py:322-338).

The fix

Re-apply PR aws#1299's one-line change in all three Strands session.py templates: change the SUMMARIZATION retrieval line at line 31 from f"/summaries/{actor_id}/{session_id}" to f"/summaries/{actor_id}". Run npm run test:update-snapshots to refresh the 3 affected entries in assets.snapshot.test.ts.snap (lines 2264, 3286, 6554). Update docs/memory.md:95 (manual-wiring snippet) and the strategy table at docs/memory.md:160 to /summaries/{actorId} for SUMMARIZATION. Leave the write-side namespaceTemplate (memory.ts:26) and EPISODIC ({session_id} kept intentionally; the issue is scoped to SUMMARIZATION) unchanged. Add a regression test asserting the generated SUMMARIZATION retrieval namespace contains no {session_id}, so a future squash-merge cannot silently revert it again. No SDK or CDK change needed (SDK prefix-retrieval is correct; CDK owns nothing in this path).

Files touched: src/assets/python/http/strands/capabilities/memory/session.py:31; src/assets/python/agui/strands/capabilities/memory/session.py:31; src/assets/python/a2a/strands/capabilities/memory/session.py:31; docs/memory.md:95 and :160; src/assets/tests/snapshots/assets.snapshot.test.ts.snap (regen, lines 2264/3286/6554); new regression test in src/assets/tests/

Validation evidence

The fix was verified by reproducing the original symptom and re-running after the change:

redundant

Test suite: green.


Staged on the fork as a draft for human review. Promote to aws/agentcore-cli after vetting.

…mespace

Cross-session SUMMARIZATION recall was silently broken: the vended Strands
session.py templates retrieved summaries with a per-session namespace
(/summaries/{actor_id}/{session_id}), which only prefix-matches the current
session and never surfaces prior sessions' summaries. Re-apply PR aws#1299's
one-line fix to use an actor-scoped namespace (/summaries/{actor_id}) in all
three templates (http, agui, a2a), regenerate the asset snapshot, update
docs/memory.md, and add a regression test to prevent another silent revert
(reverted previously by squash release aws#1547).

Fixes aws#665
@github-actions github-actions Bot added size/s PR size: S agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 37.16% 13593 / 36577
🔵 Statements 36.43% 14452 / 39667
🔵 Functions 31.8% 2333 / 7336
🔵 Branches 31.1% 9000 / 28932
Generated in workflow #149 for commit fb9127b by the Vitest Coverage Report Action

@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Jun 29, 2026
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant