Skip to the content.

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

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

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

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:

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

Open questions

The field reviewer (the reporting package’s maintainers) answered the draft’s five questions:

  1. Where the key lives. coverage.yaml. Settled as designed.
  2. Table or counts. One line per result with class, verified status and strength. Settled as designed.
  3. The digest line. Only for readme: summary, on the summary and its full page. Adopted above.
  4. URL without a committed copy. Allowed; “not checked offline” in the output is enough (a 3.5 MB verification.md committed at every refresh is not wanted). Settled as designed.
  5. 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:

  1. 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.