Repository navigation
docs(uds_protocol): writing pass for the reader - #89
Merged
JustinKovacich merged 2 commits intoOct 21, 2026
Merged
JustinKovacich merged 2 commits into
JustinKovacich merged 2 commits into
Conversation
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
2 times, most recently
from
October 21, 2026 13:32
9c784bc to
fa0f024
Compare
JustinKovacich
changed the base branch from
docs/writing-standard
to
docs/uds_session-writing-pass
October 21, 2026 13:32
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 13:41
fa0f024 to
16242c1
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 13:47
16242c1 to
c8aac3b
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:00
c8aac3b to
aee8f53
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:03
aee8f53 to
6b3a572
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:09
6b3a572 to
09401ba
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:11
09401ba to
169b95a
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:13
169b95a to
e712f20
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 14:21
e712f20 to
96f9592
Compare
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
2 times, most recently
from
October 21, 2026 14:54
ca5ab70 to
56086e6
Compare
Rewrite uds_protocol'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: incident narratives in test comments, "previously"/"used to" history and "deliberately" voice in rustdoc, and the notes to the next editor (load-bearing, must stay, measurement counts). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
JustinKovacich
force-pushed
the
docs/uds_protocol-writing-pass
branch
from
October 21, 2026 15:03
56086e6 to
eaacc7f
Compare
JustinKovacich
marked this pull request as ready for review
October 21, 2026 15:07
zheylmun
approved these changes
Oct 21, 2026
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.
Writing pass over
crates/uds_protocolto the "Writing for the reader" standard (CONTRIBUTING.md, #84, which this PR is stacked on). Prose only: rustdoc, comments, the Cargo.toml feature comments, the fuzz targets and one word in the README (whose intra-doc links are unchanged; it is also the crate doc). No code line changes: the non-comment lines in the diff are nine renamed test functions, three trailing comments removed from code lines, and two reworded assertion messages.Before / after (prose lint): hard-fail phrases 27 / 0 (one "load-bearing", ten first-person, sixteen "deliberately"); history 54 / 0; incident 5 / 0; editor instructions 2 / 0;
# Whyheadings 1 / 0; em-dash 108 / 0; comment blocks of 12+ lines 45 / 9. The nine that remain areError::negative_response_code's example and three-code mapping, the sixRequestFileTransfermode tables with their link definitions,DtcStatusMask's example and bit table, andAddressAndLengthFormatIdentifier's example.Test renames (nine, each a sentence of 12 or more words; none in a CI filter; every
prop_name kept): for examplea_tester_can_still_request_an_unmodeled_read_dtc_information_sub_functionis nowtry_reserved_builds_an_unmodeled_sub_function, and theSERVICESdoc that namedthe_variants_that_are_not_a_2020_request_service_report_no_sub_functionfollows its rename.Fixed while reading:
fuzz_roundtrip.rssaidRequesthas noPartialEq(it derives it); a doc comment describingwhole_recordswas attached toencode_by_dtc_number(moved); the upload/download$reprdoc calledAddressAndLengthFormatIdentifiercrate-private (it is public). The two "this doc is the published schema description" notes on the repr structs are now//comments, so they are not published.Removed, and the reasoning it held (this PR is its record; nothing is filed elsewhere):
Request::is_positive_response_suppressedreturnsOption<bool>: a wrongfalsefor a vendor request made a session layer starttP_Client, time out and retry twice. One sentence of this stays. CandidateRationale:for the need that owns SPRMIB reporting.has_sub_functionanswersNonefor the withdrawn0x83; whyallowed_nack_codesis a floor (clause 9.4;0x78is in no table; a whitelist would reject everyResponsePending), kept to one sentence; the full account of which codesnegative_response_codenever returns and why.modeled_framessets the SPRMIB on every sub-function service, and the dispatch test once asserted only!is_empty();assert_encode_size_agreesis not byte coverage (a swapped field pair once passed the suite).communicationTypebyte matched whole; manufacturerDTCSettingTyperanges rejected; a spuriouspowerDownTimebyte;0x82/0x8Afalling through toIsoSaeReserved; the missingDTCFormatIdentifier; the one-byte-too-large shortfall; the non-terminating partial-tail iterator; three missingRequestFileTransfercodes;NamePayload's mode field winning over the variant;TesterPresentnormalising reserved bytes to0x00; a 3-byte WDBI decoding to an empty record;0x7Fnormalisation of unmodeled SIDs. Each test now states the behaviour it pins and its ISO citation.tests/openapi_schema.rsexisted; the five serde escape routestests/public_api.rscloses, described in the present tense now; the mirror-struct cost (about a hundred lines for a one-field invariant); theutoipa-without-serdebuild that was tried.tests/spec_conformance.rs: the earlier comment's wrong claim about Tables 31, 38 and 47, and which tables' byte columns the markdown conversion garbled.DataFormatIdentifier::newuses explicit range checks (?in aconst fn);TryFrom<u32>over masking;new_with_alfidfor fixed-ALFID bootloaders (one sentence stays); a review probe that sent27 01; automotive-wire-codec finding SE-1.Issue URL
No issue; the pass follows the standard agreed in #84.
Testing
python3 tools/prose_lint.py crates/uds_protocol --fail --show 50exits 0 with every hard-fail row at 0; CI'sComment prosejob now runs--strict crates/uds_protocol.cargo fmt --all --check;cargo clippy -p uds_protocol --all-targets --all-features -- -D warnings;cargo nextest run -p uds_protocol --all-features(298 passed);cargo doc -p uds_protocol --all-features --no-depswith-D rustdoc::broken_intra_doc_links -D warnings.git diff -U0 ... | grep -vE '^[-+]\s*(//|#|\*|/\*|$)'prints only the renamed test functions, the three code lines whose trailing comments went, and the two assertion strings.🤖 Generated with Claude Code