-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementationrequest clarification[Status] The maintainer need clarification or more information from the author[Status] The maintainer need clarification or more information from the author
Description
Runner/session tests can misreport event totals when assertions rely on stale session snapshots, reducing confidence in replay behavior.
Current behavior is insufficient because post-invocation assertions sometimes count in-memory state that is no longer authoritative for persisted session events.
Why now: session replay and event-contract stability are core runtime guarantees and this failure pattern is recurring.
Claim-to-codepath map:
- Invocation persistence flow in src/google/adk/runners.py.
- Session storage/read paths in src/google/adk/sessions.
- Assertions and fixtures in tests/unittests.
Requested behavior: tests re-fetch session state before counting events and demonstrate deterministic totals across repeated runs.
Evidence Packet
- Commit under test: aa77920
- Runtime environment:
- OS: Darwin 25.3.0 arm64
- Python 3.14.0
- go version go1.25.7 darwin/arm64
- Node: v22.19.0
- Minimal repro:
- Follow the repo's current local validation/CI-triage path.
- Observe the behavior described above for this issue.
- Expected behavior: deterministic, documented behavior matching acceptance criteria below.
- Actual behavior: behavior can be inconsistent for the scenario described above.
Acceptance Criteria
- Implement the smallest code change that addresses the proven pain point.
- Add focused regression test coverage for the changed behavior.
- Ensure backward compatibility expectations are explicit in tests/docs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementationrequest clarification[Status] The maintainer need clarification or more information from the author[Status] The maintainer need clarification or more information from the author