Visitar URL original
fix(memory): apply rewinds to incremental events by 1aifanatic · Pull Request #8138 · google/adk-python · GitHub
Skip to content

fix(memory): apply rewinds to incremental events - #8138

Draft
1aifanatic wants to merge 1 commit into
google:mainfrom
1aifanatic:contrib/20261113-core
Draft

1aifanatic wants to merge 1 commit into
google:mainfrom
1aifanatic:contrib/20261113-core

Conversation

@1aifanatic

Copy link
Copy Markdown
Contributor

Link to Issue or Description of Change

Closes #8137

Incremental memory ingestion currently drops contentless rewind events and keeps recalling the undone turns. Resolve rewinds over the combined history and retain invocation boundaries needed to locate their targets. Deleted entries retain only a content-free anchor, never their deleted payload. This also supports a delta rewind after an initial full-session ingestion.

Testing Plan

  • Regression cases cover same-batch and subsequent-delta rewinds, another session's unaffected memories, replacement turns, and contentless/deleted targets after either ingestion API.
  • python -m pytest tests/unittests/memory/test_in_memory_memory_service.py -q: 70 passed.
  • Real InMemoryRunner smoke with a callback-only agent: run two turns, ingest session events, call rewind_async, ingest only the new rewind event, search memory. Output: before rewind=1, after=0, kept=1. No model calls or mocked Runner components.
  • Formatting/compliance and git diff --check checked locally; Windows shell-wrapper check run through its Python entry point.
  • Full multi-version suite remains pending; this PR is draft while that validation is incomplete.

Checklist

  • Read contribution guidance and reviewed the diff.
  • Added regressions that fail before the fix.
  • Tested the real Runner/rewind/memory path.

Prepared with AI assistance. Existing private-storage assertions were updated to include contentless invocation anchors; user-visible memory search assertions remain intact.

Signed-off-by: Naveen Chatlapalli <naveen.aifanatic@gmail.com>
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.

Incremental in-memory ingestion keeps recalling rewound turns

2 participants