Skip to content

Agno database callbacks retain session contributors - #887

Merged
zlareb1 merged 3 commits into
mainfrom
feat/agno-callback-protection
Nov 18, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
feat/agno-callback-protection

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix

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

  • Wire, schema, settings and dependencies: unchanged.
  • Operator steps: none.
  • Rollback: revert the adapter and its guide/provenance companion changes together. The adopted diagnostics retain the existing proof behavior.

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

  • Required CI checks pass on the final head.
  • Fresh independent review covers the final head.
  • Existing isolation assertions and security deadlines remain unchanged.
  • Commits are signed off.

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]>
@zlareb1 zlareb1 changed the title Agno native callbacks retain their session contributors Exercise Agno callback contributor retention Nov 18, 2026
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]>
@zlareb1 zlareb1 changed the title Exercise Agno callback contributor retention Agno database callbacks retain session contributors Nov 18, 2026
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]>
@zlareb1
zlareb1 marked this pull request as ready for review November 18, 2026 21:16
@zlareb1
zlareb1 merged commit e77a0a2 into main Nov 18, 2026
49 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant