Skip to content

2 minor bugs in config.after_timestamp behavior of InMemorySessionService.get_session() #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
allengour opened this issue Apr 28, 2025 · 0 comments · May be fixed by #438
Open

2 minor bugs in config.after_timestamp behavior of InMemorySessionService.get_session() #437

allengour opened this issue Apr 28, 2025 · 0 comments · May be fixed by #438
Assignees
Labels
services Runtime services

Comments

@allengour
Copy link

Adding a fix shortly..
Combining 2 bugs due to simple & compatible logic

Describe the bug

  1. config.after_timestamp logic mistakenly includes one more index when doing the slicing.

  2. I would expect GetSessionConfig's num_recent_events and after_timestamp to be compatible with each other in InMemorySessionService (looks to be true in DatabaseSessionService's implementation using SQL filter and then limit). Right now it checks if config.num_recent_events exists and only does the config.after_timestamp logic in the elif case. The conditionals can/should be independent.

See screenshots below for steps to reproduce and expected behavior:
Image
Image

Desktop (please complete the following information):

  • OS: tested on macOS 15.4.1 (local) and Debian GNU/Linux 11 (cloud)
  • Python version(python -V): tested on 3.9.6 & 3.12.10 (local) and 3.10.14 (cloud)
  • ADK version(pip show google-adk): 0.3.0
@allengour allengour changed the title 2 minor bugs in config.after_timestamp behavior InMemorySessionService.get_session() 2 minor bugs in config.after_timestamp behavior of InMemorySessionService.get_session() Apr 28, 2025
@hangfei hangfei added the services Runtime services label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
services Runtime services
Projects
None yet
3 participants