SaveMessages keys from i=0 and overwrites the first N messages of any non-empty session (verified: m0/m1 destroyed by a bulk save). SaveMessage derives seq from len(rows) so deletes cause key reuse. The 'at' timestamp is written and never read; ordering is by insertion counter, not time.
Fix: add Message.At, write nell.TimestampField (_ts), give each session its own NellDB collection (a room IS a collection), key messages by time-ordered unique IDs, and order/page via sdk.ScanSince. Clean break on existing data (carina is a testing ground).
Imported from beads archie-core-1786637498694-337-f829f27b · GitHub #358 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08
SaveMessages keys from i=0 and overwrites the first N messages of any non-empty session (verified: m0/m1 destroyed by a bulk save). SaveMessage derives seq from len(rows) so deletes cause key reuse. The 'at' timestamp is written and never read; ordering is by insertion counter, not time.
Fix: add Message.At, write nell.TimestampField (_ts), give each session its own NellDB collection (a room IS a collection), key messages by time-ordered unique IDs, and order/page via sdk.ScanSince. Clean break on existing data (carina is a testing ground).
---
_Imported from beads `archie-core-1786637498694-337-f829f27b` · GitHub #358 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam
added the mediumtask labels 2026-10-27 13:38:05 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
SaveMessages keys from i=0 and overwrites the first N messages of any non-empty session (verified: m0/m1 destroyed by a bulk save). SaveMessage derives seq from len(rows) so deletes cause key reuse. The 'at' timestamp is written and never read; ordering is by insertion counter, not time.
Fix: add Message.At, write nell.TimestampField (_ts), give each session its own NellDB collection (a room IS a collection), key messages by time-ordered unique IDs, and order/page via sdk.ScanSince. Clean break on existing data (carina is a testing ground).
Imported from beads
archie-core-1786637498694-337-f829f27b· GitHub #358 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08