feat(server): forward-port publish_raw_event_to + subscriber_addresses onto 0.8.0#135
Closed
JustinKovacich wants to merge 1 commit into
Closed
Conversation
JustinKovacich
force-pushed
the
feat/port_publish_raw_event_to_onto_0_8_0
branch
from
June 24, 2026 00:26
b78a0d7 to
385f44c
Compare
JustinKovacich
changed the base branch from
feature/phase18f_docs_and_0_8_0_finalize
to
feat/polled-port-onto-125
June 24, 2026 00:26
…s onto 0.8.0 Ports the two targeted-delivery EventPublisher methods released in v0.7.2 (8118fde) onto the 0.8.0 spine tip (feat/polled-port-onto-125). Hand-adapted to the post-#125 caller-scratch API rather than cherry-picked. - publish_raw_event_to_with_buffers: sends a raw (already-serialized, already-E2E-protected) event to ONE subscriber by endpoint, taking a caller-provided scratch buffer (guards keyed off buf.len(), the buf.len() < 16 floor, socket via SharedHandle::get()) — the same shape as the post-#125 publish_raw_event_with_buffers fan-out. - publish_raw_event_to: #[cfg(feature = "_alloc")] convenience wrapper that allocates UDP_BUFFER_SIZE scratch and delegates, mirroring publish_raw_event. - subscriber_addresses: lists an event group's subscribed endpoints into a heapless::Vec capped at SUBSCRIBERS_PER_GROUP (no_std-clean). Enables per-recipient delivery when subscribers share a (service, instance, event_group) key but bind distinct endpoints. Additive; existing fan-out unchanged. Semantics aligned with the fan-out path: a send failure to a SUBSCRIBED target surfaces Err(Error::Transport(_)) rather than the v0.7.2 Ok(0), so callers can distinguish "not subscribed" (Ok(0)) from "subscribed but send failed" (Err). Three tokio tests cover targeted delivery, the unsubscribed no-op, and address listing; verified green plus thumbv7em server,bare_metal / client,server,bare_metal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JustinKovacich
force-pushed
the
feat/port_publish_raw_event_to_onto_0_8_0
branch
from
June 26, 2026 03:02
385f44c to
a683029
Compare
Contributor
Author
|
Folded into #138. The 0.8.0 forward-port stack was consolidated via a linear rebase of the whole stack onto |
4 tasks
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.
Forward-ports the two targeted-delivery
EventPublishermethods released in v0.7.2 (8118fde) onto the current 0.8.0 spine tip (feat/polled-port-onto-125), so the 0.8.0 release doesn't regress them.What
publish_raw_event_to_with_buffers(target, …, buf)— sends a raw (already-serialized, already-E2E-protected) event to one subscriber by endpoint, taking caller-provided scratch. Same shape as the post-Reduce async state and static pool memory in simple_someip to prevent Embassy arena exhaustion #125publish_raw_event_with_buffersfan-out (guards keyed offbuf.len(), thebuf.len() < 16floor, socket viaSharedHandle::get()).publish_raw_event_to(target, …)—#[cfg(feature = "_alloc")]convenience wrapper that allocatesUDP_BUFFER_SIZEscratch and delegates, mirroringpublish_raw_event.subscriber_addresses(…)— lists an event group's subscribed endpoints into aheapless::Vec<_, SUBSCRIBERS_PER_GROUP>(no_std-clean).Enables per-recipient delivery when subscribers share a
(service, instance, event_group)key but bind distinct endpoints (multiple sensors on one subnet sharing a fixed instance id). Additive; existing fan-out unchanged.One deliberate semantic change vs v0.7.2
A send failure to a subscribed target returns
Err(Error::Transport(_))rather than the v0.7.2Ok(0)— matching the post-#125 fan-out path, so callers can distinguish "not subscribed" (Ok(0)) from "subscribed but send failed" (Err).Verification
cargo fmt -- --check— changed file is clean ✓cargo clippy --features server-tokio --tests— changed file is warning-clean ✓cargo nextest run --features server-tokio event_publisher— 23/23 pass (incl. 3 new) ✓cargo build --target thumbv7em-none-eabihf --no-default-features --features server,bare_metalandclient,server,bare_metal✓🤖 Generated with Claude Code