Repository navigation
feat(uds_services, uds_on_ip): mutable transport and entity access between events - #93
Conversation
JustinKovacich
left a comment
There was a problem hiding this comment.
Stack review of #92–#96, this PR's part: 3 Required, 2 Question, 1 Optional.
Gate: fmt clean; clippy pedantic 0 hits; all tests pass; cargo hack workspace powerset clean (neither changed crate has features); cargo doc with -D missing_docs clean; the size check matches the re-recorded baseline (text 55688, data 9560, bss 156, main frame 1552).
Skills run for this review: rust-quality-gate, rust-principles, rust-api-design, rust-embedded, rust-design-review (change-scoped), /code-review, writing-for-customers.
f549b90 to
00e106d
Compare
JustinKovacich
left a comment
There was a problem hiding this comment.
Every point from the first round is fixed:
entity_mutis replaced byDoIpTransport::start_discovery, behind theconnectionfeature.transport_mutisNonewhile a session change or reset awaits its confirmation, with a test.- The probe's
run-timeconfiguration keepsjust sizemeasuring a server built inmain. check_size.pycountsdataas flash.- The changelog qualifier is back.
One effect lands in #96: uds_c now needs uds_on_ip's connection feature, which crates.io does not have yet. #96's package job now packages the two together (03de923).
No comments.
Gates at this head, run locally: cargo fmt --check, clippy pedantic on the workspace (0 hits), cargo test --workspace --all-features, the cargo hack powerset (depth 2), cargo doc with -D missing_docs and broken links denied, and just embedded with both size baselines. All clean.
Skills: rust-quality-gate, rust-principles, rust-api-design, rust-embedded, rust-design-review (change-scoped) and writing-for-customers. /code-review not run: the fixups are small, and I read each line by hand.
Security Audit is red on main too (RUSTSEC-2026-0110 and RUSTSEC-2026-0386), so its failure here is not this PR's.
…tween events Server::transport_mut and DoIpTransport::entity_mut let a target that builds its server in place as a static configure the entity before the first step, starting the discovery of one built by Entity::new_discovery_later once it knows its identity. Each says what must not change while a response awaits its confirmation. The embedded probe builds its server that way, in a ConstStaticCell, as the sensor does: main's frame drops from 9216 to 1552 bytes, and the server's 9560 bytes move from bss to data, an initializer image in flash. The baseline records it.
…cess between events
…cess between events
…cess between events
…cess between events The probe's run-time configuration builds the server in main, and size-baseline-run-time.json records it: text 56564, data 0, bss 9716, main frame 9200. The default configuration's baseline is unchanged.
…cess between events
…cess between events
00e106d to
26ddf51
Compare
… its response (#94) A session change asks the application to prepare it before the positive response, with the active and target sessions, and the application can refuse it or answer pending; `MAY_RESPOND_PENDING` becomes required, so this is a breaking change for implementers of `DiagnosticSessionControl`. A change that was prepared but not made (refused later, unconfirmed, link closed, tS3 first, mid-request transport error, step dropped) is reported through `abandon`, on `DiagnosticSessionControl` and `EcuReset`, empty by default; `EcuReset::reset` also gets the active session. `Server::step` and `run` return a `StepError`: `Recoverable` where the transport failed between requests, keeping a change that awaits its confirmation and letting the server be stepped again, `Terminal` otherwise. Depends on #93. ## Issue URL Towards luminartech/halo#5100 ## Testing Run on this branch with the commits of the PRs below it, each commit alone and on the stack's top: - tool self-tests, `validate`, `governance`, the Sphinx needs build, and prose (plain and CI's `--strict crates/uds_c`) - `cargo test --workspace --all-features`; clippy on the host and for `thumbv7em-none-eabihf` - `just embedded` builds on 1.91 for both targets and the size check (matches the baseline) - `cargo doc` with `-D warnings`; `pre-commit run --all-files` - On the stack's top also the uds_c Miri job from `ci.yml` and `cargo package -p uds_c --no-verify`
A server's transport can be reached mutably between events (
Server::transport_mut,Nonewhile a response awaits its confirmation), andDoIpTransport::start_discoverystarts the discovery of an entity built as a static, so an application can start discovery on the server it already owns.start_discoverysits behinduds_on_ip's new off-by-defaultconnectionfeature. The embedded probe also measures a server built at run time, against its own size baseline.Depends on #92.
Issue URL
Towards https://github.com/luminartech/halo/issues/5100
Testing
Run on this branch with the commits of the PRs below it, each commit alone and on the stack's top:
validate,governance, the Sphinx needs build, and prose (plain and CI's--strict crates/uds_c)cargo test --workspace --all-features; clippy on the host and forthumbv7em-none-eabihfjust embeddedbuilds on 1.91 for both targets and the size check (matches the baseline)cargo docwith-D warnings;pre-commit run --all-filesci.ymlandcargo package -p uds_c --no-verify