fix(mesh-store): replay only delivery events that carry consumption evidence - #33
Merged
Merged
Conversation
…vidence Replay fired for every event merged from a snapshot, but transient notifications (room_members, member_joined, connection_request, delivery status) have no consumption evidence: replaying them could only ever duplicate-notify, bounded by a structural-key LRU whose eviction window admitted occasional re-fires. Replay now fires only for events whose consumption is observable: room messages and DMs (readBy carries the reader) and room invites (the invited list carries membership of a pending invite). Transient notifications still merge into the queue, so drain bridges see them, and the state they describe arrives through the synced room and agent records. This closes the replay re-fire hole exactly rather than bounding it, superseding the documented boundary on #28.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🎉 This PR is included in version 1.25.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Follow-up to #30, closing the replay re-fire boundary documented on #28 exactly rather than bounding it.
Replay fired for every merged queue event, but transient notifications (
room_members,member_joined,connection_request, delivery status) have no consumption evidence — replaying them could only duplicate-notify, and the structural-key LRU's eviction window admitted occasional re-fires for them. Replay now fires only for events whose consumption is observable:readBycarries the reader;Transient notifications still merge into the queue (drain bridges see them), and the state they describe arrives through the synced room and agent records — a returning bridge that cared about current membership reads the converged state rather than replaying a stale ping.
Tests cover: the invite replay-while-pending / no-replay-after-decline pair, and transient notification queue-merge-without-fire. Full suite 21 tests green, lint/typecheck/build clean.