Skip to content

Google ADK memory callbacks retain session protection - #898

Merged
zlareb1 merged 3 commits into
mainfrom
test/adk-callback-protection
Nov 18, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
test/adk-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):

Google ADK memory callbacks retain the session protection of the conversations that contribute to them.

Why

The memory service can outlive its transport binding or observation context. Automatic recall and extraction retain constructor and earlier callback contributors when later callbacks run under another binding.

Scope and risk

The service uses the shared callback protection helper before reading native inputs. Content methods apply retained automatic controls only when the caller already has automatic context; directly invoked operations remain explicit and observe responses through the retained families. Exact-reference deletion retains observers without becoming automatic content capture.

All SDK send expressions, payload options, identities, batch sizes and native return contracts remain unchanged. A marked memory recall that suppresses the optional knowledge request raises instead of returning a fabricated memory response. Batch interruption raises without acknowledging unsent events or modifying native history. Native app, user and session identifiers do not establish protection authority.

The framework guide documents these boundaries. The sender census renews only the existing reviewed source hash; its exact-reference exception and operation classifications remain unchanged. The complete regression module is byte-identical to the hosted failing baseline.

Compatibility, rollout and rollback

  • Wire, schema, settings and dependencies: unchanged.
  • Operator steps: none.
  • Rollback: revert the adapter change, guide paragraph and reviewed source hash together; the regression tests expose the lost retained controls.

Tests

Hosted native baseline: ADK 2.14.1 on Python 3.12 reports 14 failures and 60 passes in 2.54 seconds; ADK 2.14.0 on Python 3.11 reports the same 14 failures and 60 passes in 3.50 seconds. Every failure matches the retained-control diagnosis; all original cases and explicit, reference and clean native controls pass.

Changed-file Ruff lint, formatting, whitespace and scoped strict mypy checks pass. Static comparisons confirm all five SDK send call ASTs and the exact-reference census key are unchanged. The complete test module remains byte-identical to the hosted baseline.

No local native tests, collection, application imports or dependency installation ran. The corrected head passes all 74 native cases on both supported legs: ADK 2.14.1 on Python 3.12 in 3.51 seconds and ADK 2.14.0 on Python 3.11 in 2.99 seconds. Both strict native type checks pass. Fresh independent whole-change source review reports no findings or nits. All 45 check results are terminal: 43 succeed and two publication checks are skipped. All four applicable workflows and all 42 runnable jobs succeed. Merge remains subject to repository branch rules.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: An agent wrote the change. Independent whole-change source review and both hosted native resolutions pass; all required CI checks pass.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Native regressions demonstrate the failure and pass after the correction.
  • Required CI checks pass on the final head.
  • No wire, schema, dependency or operation classification changes are introduced.
  • Commits are signed off.

@zlareb1 zlareb1 changed the title Test retained controls in Google ADK memory callbacks Google ADK memory callbacks retain session protection Nov 18, 2026
@zlareb1
zlareb1 marked this pull request as ready for review November 18, 2026 18:40
@zlareb1
zlareb1 merged commit dcf1a15 into main Nov 18, 2026
45 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