Skip to content

feat: per-source RX demux — source on Unicast + per-source E2E state#136

Closed
JustinKovacich wants to merge 3 commits into
release/0.7.2from
feat/rx-source-and-per-source-e2e
Closed

feat: per-source RX demux — source on Unicast + per-source E2E state#136
JustinKovacich wants to merge 3 commits into
release/0.7.2from
feat/rx-source-and-per-source-e2e

Conversation

@JustinKovacich

Copy link
Copy Markdown
Contributor

What

Two changes that let a single client attribute SOME/IP telemetry to a specific device on a shared subnet, correct under E2E:

  1. ClientUpdate::Unicast now carries source: SocketAddr. The source was already received (ReceivedMessage.source) but dropped via .. before forwarding. The SOME/IP header has no instance id, so on a shared subnet the source address is the only demux key.
  2. RX E2E counter state is keyed per source. E2ERegistry now holds endpoint-agnostic profile config + per-(source, key) receive state + per-key transmit state. check() takes the source; protect() is unchanged (fan-out keeps one counter; per-recipient TX counters live a layer up). A rebooted source's receive state is reset.

Downstream this unblocks per-sensor telemetry in iris_someip_client / EnVision / the ROS FFI (the consumer is feature/env_multisensor_rx_demux in dft).

Tests

  • unicast_update_carries_source
  • distinct_sources_have_independent_e2e_state (interleaved counters from two sources don't trip WrongSequence)
  • reset_source_clears_only_that_source
  • Full suite: 429/429 pass --all-features; clippy -D warnings -D clippy::pedantic clean; fmt clean.

⚠ Versioning decision needed (why this is a draft)

Adding a field to the Unicast struct variant is semver-breaking (ClientUpdate is not #[non_exhaustive]). So:

  • cargo-semver-checks will require a 0.8.0 minor bump (this is the 0.7.2 line; a 0.7.3 patch would fail the SemVer gate).
  • The feat: commits will make release-plz propose 0.8.0.

Intent was to ship as 0.7.3 off release/0.7.2, then forward-port into the 0.8.0 spine. Opening as draft to read the CI verdict before choosing: force a 0.7.3 patch (override the SemVer gate, internal-crate consumers) vs. ship 0.8.0 and reconcile with the existing 0.8.0 spine.

🤖 Generated with Claude Code

The SOME/IP unicast header carries no instance id, so on a shared subnet
the sender's source address is the only way to attribute an event to a
device. The source was already received (ReceivedMessage.source) but
dropped before forwarding; carry it on ClientUpdate::Unicast instead.
On a shared subnet, several devices send the same (service, method)
under one fixed instance id; a single per-key receive counter collides
their interleaved sequences into spurious WrongSequence. Split the
registry into endpoint-agnostic profile config, per-(source,key) receive
state, and per-key transmit state. check() now takes the source address;
protect() is unchanged. Reset a source's receive state on its reboot.
@JustinKovacich JustinKovacich self-assigned this Jun 24, 2026
@JustinKovacich

Copy link
Copy Markdown
Contributor Author

Folded into main via the 0.8.0 consolidation (#138). Content verified present in main; closing and deleting the branch as part of post-0.8.0 cleanup.

@JustinKovacich
JustinKovacich deleted the feat/rx-source-and-per-source-e2e branch June 29, 2026 20:40
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