Skip to content

Add scripts/check_pages.py: optional consistency checker for README and constant pages - #256

Merged
teorth merged 1 commit into
teorth:mainfrom
JeetuSK0808:add-page-checker
Oct 26, 2026
Merged

teorth merged 1 commit into
teorth:mainfrom
JeetuSK0808:add-page-checker

Conversation

@JeetuSK0808

@JeetuSK0808 JeetuSK0808 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

A small optional checker, python3 scripts/check_pages.py, for the defects that CONTRIBUTING describes and that have needed manual fixes after merges. Pure Python 3 standard library, no CI added. Contributors can run it before opening a PR, or you can ignore it.

What it flags:

  • E1/E2: README rows that link a missing page, or duplicated rows
  • E3: a constant page with no "## References" heading
  • W1: a README bound value with no matching number on the page (stale cell or typo). It allows last-digit rounding and skips values written only as fractions or closed forms.
  • W2: "_" or "*" inside inline $...$ that kramdown will pair into emphasis
  • W3: a bare "|" in inline math in a block that kramdown will render as a table
  • I1: a page not linked from the README

How it was checked:

  • The W2/W3 rules were calibrated against kramdown itself (GFM input, mathjax engine, as on GitHub Pages).
  • Over every historical version of every page, W2 finds all 27 lines that ever rendered with broken inline math. It also flags 2 more historical lines that kramdown really does break but a simple render check had missed, and nothing else. Neither line is on the current pages.
  • It flags exactly the problem at the commit just before each of three recent manual fixes:
  • On current main it reports only the three 1d paragraphs that render as tables, which 1d: stop three paragraphs rendering as tables (bare | in inline math) #254 fixes, and nothing else.

Prepared with Claude Code (Anthropic).

🤖 Generated with Claude Code

…nt pages

Flags duplicated or dangling README rows, pages without a References heading, README bound
values with no matching number on the page, inline math that kramdown will turn into emphasis,
and bare "|" in inline math that makes kramdown render a block as a table. Pure Python 3
standard library. Exit status 1 only on errors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
teorth added a commit that referenced this pull request Oct 26, 2026
…\rvert

When I wrote this comment during the #198 merge, a shell heredoc turned the
two "\rvert" into carriage returns, which a later write promoted to real
line breaks. The table row had been three lines since, so the row rendered
as one cell plus two stray paragraphs.

Also the reason the arity check missed it: 15 of the repository's rows
legitimately omit the trailing pipe, so a count of "rows with the wrong
number of pipes" has a standing baseline and a new break hides in it. The
checker in #256 compares against the page structure instead, which is one
more reason to take it.

Co-Authored-By: Claude Opus 5 <[email protected]>
@teorth
teorth merged commit 345e2be into teorth:main Oct 26, 2026
teorth added a commit that referenced this pull request Oct 26, 2026
The new page landed without its index row, which the checker from #256
flags as I1. Lower bound 44* (Lean proof, asterisked as the page has it),
upper bound 615999 from Balister-Bollobas-Morris-Sahasrabudhe-Tiba.

Co-Authored-By: Claude Opus 5 <[email protected]>
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