Wire broker readiness notifications#992
Open
wdcui wants to merge 15 commits into
Open
Conversation
Add a paired host-side notification serving path that preserves control request/response sequencing while sending event readiness notifications over the notification channel. Add a broker-local notification receiver and a Unix-socket runtime test covering host emission through local consumption. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename generic control-channel parameters from Channel to ControlChannel so the host adapter remains consistent now that paired notification channels are part of the API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the control-only host serving path and route broker userland and runner integration through paired control and notification sockets. Keep the runner-side notification channel open with a receiver loop so host readiness notifications have a real local endpoint before eventfd blocking dispatch is added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the mandatory paired control/notification host serving entry point to serve_connection now that notification channels are no longer optional. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use an explicit shared ChannelError generic for paired control and notification channels so their host serving bounds stay symmetric. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route readiness notifications through per-association host connection state instead of passing the notification channel directly through the request loop. This makes the notification channel the connection-owned broker notification path and keeps room for future notifications that are not direct request-loop side effects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move readiness notification emission into the broker host event request handler so successful event state mutations trigger notifications at the event handling boundary rather than as request-loop postprocessing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Do not emit readiness notifications for event mutations whose control responses already carry the resulting readiness state. Keep the paired notification channel mandatory so broker-originated readiness updates without a paired control response have a channel when those sources are added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the broker host readiness-response test to drive the public paired serve_connection API. The fake channel now queues Add and Consume requests after observing the broker-assigned create handle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the private serve_request_loop helper into serve_connection now that tests exercise the public paired serving entry point directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the hidden runner control-channel argument from --broker-socket to --broker-control-socket so it matches the paired --broker-notification-socket argument. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the retained notification receiver thread handle to notification_receiver_thread and document that it is intentionally kept alive with the broker connection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the tuple match in runner broker connection setup with straightforward early returns while preserving errors for mismatched control and notification socket arguments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make runner broker::connect take concrete control and notification socket paths. The CLI layer now handles optional broker enablement and validates that hidden broker socket arguments are provided as a pair. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace separate control and notification socket retry loops with one connect_with_retry helper parameterized by the channel-specific connect operation and timeout message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🤖 SemverChecks 🤖 Click for details |
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.
Summary
BrokerNotificationsfor local notification receipt--broker-control-socket/--broker-notification-socketUnix endpointsNotes
BrokerCore/BrokerSessiontransport-neutralValidation
cargo test -p litebox_broker_hostcargo test -p litebox_broker_userland -p litebox_runner_linux_userland --test run test_runner_broker_integration_with_rewritercargo test -p litebox_broker_userlandcargo clippy -p litebox_broker_userland -p litebox_runner_linux_userland --all-targets --all-features -- -D warnings