Skip to content

fix(mesh-store): replay only delivery events that carry consumption evidence - #33

Merged
Mearman merged 1 commit into
mainfrom
fix/replay-consumption-evidence
Sep 9, 2026
Merged

fix(mesh-store): replay only delivery events that carry consumption evidence#33
Mearman merged 1 commit into
mainfrom
fix/replay-consumption-evidence

Conversation

@Mearman

@Mearman Mearman commented Sep 9, 2026

Copy link
Copy Markdown
Member

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:

  • room messages and DMsreadBy carries the reader;
  • room invites — the invited list carries pending-ness (accepted or declined removes it).

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.

…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.
@Mearman
Mearman marked this pull request as ready for review September 9, 2026 10:54
@Mearman
Mearman merged commit 57605c0 into main Sep 9, 2026
5 checks passed
@Mearman
Mearman deleted the fix/replay-consumption-evidence branch September 9, 2026 10:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-09T11:01:47.464387Z 1aa5179 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.25.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant