Skip to content

Fix classified inbox wake and peer delivery lifecycle#735

Merged
lukacf merged 3 commits into
mainfrom
codex/fix-classified-inbox-lost-wake
May 20, 2026
Merged

Fix classified inbox wake and peer delivery lifecycle#735
lukacf merged 3 commits into
mainfrom
codex/fix-classified-inbox-lost-wake

Conversation

@lukacf
Copy link
Copy Markdown
Owner

@lukacf lukacf commented May 20, 2026

Summary

  • fix classified inbox capacity waiting so send_classified_wait registers its wake before checking capacity and wakes senders on close
  • move Mob peer-message delivery out of the actor command loop so backpressured recipients do not wedge unrelated mob.handle.* calls
  • keep offloaded peer deliveries actor-owned with a bounded delivery lane, per-delivery cancellation, member/edge topology fences, and lifecycle cancellation on stop, complete, reset, destroy, and shutdown

Validation

  • ./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 --check
  • git diff --check
  • ./scripts/repo-cargo clippy -p meerkat-mob -p meerkat-comms --all-targets -- -D warnings
  • pre-push hook: changed-crates clippy, machine codegen verify, generated header audit, bridge ResponseStatus audit, Bazel freshness, workspace deterministic gate

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +3360 to +3362
Ok(plan) => {
self.spawn_peer_message_delivery(plan, reply_tx);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@lukacf lukacf force-pushed the codex/fix-classified-inbox-lost-wake branch from e7c03b6 to 59ebd32 Compare May 20, 2026 09:30
@lukacf lukacf merged commit 3abc5ae into main May 20, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant