Repository navigation
Retain conversation protection across memory-store callbacks - #910
Merged
Merged
Conversation
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]> (cherry picked from commit 7ef8617) Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
zlareb1
marked this pull request as ready for review
November 18, 2026 20:17
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.
Changelog category (leave one):
Changelog entry
Memory-store callbacks retain application-owned conversation protection across client rebinding and authentication waits.
Why
A store can outlive its constructor and earlier callback contributors. Losing those contributors allows later automatic recall or capture after a contributing conversation becomes protected.
Scope and risk
The structural store retains constructor, bound-client, ambient and earlier callback contributors through the shared callback helper. The complete add and search bodies run within the retained scope, including authentication and response conversion. Only an existing application-owned automatic context selects automatic behavior; direct calls remain explicit and observe responses.
The shared helper merges concurrent contributors atomically and resolves contributors outside its lock. Existing SDK calls, payloads, hashing, metadata filtering, abstention, result limits and entry conversion remain unchanged. No protection family, public argument, wire header or dependency is added.
The tests execute the structural store and real Loom SDK at a selected mock HTTP boundary. They do not qualify the external native MemoryManager or Agent, whose search path can handle store errors itself. The default extraction setting remains unchanged.
Compatibility, rollout and rollback
Tests
Hosted unit execution reports all 16 predicted retention failures in the unchanged store: eight constructor cases, four authentication cases, two earlier-callback cases, failed durable marking and first mirrored recall. The complete shard reports 16 failures, 6,579 passes and one skip. The other nine module cases are not named as failures; this is not a separate module result count.
All six original test bodies and assertions remain unchanged. The complete 25-case module is byte-identical for the corrected implementation check. Reproduce with
python -m pytest tests/unit/test_sdk_strands_store.py.Scoped Ruff lint and formatting, strict mypy, AST and byte preservation, whitespace and prose checks pass. No local tests ran. The corrected hosted JUnit artifact explicitly reports all 25 store cases passing, with no failures, errors or skips. Fresh independent whole-change source review reports no findings or nits. All 42 current checks and all three applicable workflows pass; all 41 underlying jobs are terminal and successful. Final publication remains subject to checks started when the draft becomes ready. External native framework execution remains unqualified.
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: An agent wrote the change. The complete product diff, frozen tests, original method bodies and hosted failure summaries were checked before publication. Fresh independent source review has no findings or nits; all 25 hosted store cases pass.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist