Skip to content

docs: thin the commentary back to what the code does not say - #4

Merged
mysma-9403 merged 1 commit into
mainfrom
docs/thin-the-commentary
Oct 11, 2026
Merged

mysma-9403 merged 1 commit into
mainfrom
docs/thin-the-commentary

Conversation

@mysma-9403

Copy link
Copy Markdown
Collaborator

The same pass as xtce-gs#9: the comments had drifted from describing the code to arguing
with the alternatives, and a doc over a test whose name is already a sentence says it twice.

The rule

  • a doc over a test that only restates the test's name goes;
  • a private item in src/ keeps its summary paragraph and loses the rest;
  • nothing public loses a line;
  • nothing under tests/ is touched — a comment there says why the case exists, which is the
    one thing the code beside it cannot say.

What is protected, by name: the reference implementation and the differential suite, the
no-panic gate, rounding, endianness and alignment rules, spec clauses, and recorded traps.

The first attempt at this cut roughly half again as much and was thrown away: a sample of what
it removed turned out to be the calibrator's summation order, which io::ErrorKinds are
transient on which source, and why the generated load uses the narrowest integer that spans a
field. Those are facts, not opinions, and the protection list grew until they survived.

190 comment lines go: a doc over a test that only said the test's name again,
and the second and third paragraphs of a private item's doc where they argued
with an alternative rather than describing the thing.

What was deliberately left alone, after a first pass cut too much and was
thrown away: anything naming the reference implementation, the differential
suite, a rounding or endianness rule, a spec clause, or a recorded trap — and
every doc under tests/, where the comment says why a case exists, which is the
one thing the code beside it cannot say. Nothing public lost a line.

179 tests, fmt and clippy clean.
@mysma-9403
mysma-9403 merged commit b814014 into main Oct 11, 2026
4 checks passed
@mysma-9403
mysma-9403 deleted the docs/thin-the-commentary branch October 11, 2026 11:18
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