Skip to content

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

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
Contributor

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.

51 comment lines go: docs over tests that only said the test's name again, and
the paragraphs of a private item's doc that argued with an alternative rather
than describing the thing.

Left alone: anything naming the no-panic gate, a rounding or alignment rule, a
spec clause or a recorded trap, and every doc under tests/, where the comment
says why a case exists. Nothing public lost a line.

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