docs: fix TC18.txt citation drift in acf.rs/avtp.rs/can.rs doc comments (issue #164 batch 1) - #165
Merged
Merged
Conversation
Batch 1 of issue #164: re-verifies every TC18.txt line-number and table/figure-number citation in these three files' doc comments (///, //!, and adjacent // test comments) against the current canonical TC18.txt, individually — not a uniform line-shift. - src/acf.rs (worst offender per the issue): all ~18 citation instances re-verified. Table 15 -> Table 17 (the response-format table was renumbered, not just shifted), Table 27 -> Table 30 (error codes), one further mis-citation found and fixed (Table 30 -> Table 33 for the per-endpoint evt-field table). All numeric line citations updated (~70-line drift for early $11.2.1 material, ~380-400-line drift for $11.3/$11.4/$13.5 material). - src/avtp.rs: all 4 TC18.txt line citations updated (~68-line drift for $11.1 material, ~397-line drift for $12.8.2/$11.4.3 material). Table 16/17 (Discovery request/response) -> Table 18/19. - src/can.rs: all TC18.txt line citations updated (~416-420-line drift, confirmed). Table 54 -> Table 57 (CAN frame formats), Table 53 -> Table 56 (CAN functional configuration) - both genuine table-number renumbers, not just line shifts. Figure 39 -> Figure 40 (the file's own "Figure 39" citation pointed at what is now LIN's request-format figure; the fact it actually describes is Figure 40, CAN's own request format, already cited correctly elsewhere in the same file). One citation (Figure 40, lines 5842-5856) was already correct and left unchanged. Not resolved, deliberately left as flagged notes rather than guessed at (see PR description for full detail): - Figure 19/20 (acf.rs, avtp.rs): TC18.txt's own figure captions confirm these worked examples are now Figure 20/21, and the GBB worked example's payload/pad byte split changed content (RC4 revision, TC18.txt carries a 'Commented [BE39]' marker there) - not just a renumber. Left as-is because both files' own test function names (and crate::e2e's, out of scope for this batch) still embed 'figure_19'/'figure_20' - renumbering the prose alone would desync it from those identifiers. Flagged with explanatory notes in both files instead. - A handful of test function names (table_15_discriminants_..., ..._table_27_codes analog via table_54, etc.) still embed now-stale table numbers; their own doc comments/bodies are fixed, the identifiers are left alone since renaming a test fn is outside a citation-only fix. Doc-comment-only change: cargo build/cargo test unaffected (1168 tests pass, unchanged), no public API surface change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: SoundMatt <47545907+SoundMatt@users.noreply.github.com>
This was referenced Aug 20, 2026
docs: fix TC18.txt citation drift in discovery.rs/request.rs + mdio.rs:130 (issue #164 batch 3)
#167
Merged
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.
Summary
Batch 1 of issue #164: fixes TC18.txt citation drift in
src/acf.rs,src/avtp.rs, andsrc/can.rsdoc comments (the three worst offenders per the issue's audit). Method mirrors c-RCP #434: for everyTC18.txt line N/TC18.txt lines N-Mcitation (and everyTable N/Figure Nreference cited alongside one), the cited quote/fact was searched for in the current canonicalTC18.txtand the citation updated to its real, individually-verified location — not a uniform line-shift applied blindly. Doc-comment-only change: no behavior change, no.fusa-reqs.jsonchange, no test logic change.No other files were touched (
git diff --statconfirms onlysrc/acf.rs,src/avtp.rs,src/can.rschanged).Verification
cargo build: clean.cargo test --lib: 1168 passed; 0 failed (unchanged from before this change — doc-comment-only diff).cargo fmt --check: clean.bash scripts/api-snapshot-check.sh: could not run in this sandbox (rustup/nightly toolchain unavailable), but this diff touches only comments — no item signatures, visibility, or names changed, so the public API surface is unaffected by construction.git diff --statagainstmain: onlysrc/acf.rs,src/avtp.rs,src/can.rschanged.Before/after table — every citation changed
All "proof" grep commands below were run against the canonical
/Users/matt/Coding/SoundMatt/TC18.txt(6095 lines), never against any copy inside the repo.src/acf.rs
grep -n '<snippet>' TC18.txt)4071: 3 event bits evt[2:0] are used to control the usage of the byte_msg_payload.4072: 4 evt[3] is used to request an acknowledge. I.e. evt[3] = 1 requests acknowledge.1235: read_size/segment_num if op = 0 this is read_size, else segment_num1229: op 0b – indicates that the sender.../1230: 1b – indicates that the sender of this request does not expect a response with data2255: evt[3:0] = 0xF - acknowledge1223: rsv 00b(first occurrence, within Table 4's field block starting line 1219)2248: rsv 00b(within Table 17's field block)1219: acf_msg_type 0x0E (ABB message)2242: acf_msg_type 0x0E - ABB message without message_timestamp2243: 0x0D - GBB message, with message_timestamp2239: 7 In case responses include a timestamp, they are in ACF_GBB format, else in ACF_ABB format.2340:21 endpoint. When timestamping was not requested, then the ACF_ABB type format without time stamp shall be default for/2341:22 any data transmitted by the RC Server.2300:16 With evt[3:0] < 0x9 and err = 1 the response is an error-response indicating that the execution of the request failed.2331:14 ... message_timestamp = (AS_sec × 10^9 + AS_ns) mod 2^64 ...2266:10 Table 17: Usage of ABB/GBB message for responses(old "Table 15" caption at line 2210 is now a different table, "Usage of GBB message to cancel a single, specific request")3844: 9 Table 30: Error codes in responses(current "Table 27" is now "Responder QUEUE_config", unrelated content)evt_bits_2_to_0...test)4116: 7 Table 33: EP specific usage of evt-field— this comment always meant the evt[2:0] endpoint-behavior table, which was never "Table 30" under any numbering; "Table 30" is the unrelated error-codes table (see row 17)src/avtp.rs
1130:10 The corresponding NTSCF header in version 0 shall be used for RCP requests which shall be executed as soon as/1131:11 possible or under request specific conditions as well as for responses and acknowledge.2354:34 TSCF headers will only be sent by RC Clients, never by the RC Servers. The RC Server always uses NTSCF header and only3567:12 If neither a gPTP nor an IEEE1722 frame is found the received frame shall be discarded.2758:18 Table 18: Discovery request/2805:15 Table 19: Discovery responsesrc/can.rs
5842: 6 13.7.11.3 CAN EP request handling...5856: 9 Figure 40 – can request format5872:15 Table 57: can frame formats(table body starts line 5863 "CAN frame format / FrameFormat" header row)5870: Reserved 6/5871: reserved 75887:1 Sending remote frames is not supported. In case the CAN ID is 11bits, then it shall be right aligned in the CAN ID field.5859:11 The on-wire example shows "CAN data" with only 3 bytes. For CAN XL this can be up to 2054 bytes (2048 + 6, see below),5888:2 The "CAN data" field includes the additional data (RRS, SDT, VCID, AF (in total 6 bytes)- see ISO11898-1) needed for CANms/segment_num5860:12 which requires segmentation, which is supported by the fields "ms" and "segment_num".5767:10 • Bit rate settings for arbitration phase valid for CAN XL, CAN FD / CAN FD light and Classical CAN...5772:15 • usage of new PL (YES|NO) for CAN XL5836: 2 Table 56: can functional configuration; body from5795: 0x000C CAN bit time register 1 ...to5834: 0x003C receive filter 4 ...FrameFormat+ CAN ID in the first 32-bit word5852: FrameFormat CAN ID— current TC18.txt's own Figure 39 is now "lin request format" (5736:18 Figure 39 – lin request format), not CAN's; the fact this note describes is Figure 40, CAN's own request format (already cited correctly elsewhere in the same file, see row 1)Not resolved — flagged rather than guessed at
acf.rs,avtp.rs): TC18.txt's own figure captions confirm the ACF_ABB/ACF_GBB "worked example" figures both files describe are now captioned Figure 20 ("ACF_ABB under TSCF header (example)", line 4231) and Figure 21 ("ACF_GBB under NTSCF header (example)", line ~4256) rather than Figure 19/20. The ACF_ABB example's numbers (6 payload + 2 pad + 4-byte CRC32 = 20 bytes = 5 quadlets) are confirmed unchanged. The ACF_GBB example's own byte breakdown changed content, not just its number: it now shows 5 payload + 3 pad bytes (same 4-byte CRC32, same 28-byte/7-quadlet/acf_msg_length = 0x07total) rather than the 7 payload + 1 pad this crate's comments describe — TC18.txt carries aCommented [BE39]: 051RC4 - text and figure updatedmarker immediately after this figure, confirming a genuine RC4 content revision, not just a renumbering artifact.I deliberately left "Figure 19"/"Figure 20" as-is everywhere in both files rather than renumbering, because both files' own test function names —
acf.rs's golden-vector stub pointing atcrate::e2e::finalize_crc_trailer_matches_figure_19_worked_example/_figure_20_worked_example, andavtp.rs's ownntscf_header_matches_figure_20_worked_example/tscf_header_matches_figure_19_worked_example— still embed the old numbers. Renumbering the prose alone would desync it from those identifiers across files (crate::e2eis out of scope for this batch). I added explanatory notes in both files' doc comments recording this finding in full so it isn't silently lost; a follow-up that renames the affected test functions (inacf.rs,avtp.rs, andcrate::e2e) together should also renumber the prose.acf.rs'stable_15_discriminants_differ_by_exactly_the_message_timestamp, andcan.rs'sframe_format_wire_values_match_tc18_table_54/frame_format_from_u8_rejects_table_54_reserved_rows_6_and_7, still carry their original (now-stale) table numbers in their Rust identifiers. Their doc comments/bodies are fixed to the correct current table numbers (Table 17, Table 57); the identifiers themselves are left untouched since renaming a test function is outside the scope of a citation-only fix (and isn't itself a "citation"). Both are flagged with inline notes at their point of use.Scope confirmation
src/acf.rs,src/avtp.rs,src/can.rstouched — nodiscovery.rs,e2e.rs,gpio.rs,i2c.rs,lifecycle.rs,lin.rs,mdio.rs,pwm.rs,request.rs,timestamp.rs, or.fusa-reqs.jsonchanges (those are later batches / already fixed in fix: correct REQ-CMP-003/REQ-LIN-008 .fusa-reqs.json citation gaps #163).Closes part of #164 (batch 1 of remaining files).