Skip to content

docs(uds_services): writing pass for the reader - #90

Merged
JustinKovacich merged 2 commits into
docs/uds_protocol-writing-passfrom
docs/uds_services-writing-pass
Oct 21, 2026
Merged

JustinKovacich merged 2 commits into
docs/uds_protocol-writing-passfrom
docs/uds_services-writing-pass

Conversation

@JustinKovacich

Copy link
Copy Markdown
Contributor

Writing pass over crates/uds_services to the "Writing for the reader" standard (CONTRIBUTING.md, #84, which this PR is stacked on). Prose only: rustdoc, comments, the Cargo.toml comments and the README. No code line changes and no test renamed; identifier.rs and encode.rs had nothing to change.

Before / after (prose lint): hard-fail phrases 8 / 0 (one "load-bearing", five "deliberately", two ticket references); history 5 / 0; em-dash 448 / 255 (every one in a touched sentence); comment blocks of 12+ lines 103 / 70. The 70 that remain are the uds_server! and uds_client! macro docs with their doctests and compile_fail blocks, the crate overview, the Encode/Sink re-export example, the UdsTransport obligation list, the pipeline's Figure 5 stage list and Table I.2 bullets, and the per-method contracts (# Arguments, # Errors, # Cancel safety) of the thirty Client calls, Server::new/step/run, and every service-trait handler; the narration inside them was cut, the sections stay.

Fixed while reading: the README said "the transport binding is an optional feature", which contradicted the crate doc and Cargo.toml (no features; the application names the binding). The crate doc and README pointed readers at test files that do not ship in the crate's rendered docs; those references are gone.

Removed, and the reasoning it held (this PR is its record; nothing is filed elsewhere):

  • Why a server has three buffers (the handler borrows the in-flight buffer, so the driver waits on the concurrent one to see the tP2_Server deadline) and a client two (a repeat re-sends the encoded request while the caller holds the response). Candidate Rationale: for UDSSVC_ARCH_0017/0041.
  • Why EMPTY is an associated const (trait methods cannot be const), the ConstStaticCell versus StaticCell::init versus plain static choices, and the 8,824-byte frame measurement cross-referenced from uds_on_ip.
  • The tracking issue for a terminal Err and step's cancel safety (uds_stack#19), and the "milestone-1 limit" framing on six items; the behaviour statements stay.
  • Why peers = 1 only (one slot for a selecting response awaiting confirmation), kept to one sentence. Candidate Rationale: for UDSSVC_ARCH_0040.
  • reply_address is physically addressed by observation rather than by a clause of ISO 14229-2 9.6 (UDSS_LLR_0026); the driver as "the component no standard describes, which went a design cycle with no owner"; the Deferred::merge ordering argument in full.
  • Clause 8.7.5's pseudo-code agreeing with the stage order (UDSSVC_ARCH_0006); why the pipeline takes no context struct (UDSSVC_ARCH_0035); why assembly is a macro and not a blanket impl, the $ty:ty follow-set note, and the rustfmt 1.9.0 non-convergence detail (UDSSVC_ARCH_0013).
  • The arguments for the transport seam's shape: a subslice rather than a length, a DataTooLong variant rather than a flag, why Debug is the one error bound, why there is no inbound_max, why Closed is an edge. The contracts stay.
  • Why select2 is private; the seal's "lock, not a wall" account and the derivation argument; why service traits have no defaults and MAY_RESPOND_PENDING none; the per-service motivations behind each MAY_RESPOND_PENDING (a flash write, a routine, an erase).
  • Session, security, transfer, DTC and routine trait detail that explained rather than specified (the four-state machine's "corrected topology", SecurityLevel's pairing arithmetic, Figure 30's three-methods argument, "open question 5", "decision 4").
  • Client docs: the storage-mirroring argument, why Records cannot fail step by step, the Option-versus-bool reasoning, the quoted 15.2.3.2 sentence, and two driver references to architecture open questions.
  • tests/composition.rs: the DTC_RECORD_LEN it replaced and the retyping of the handler seam; Cargo.toml: the alloc/std features once forwarded to uds_protocol.

Issue URL

No issue; the pass follows the standard agreed in #84.

Testing

  • python3 tools/prose_lint.py crates/uds_services --fail --show 50 exits 0 with every hard-fail row at 0; CI's Comment prose job now runs --strict crates/uds_services.
  • cargo fmt --all --check; cargo clippy -p uds_services --all-targets --all-features -- -D warnings; cargo nextest run -p uds_services --all-features (402 passed) and the doctests (13 + 3); cargo doc -p uds_services --all-features --no-deps with -D rustdoc::broken_intra_doc_links -D warnings.
  • git diff -U0 ... | grep -vE '^[-+]\s*(//|#|\*|/\*|$)' prints nothing: no code line changed.

🤖 Generated with Claude Code

@JustinKovacich JustinKovacich added documentation Improvements or additions to documentation No Issue PR has no linked issue; satisfies PR Description Lint labels Oct 20, 2026
@JustinKovacich JustinKovacich self-assigned this Oct 20, 2026
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch 2 times, most recently from 1d91800 to 52cecea Compare October 21, 2026 13:32
@JustinKovacich
JustinKovacich changed the base branch from docs/writing-standard to docs/uds_protocol-writing-pass October 21, 2026 13:32
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 52cecea to 41a94d6 Compare October 21, 2026 13:41
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 41a94d6 to 9574df6 Compare October 21, 2026 13:47
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 9574df6 to 064f89e Compare October 21, 2026 14:00
@JustinKovacich
JustinKovacich added this pull request to stack #91 October 21, 2026 14:03
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 064f89e to 1b76972 Compare October 21, 2026 14:03
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 1b76972 to 937921a Compare October 21, 2026 14:09
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 937921a to fbc7c98 Compare October 21, 2026 14:11
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from fbc7c98 to 73932ed Compare October 21, 2026 14:13
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 73932ed to c6eb366 Compare October 21, 2026 14:21
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from c6eb366 to 725e9a0 Compare October 21, 2026 14:23
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from 725e9a0 to df6680e Compare October 21, 2026 14:54
JustinKovacich and others added 2 commits October 21, 2026 11:02
Rewrite uds_services's rustdoc, comments and README to the standard in
CONTRIBUTING.md: each item states its contract in the present tense with at
most a sentence of rationale. Removed: milestone and tracking-issue notes,
arguments for designs the needs already record, and history of replaced
constants and features.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@JustinKovacich
JustinKovacich force-pushed the docs/uds_services-writing-pass branch from df6680e to 46b6f1b Compare October 21, 2026 15:03
@JustinKovacich
JustinKovacich marked this pull request as ready for review October 21, 2026 15:10
@JustinKovacich
JustinKovacich merged commit 6cf4d93 into main Oct 21, 2026
27 checks passed
@JustinKovacich
JustinKovacich deleted the docs/uds_services-writing-pass branch October 21, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation No Issue PR has no linked issue; satisfies PR Description Lint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants