Skip to content

feat(session): bounded SessionRegistry with idle expiry (#629)#631

Merged
matedev01 merged 2 commits into
GeniePod:mainfrom
kiannidev:feat/issue-629-session-registry
Jul 6, 2026
Merged

feat(session): bounded SessionRegistry with idle expiry (#629)#631
matedev01 merged 2 commits into
GeniePod:mainfrom
kiannidev:feat/issue-629-session-registry

Conversation

@kiannidev

@kiannidev kiannidev commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #629. Adds a bounded SessionRegistry for per-(channel, speaker) session lifecycle and wires HTTP chat to resolve conversation ids through it when no explicit conversation_id is sent.

Changes

  • New session::SessionRegistry — idle TTL (30 min default), max 32 active sessions, LRU eviction
  • HTTP chat + stream paths resolve session keys via registry
  • Unit tests: create/reuse, idle eviction, cap eviction

Real Behavior Proof

  • I have built and run the affected code locally (or noted why I could not).
  • I have verified the change end-to-end on Jetson hardware.
  • I have NOT verified on Jetson hardware, and I explain the equivalent verification path or validation gap below.

Tested profile / hardware (check all that apply):

  • jetson
  • raspberry_pi
  • portable_sbc
  • laptop
  • mac
  • CI-only / docs-only
  • Not run locally

What I ran

cargo fmt --all -- --check
cargo clippy -p genie-core --all-targets -- -D warnings
cargo test -p genie-core session::

Linux dev host. All session tests green.

What I observed

3/3 session unit tests pass; clippy clean.

Test plan

  • cargo test -p genie-core session::
  • POST /api/chat with speaker: "dana" twice → same conversation_id; wait past idle TTL in a manual test or lower TTL in dev

Notes for reviewers

Relates #565. Registry evicts tracking entries only — conversation history remains in SQLite until storage pruning.

Add SessionRegistry for per-(channel, speaker) session lifecycle with idle
TTL and active-session cap; wire HTTP chat to resolve conversation ids through
the registry when no explicit conversation_id is supplied.
@kiannidev kiannidev force-pushed the feat/issue-629-session-registry branch from e82799d to e0a9484 Compare July 5, 2026 00:21

@matedev01 matedev01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean M2 A3 session work (#565). Bounded SessionRegistry with idle expiry + conversation-continuity wiring. channel:: 10/10, full --lib 826/0, BFCL 96%.

@matedev01 matedev01 merged commit 29a1838 into GeniePod:main Jul 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(session): bounded SessionRegistry with idle expiry for per-speaker continuity

2 participants