fix(gateway): align newest-session ordering across SessionStore backends #608

Closed
opened 2026-10-27 13:37:01 +00:00 by sam · 0 comments
Owner

SQLite List/GetByChannel order by created_at, while NellDB orders by latest document write/HLC. Touching or re-saving a session can therefore select a different active session after a backend cutover even though both pass the shared suite. Pin one observable newest-session contract and make both adapters satisfy it.

Acceptance Criteria

The shared conformance suite covers multiple sessions with distinct CreatedAt and LastActiveAt values plus Touch/re-save; List and GetByChannel return the same deterministic order on NellDB and SQLite; restart-style resolution selects the same session on both backends; indexes support the chosen SQLite ordering.


Imported from beads archie-core-1786637491902-81-d4c231f6 · GitHub #102 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

SQLite List/GetByChannel order by created_at, while NellDB orders by latest document write/HLC. Touching or re-saving a session can therefore select a different active session after a backend cutover even though both pass the shared suite. Pin one observable newest-session contract and make both adapters satisfy it. ### Acceptance Criteria The shared conformance suite covers multiple sessions with distinct CreatedAt and LastActiveAt values plus Touch/re-save; List and GetByChannel return the same deterministic order on NellDB and SQLite; restart-style resolution selects the same session on both backends; indexes support the chosen SQLite ordering. --- _Imported from beads `archie-core-1786637491902-81-d4c231f6` · GitHub #102 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:37:01 +00:00
sam self-assigned this 2026-10-27 13:37:01 +00:00
sam closed this issue 2026-10-27 13:37:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#608