Skip to content

test: fail when a size the readme claims stops being true - #195

Merged
isaacslee merged 1 commit into
mainfrom
test/sizes-the-docs-claim
Aug 6, 2026
Merged

isaacslee merged 1 commit into
mainfrom
test/sizes-the-docs-claim

Conversation

@isaacslee

Copy link
Copy Markdown
Member

Summary

The gate now checks that every KB figure in README.md is a size the built
package actually has. One stale present-tense sentence in ADR-0004 is corrected
to the past tense it was always describing.

Why

A sweep of the seventeen documents in this repository for claims that rot found
that the reader-facing sizes were correct and unguarded, and one decision-record
size had already drifted:

where said actually
README.md 53 KB / 621 KB correct — but nothing enforced it
ADR-0004 "the package is 924 KB" 905 KB

The failure mode is the one this project already paid for once. A number written
into prose is right on the day it is written and silently wrong afterwards,
because a sentence that reads like background is never re-read. That is the same
shape as the @font-face rename that looked done for three releases.

Everything else in the sweep came back clean: no broken relative links, no
reference to a file that does not exist, every external link resolves, and the
milestone claim in CONTRIBUTING.md is true (0 milestones, 7 releases).

How it was verified

  • npm run check — 27 checks pass, the new one reporting that it examined 2
    figures.
  • The new check was confirmed to fail rather than merely pass: moving the
    README's 53 KB to 54 KB produces
    readme sizes match the package: 54 KB matches nothing built — the package has 53 KB (the Latin subset), 568 KB (the Hangul subset), 621 KB (both subsets), 905 KB (the whole package). The README was restored and the gate re-run.
  • Sizes measured from a clean npm run build, not from a stale dist/.

Limitations

  • It checks KB only. A figure written in MB or bytes is not covered; the two
    the README states are both KB.
  • It cannot tell a wrong-but-plausible figure from a right one if the number
    happens to equal another part of the package — 53 KB would still pass if the
    sentence claimed it was the Hangul subset. It guards arithmetic, not meaning.
  • ADR-0003 and ADR-0004 carry other sizes that are decision-time records and
    are deliberately not checked; the amendment convention already covers those.

- the README tells a reader that a page with no Korean costs 53 KB and one
  with Korean 621 KB. both are right, and nothing would have caught them
  going wrong: a number in prose reads like background and is never
  re-checked, which is how the reserved font name survived three releases
- the gate now requires every KB figure in the README to be a size the built
  package actually has, and reads `dist/` rather than `src/`, since the
  source cannot say what a reader downloads
- ADR-0004 said "the package is 924 KB" in the present tense and it is 905 KB
  now. that line records what was weighed at the time, so it says "was, when
  this was decided" and is true permanently rather than approximately
- verification: 27 checks pass; moving one README figure by 1 KB fails the
  new check, and the message names every size the package actually has
Copilot AI lite review requested due to automatic review settings August 6, 2026 23:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@isaacslee
isaacslee merged commit 0f0f61d into main Aug 6, 2026
1 check passed
@isaacslee
isaacslee deleted the test/sizes-the-docs-claim branch August 6, 2026 23:46
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.

2 participants