0016: A summary README page block that links the full page
Status: draft. Author: drafted by the AI operations agent at Le Chen’s request, from a field report. Created: 2026-12-02. Revised: 2026-12-02, after one field review. Decided: (date and maintainer, once accepted or declined). Implemented in: (release).
Summary
Let a package choose, in coverage.yaml, a summary README page block instead of the full one. The summary
block keeps every section of today’s block except the per-result blocks, which become a table with one line per
result linking the full page; a long list of compared names is shortened to a count. The full page lives either
in the repository (a page --site page, which page --check keeps current) or on a published site (an https
URL, not checked offline). Both carry the same page digest and bound commit, so a reader can tell whether the
page they opened is the render the README describes. page --check (rule R1) accepts a current summary block.
This is for authors of paper companions whose full page is too large for a README.
Motivation
A field report (2026-11-30) from stratonovich-ham-second-moment-lean, a public paper companion with 118
results, on lean-pkg 0.30.1. lean-pkg page NAME --write appended the full page to README.md: 3,513,769
bytes, taking the README from 99 KB to 3.6 MB, more than the repository’s front page displays. The maintainer
chose not to commit it, so page NAME --check stays STALE (exit 1) on R1: “README.md has no page block
(lean-pkg page NAME --write appends it)”. The package already publishes the full page from page --site on its
gh-pages site (verification.html, coverage.html).
Where the bytes are, measured by the package’s maintainers: the per-result section 3,161,549; How this was checked 348,208, of which 331,658 are one line, Smoke checks (not results), naming all 3,270 theorems of a helper comparator configuration; everything else about 4 KB.
Today there is no way out. --site and --html write the full page elsewhere, but the README block is always the
full block, and R1 accepts nothing smaller. A large companion either commits an unreadable README or lives with a
failing page --check, which then hides any real staleness behind the expected failure.
Design
The key
coverage.yaml gains an optional top-level key page:
page:
readme: summary # full (the default) or summary
full_page: docs/verification.md # a committed page --site page, or ...
# full_page: https://chenle02.github.io/stratonovich-ham-second-moment-lean/verification.html
readme:fullorsummary. Absentpage, orreadme: full, means today’s behavior exactly.full_pageis required withreadme: summaryand refused withreadme: full. It is either a path relative to the package directory, ending in.mdor.html, to the pagepage --site DIRorpage --html PATHwrites, or anhttps://URL (no userinfo, no fragment) of that page as published.- Library packages (
kind: library) take the same key. coverage.yamlis not a build input, so changing the key keeps the receipts bound for a package with the docs-only opt-in (the field reviewer’s commit changing it was accepted as a docs-only descendant).
The summary block
Between the same lean-pkg:page markers, in the same order as today:
| Section | In the summary block |
|---|---|
| Verification at a glance | as today, plus one line: where the full page is (full_page, as a link), and the page digest line below |
| The paper’s results in Lean (Main results) | a table instead of the per-result blocks: number, title, class, and whether it is verified (with the conclusion strength of proposal 0010 when it is weaker or a special case), each row linking the result’s anchor on the full page |
| Not formalized | as today |
| What the checks establish | as today |
| How this was checked | as today, except that a list of more than 20 compared theorem names (the smoke-check line, any comparator line naming theorems) becomes a count and the configuration path, 3,270 theorems of comparator/comparator-helpers.json |
| Citation, License, Acknowledgments | as today |
For the reported package: the hand-written README (99 KB), the fixed sections without the long name list (about 20 KB) and a 118-line table (about 33 KB) give about 153 KB. With the name list kept it would be about 485 KB, too close to the size at which the front page stops displaying a README to be readable. The summary carries no new data: it is the full page with the per-result blocks folded into a table and long name lists counted.
Whether the count replaces long name lists in full mode too is open question 6.
Anchors
Each result block on the full page gets an explicit anchor from its row label, <a id="result-LABEL"></a>, so a
table line links FULL_PAGE#result-LABEL whatever renderer builds the site. Heading slugs differ between
renderers: on the reported site (Python-Markdown) 117 of 118 heading ids matched a GitHub-style slug, and the one
with < in its title did not.
The page digest
The digest is defined on one text: the verification.md that page --site writes, with the digest line itself
removed, whatever output the full page actually takes (--site, --html, a published site). The README block
and the site page differ today in their header and in some links, so “the full page’s Markdown” alone would be
ambiguous.
In summary mode only, the full page (verification.md, the --html file) and the summary block each carry one
line in How this was checked: Page digest: sha256:<hex> at commit <c12>. Packages without readme: summary
are unchanged, so no existing block goes stale.
What the line shows: that two pages are the same render of the same data. The commit alone does not: the
reported package’s pages rendered before and after one docs-only commit bind the same commit and differ (two
receipt rows and a site acknowledgement). What it does not show by itself: a hand edit that leaves the line
alone. Only a checker that recomputes the digest from the published page’s Markdown (site check --live,
proposal 0012) detects that.
receipt check reads neither the line nor the table: its page checks (commit, pins, evidence, trust boundary)
read sections the summary keeps unchanged.
page --write and page --check
page --writewrites the summary block whenreadme: summary. Withfull_pagea path, it also writes that page, so the two are written together; with a URL it writes the README only and printsnext: publish the full page at URLwith the--site/--htmlcommand.page --checkwithreadme: summary: R1 is met by a current summary block. Withfull_pagea path, the full page is checked too, as--site/--htmlare today, and a stale or missing one fails. With a URL, the output says in one linefull page: URL, not checked offline; site check --live checks it, and the check does not fail for it.page --jsongainsreadme_mode(fullorsummary),full_pageandpage_digest.publishdoes not require a URLfull_pageto answer: a site is usually deployed after the README commit. It warns when the full page is a URL, namingsite check --live.
Cost
The digest needs the full page, so page --check renders it even in summary mode. On the reported package a full
render took 9 min 44 s with a local memoizing wrapper, and the stock 0.30.0 --site render was stopped after
3 h. That cost is today’s, in full mode too; it is tracked as its own performance issue (the wrapper’s caches are
offered as a starting point) and is not a reason to drop the digest.
Compatibility and migration
- Schema string.
coverage/1stayscoverage/1. Like proposals 0010, 0011 and 0015, this widens what the version accepts without changing anything it accepted before. A file withoutpageis checked and rendered exactly as today. - Older lean-pkg. A file with
pageis refused by an older lean-pkg,unknown key(s) page. That is loud, not silent; such a package needs the release that ships this, recorded in itslean_pkg_version. - Migration command. None: no existing file changes meaning.
- Goldens.
page --jsonandcoverage check --jsongain keys. No existing page text golden changes.
Trust model
What a receipt proves, and what gate, promote, publish and index check accept, do not change.
What changes is where a reader finds the Lean statements. The page’s first instruction is that the reader compares each paper statement with its Lean statement. In summary mode those statements are not in the README; they are on the full page. What could mislead:
- A missing, stale or different full page. With a path,
page --checkfails as for--sitetoday. With a URL, nothing offline checks it: the published page may be missing or from another render. The digest line on both pages shows a different or older render to a reader who compares the lines, and tosite check --live. A hand edit that keeps the line is caught only by recomputing the digest (site check --live). The summary states where the statements are and never says they were checked against the site. Whether readers follow the link and compare is unknown. - A summary that says more than the full page. The table is generated from the same data as the full page, and its verified and conclusion-strength words are the full page’s. A test pins that each table line’s status equals the status of the same result on the full page.
- Hiding a weak result in a table. The conclusion strength of proposal 0010 is shown in the table, and Not formalized stays whole in the README.
- A counted name list. The count and the configuration path say what was compared; the names stay in the
configuration file and the comparator receipt, which
receipt checkreads.
Tests to pin it: the summary and full page carry the same digest and commit; the digest is computed on the
--site text with its own line removed; R1 accepts a current summary and refuses a stale one; a path
full_page that is stale fails page --check; a URL full_page never fails it and is named in the output; every
result block on the full page has its result-LABEL anchor and every table line links one; a weaker or
special-case result shows its strength in the table; a list of more than 20 names is counted in summary mode;
readme: summary without full_page, and full_page with readme: full, are refused by coverage check.
Alternatives
- Fold each result into a
<details>element. The README stays as large (3.6 MB in the field report), and the size, not the length on screen, is what keeps it from displaying. - A command-line flag only (
page --write --readme summary).page --checkandreceipt checkneed the mode without a flag, so it has to be committed. A flag could still be added as a shortcut that writes the key. - The key in
lean-pkg-binding.yaml. That file is a build input, so changing the README mode would unbind the receipts.coverage.yamlis not a build input and already holds what the page says. - Shorter Lean statements on the page. The page shows the comparator’s Challenge statements, printed whole (#454) so that they round-trip; a page whose statements are elided is not one a reader can compare.
- The digest line on every page. It would let any reader match a site to a README, but would make every existing block stale at the upgrade; only summary-mode packages need it.
- Leave R1 failing for large packages. That is today’s workaround. It turns
page --checkinto a check that is expected to fail, so a real stale block goes unnoticed.
Open questions
The field reviewer (the reporting package’s maintainers) answered the draft’s five questions:
- Where the key lives.
coverage.yaml. Settled as designed. - Table or counts. One line per result with class, verified status and strength. Settled as designed.
- The digest line. Only for
readme: summary, on the summary and its full page. Adopted above. - URL without a committed copy. Allowed; “not checked offline” in the output is enough (a 3.5 MB
verification.mdcommitted at every refresh is not wanted). Settled as designed. publish. Warn, do not block. Adopted above.
The review also asked for four changes, folded into the design: count long name lists (the 331 KB smoke line), define the digest on one text, correct what the digest detects, and emit explicit anchors. The render cost it measured is noted under Cost.
Still open:
- Counting long name lists in full mode too. A full page with a 331 KB line is as unreadable on a site as in a README; counting above 20 names in every mode would change existing pages (one re-render each).
Separate from this proposal, the review found that the smoke-check line’s fixed sentence (“it states nothing of this package and verifies no result on this page”) is false when a smoke configuration’s theorems are the package’s own helper claims. That is tracked as its own defect.
AI assistance
Drafted and revised by Claude Code (the AI operations agent) at Le Chen’s request, from the field report and the
field review quoted above, docs/page.md, the page renderer (page.py) and the page checks of receipt check.
The maintainer reviews and decides.