fix(gateway): a message arriving mid-/compress is destroyed #598

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

applyCompress reads MessageCount then RecentMessages, and ReplaceMessages later removes everything outside the replacement set. A chat turn that lands between the read and the replace is deleted, never summarised.

CONFIRMED executed on both backends: 'nell: mid-compress inbound message destroyed (stored=24)', 'sqlite: ... (stored=24)'. NellDB deletes it via the AllDocs snapshot; SQLite via DELETE ... WHERE message_id NOT IN (survivors), a survivor-complement.

archie-core-0ua's guarantee (worst case is recoverable duplicates) does not cover this: it is unrecoverable loss, and the store-level fix cannot address it because the window is in the caller. Nothing serialises /compress against an inbound turn.


Imported from beads archie-core-1786637491624-70-91cbc6a8 · GitHub #91 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

applyCompress reads MessageCount then RecentMessages, and ReplaceMessages later removes everything outside the replacement set. A chat turn that lands between the read and the replace is deleted, never summarised. CONFIRMED executed on both backends: 'nell: mid-compress inbound message destroyed (stored=24)', 'sqlite: ... (stored=24)'. NellDB deletes it via the AllDocs snapshot; SQLite via DELETE ... WHERE message_id NOT IN (survivors), a survivor-complement. archie-core-0ua's guarantee (worst case is recoverable duplicates) does not cover this: it is unrecoverable loss, and the store-level fix cannot address it because the window is in the caller. Nothing serialises /compress against an inbound turn. --- _Imported from beads `archie-core-1786637491624-70-91cbc6a8` · GitHub #91 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:36:58 +00:00
sam self-assigned this 2026-10-27 13:36:58 +00:00
sam closed this issue 2026-10-27 13:36:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#598