-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc
Description
Problem
If event compaction changes semantic replay behavior, long-running ADK sessions can produce divergent outputs after recovery.
Why now
Durable execution and recovery require compaction safety guarantees as session histories grow.
Current behavior is insufficient
Compaction behavior is covered, but there is no explicit contract test comparing compacted vs non-compacted replay outcomes for equivalent sessions.
Expected behavior
Add deterministic contract tests proving equivalent final agent outputs between compacted and non-compacted runs.
Acceptance / Validation
- Add focused tests around runner/session replay with compaction on vs off.
- Re-fetch session state before persisted-event assertions where needed.
- Assert equivalent final output/response contracts for identical inputs.
Evidence packet
- Commit under test:
8ddddc04(origin/main) - Runtime environment: macOS arm64, Python
3.14.0 - Minimal repro:
- Run multi-turn session with compaction enabled.
- Run equivalent session with compaction disabled.
- Compare final agent output contract.
- Expected: equivalent final output contract.
- Actual: contract not explicitly enforced via deterministic parity test.
Likely codepaths
src/google/adk/runners.py, src/google/adk/flows, src/google/adk/sessions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc