Repository navigation
Agno database callbacks retain session contributors - #887
Merged
Merged
Conversation
Exercise retained session contributors through native memory callbacks and client rebinding before changing the adapter. Keep explicit database calls separate from automatic invocation ownership. Signed-off-by: zlareb1 <[email protected]>
Join retained contributors when a caller already owns automatic work and preserve explicit database operations outside that invocation. Keep native callback tests independent of inherited proxies without replacing client hooks. Signed-off-by: zlareb1 <[email protected]>
Record fixed phase timings and distinguish normal channel close from latch reads. Keep proof deadlines, cleanup and fail-closed decisions unchanged. Signed-off-by: zlareb1 <[email protected]> (cherry picked from commit 97704b8) Signed-off-by: zlareb1 <[email protected]>
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 (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Agno memory callbacks retain session protection from the conversations that contribute to them.
Why
The database can outlive its transport binding or observation context. Retaining constructor and earlier callback contributors prevents later automatic memory requests from dispatching after one of those families becomes protected.
Scope and risk
The database uses the existing shared callback protection helper. Automatic invocation retains and checks contributing families; explicit CRUD remains explicit and observes responses through those families. User/store isolation, serialized memory payloads, timestamps, paging and exact deletion scope are unchanged. Native identifiers do not establish protection authority.
This head also adopts the exact, already-public proof-diagnostics commit from #892. The previous isolation failure reported four unexpected HTTP 409 responses correlated with proof timeouts. Sanitized phase timings, actual outer-deadline expiry and explicit close labels provide evidence on a natural recurrence. All security deadlines, fail-closed decisions and assertions remain unchanged. This dependency is diagnostic; the timeout mechanism is not established or claimed fixed.
Compatibility, rollout and rollback
Tests
The previous adapter head passed all 29 native cases on both supported dependency legs. Those results remain evidence for that head only. Its full CI had 42 successful checks, two publication skips and one isolation failure: one failed and 220 passed cases. The failure remains preserved and is not classified as flaky.
The adapter and entire native test module are byte-identical on this head. The adopted two-file patch and its postimages exactly match public #892. Ten critical client, dependency, admission/error and harness blobs are unchanged. Scoped Ruff lint, formatting and whitespace checks pass. No local tests, collection, application imports, installation, runtime or database checks ran.
On the final head all 29 native cases pass on both hosted legs: 1.62 seconds with Python 3.12 and Agno 3.2.1, and 1.40 seconds with Python 3.11 and Agno 3.2.0. Strict adapter mypy passes on both legs. The unchanged isolation scope passes all 221 cases. That passing run does not establish the earlier timeout mechanism or claim it fixed.
Fresh independent review of the complete final diff reports no findings or nits. All 49 checks are terminal: 47 succeed and the two publication jobs are skipped as expected. All five applicable workflows succeed; the 48 underlying jobs contain 46 successes and the same two publication skips. Current-main composition retains the published shared helper and every unrelated main change.
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: An agent wrote the change. Fresh independent review covers the complete final diff; hosted native checks and full CI pass on this head.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist