Skip to content

Close the scribble coverage gap and make documentation drift fail CI - #232

Merged
turinglambdaai merged 1 commit into
mainfrom
docs/coverage-and-anti-rot
Oct 13, 2026
Merged

turinglambdaai merged 1 commit into
mainfrom
docs/coverage-and-anti-rot

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

Why

Library docs rot silently: a new export lands without a manual entry, a release forgets to bump the pinned version in the guides, a rename leaves stale entries behind — and every check stays green because nothing compares docs to reality. This PR closes the current gap and installs the guards that keep it closed.

What

Coverage — every public export now has a manual entry, contracts taken from the module sources:

  • New "RVT1 Framing and the Value Codec" section: rivet/protocol was a fully public module with zero documentation (frame struct, read-frame/write-frame, encode-value/decode-value, the four transport limits, all seven message-type constants).
  • New "Application Resources" section for rivet/resources.
  • Distribution additions: SemVer predicates (version<? through version>?), the Ed25519 key/digest/base64 primitives, manifest-schema-version + manifest->payload-bytes/payload-bytes->manifest, verify-update-artifact!, make-install-plan, current-install-kind.
  • Missing singles: current-rivet-diagnostic-sink (with the embedded-console rationale), install-crash-hook!, updater? (its absence was the manual's one undefined-tag warning; render is now warning-free).

Anti-rot guards (tests/documentation.rkt):

  • The docs/ci*.md pin check derives the expected tag from info.rkt release-version. The previous check hardcoded v0.8.0, so it kept passing while the guide went stale — the guard itself was enforcing rot. Guides bumped to v0.8.1.
  • Scribble coverage in both directions: a public export with no manual mention fails (identifier-boundary matching; defstruct* forms synthesize constructor/predicate/struct:/accessors exactly as the rendered output covers them, mirroring rendered-HTML verification), and a defproc/defthing/defform/defparam entry for a binding that is no longer exported fails.

Testing

raco test tests/documentation.rkt 560 passed, tests/public-api.rkt 9 passed, raco setup renders the manual with zero undefined-tag warnings, and rendered HTML spot-checks confirm the new sections are live (arrow/angle identifiers verified via their HTML-escaped forms).

Documentation rots when nothing checks it. Two moves, paired:

Coverage: document every public export that had no manual entry — the whole
RVT1 framing and value-codec surface (rivet/protocol: frame struct,
read/write, encode/decode, transport limits, message-type constants),
application resources (rivet/resources), current-rivet-diagnostic-sink,
install-crash-hook!, the SemVer predicates, the Ed25519 key/digest/base64
primitives, canonical manifest payload helpers, verify-update-artifact!,
make-install-plan, current-install-kind, and the updater? predicate whose
absence produced the manual's one undefined-tag warning. Contracts are
taken from the module sources, not invented.

Anti-rot guards in the docs suite: the CI-guide version pin is derived from
info.rkt so a release that forgets docs/ci*.md goes red (the old check
hardcoded v0.8.0 and passed forever against a stale guide), and scribble
coverage is checked in both directions — an export without a manual mention
fails, and a manual entry for a removed binding fails. defstruct* forms
synthesize their constructor, predicate, structure-type binding, and
accessors exactly as the rendered output covers them.
@turinglambdaai
turinglambdaai merged commit fbb82a2 into main Oct 13, 2026
23 checks passed
@turinglambdaai
turinglambdaai deleted the docs/coverage-and-anti-rot branch October 13, 2026 05:28
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