Repository navigation
A reply counts as read once delivered - #25
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A reply counts as read once it is delivered, so
unreadmeans the asks still waiting on you.Why
unreadisqueued,sentordelivered(src/core.ts). An ask stays unread until you ack or answer it, which is right. A reply needs no answer, but it stayeddeliveredforever once it reached the asker's session. On my bus, after the 0.2.7 restart, Ledger's session showsunread 72, and all 72 are replies in statedelivered; one of them arrived after the restart. 0.2.7 only covered replies handed over inside amurmur_wait.What changed
Store.markDeliveredis the one rule: a reply delivery (messages.is_reply = 1) that reaches delivered endsacknowledged, withacked_atset to the delivery time. Asks are unchanged. Every path goes through it: push proof, adapterdelivered, hook pull (pendingPush),read, and the wait handover, whose separatemarkAckedcall is removed.Store.openturns reply deliveries an older version left atdeliveredintoacknowledged(acked_at = COALESCE(acked_at, delivered_at)). It is idempotent and only runs where the store is opened:murmur initandmurmur serve.docs/concepts.md,docs/reference/protocol.mdand CHANGELOG[Unreleased]Changed.Issue
No issue filed. Found on my bus after the 0.2.7 restart.
How it was verified
expected 'delivered' to be 'acknowledged'(broker: a reply confirmed by an adapter; core: a reply handed over by the hook pull; store: markDelivered and the open-time update).npm run buildandnpm run coverage:Tests 522 passed (522), 100 percent on statements (2357/2357), branches (1327/1327), functions (438/438) and lines (2277/2277).tsc --noEmitexit 0, markdownlint 0 issues, no em or en dashes.murmur_send(no wait), so Y's reply was pushed into X and proven by X's transcript:PASS the reply pushed into X (no wait) ends acknowledged with a delivery time: {"recipient":"claude-murmur","state":"acknowledged","delivered":1,"acked":1}PASS murmur status shows X with unread 0: claude-murmur busy claude unread 0RESULT: PASSmarkDeliveredis the only writer ofdelivered, the PR No queued_delivered note for a reply handed over in the wait #14 notice rules key off the state before the update, a reply can still go fromacknowledgedtoreplied, andmurmur_ackon it is a no-op. One cosmetic point I left as is:core.readandpendingPushstill emitonStateChangewithto: 'delivered'for a reply that is nowacknowledged; the only consumer is a no-op insrc/cli.ts.Behavior changes
acknowledgedinstead ofdelivered, somurmur statusno longer counts replies as unread.murmur serve, existing reply rows atdeliveredbecomeacknowledged.