Description
DatabaseSessionService.appendEvent() was not updating session.state in memory after the DB transaction. The DB transaction writes state deltas to database tables via local variables but never touches the in-memory session.state object, so any code reading session state without re-fetching from DB would see stale values (e.g., a counter incremented via state delta would still show the pre-increment value).
PRs
- #619: fix double state delta application in DatabaseSessionService
Impact
Backend — packages/adk/src/sessions/database-session-service.ts
Description
DatabaseSessionService.appendEvent()was not updatingsession.statein memory after the DB transaction. The DB transaction writes state deltas to database tables via local variables but never touches the in-memorysession.stateobject, so any code reading session state without re-fetching from DB would see stale values (e.g., a counter incremented via state delta would still show the pre-increment value).PRs
Impact
Backend —
packages/adk/src/sessions/database-session-service.ts