Fix classified inbox wake and peer delivery lifecycle#735
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7c03b657a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Ok(plan) => { | ||
| self.spawn_peer_message_delivery(plan, reply_tx); | ||
| } |
There was a problem hiding this comment.
Preserve command order for peer send versus topology changes
Offloading SendPeerMessage to a background task here breaks actor-mailbox ordering guarantees: the actor can now process later commands (for example Unwire/Retire, which remove trusted peers) before the previously accepted send actually executes. That makes a send issued while members are still wired fail nondeterministically with trust/peer-not-found errors depending on timing, whereas the previous in-loop await serialized these operations. This is a behavioral regression for callers that rely on command order in a single mob handle.
Useful? React with 👍 / 👎.
e7c03b6 to
59ebd32
Compare
Summary
send_classified_waitregisters its wake before checking capacity and wakes senders on closemob.handle.*callsValidation
./scripts/repo-cargo test -p meerkat-comms classified_send_wait -- --nocapture./scripts/repo-cargo test -p meerkat-mob peer_message_delivery -- --nocapture./scripts/repo-cargo test -p meerkat-mob peer_message -- --nocapture./scripts/repo-cargo fmt --checkgit diff --check./scripts/repo-cargo clippy -p meerkat-mob -p meerkat-comms --all-targets -- -D warnings