Skip to content

fix(sessions): persist event custom metadata#6069

Open
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/database-event-custom-metadata
Open

fix(sessions): persist event custom metadata#6069
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/database-event-custom-metadata

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Summary

  • add custom_metadata as a first-class Event field
  • let DatabaseSessionService v1 persist it through the existing event_data dump/restore path
  • assert session round-trips preserve custom metadata across session backends

Fixes #6055

To verify

  • PYTHONPATH=src python -m pytest tests\unittests\sessions\test_v0_storage_event.py tests\unittests\sessions\test_session_service.py::test_append_event_complete -q
  • PYTHONPATH=src python -m pytest tests\unittests\test_runners.py::test_run_config_custom_metadata_propagates_to_events -q
  • python -m py_compile src\google\adk\events\event.py tests\unittests\sessions\test_session_service.py
  • python -m ruff check src\google\adk\events\event.py tests\unittests\sessions\test_session_service.py
  • git diff --check

@adk-bot adk-bot added the services [Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

services [Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] custom_metadata not persisted by DatabaseSessionService, breaks RemoteA2aAgent context_id reuse across requests

2 participants