fix(gateway): doc comments contradict the implementation in three places #899

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

Each of these actively misleads, and one already caused a real bug:

  1. gateway.go:23-27 says MessageID is 'Populated on read; ignored on write.' Both stores honour an incoming MessageID in preference to deriving one (session_store.go:588, session_store_sqlite.go:291). This is exactly the misreading behind /branch copying parent history into the child under the PARENT's canonical IDs -- CONFIRMED on both backends, and newMessageID's own doc claims the opposite ('the same upstream message copied into a branch gets its own identity'). Two branches from one parent produce three sessions holding the same MessageID.

  2. session_store.go:405-409 describes msgID and a disambiguating counter, both deleted in this commit, and now sits above messageIDNamespace describing the opposite of the current design.

  3. telegram.go:474-477 still says a redelivered update 'updates the stored turn' -- the exact behaviour the immutability fix removed.


Imported from beads archie-core-1786637499439-368-69670625 · GitHub #389 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

Each of these actively misleads, and one already caused a real bug: 1. gateway.go:23-27 says MessageID is 'Populated on read; ignored on write.' Both stores honour an incoming MessageID in preference to deriving one (session_store.go:588, session_store_sqlite.go:291). This is exactly the misreading behind /branch copying parent history into the child under the PARENT's canonical IDs -- CONFIRMED on both backends, and newMessageID's own doc claims the opposite ('the same upstream message copied into a branch gets its own identity'). Two branches from one parent produce three sessions holding the same MessageID. 2. session_store.go:405-409 describes msgID and a disambiguating counter, both deleted in this commit, and now sits above messageIDNamespace describing the opposite of the current design. 3. telegram.go:474-477 still says a redelivered update 'updates the stored turn' -- the exact behaviour the immutability fix removed. --- _Imported from beads `archie-core-1786637499439-368-69670625` · GitHub #389 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:38:12 +00:00
sam self-assigned this 2026-10-27 13:38:12 +00:00
sam closed this issue 2026-10-27 13:38:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#899