Check the site before it is served #2

Merged
marcos-mendez merged 2 commits from ci/site-check into main 2026-09-26 18:50:19 -03:00
marcos-mendez commented 2026-09-26 18:44:46 -03:00 (Migrated from github.com)

The site had no gate. Nothing builds it, so a link that resolves to nothing,
an asset that was removed or an external link over plain HTTP went straight to
the public page with nobody in the way. It is the most visible repository in
the organization and the only active one with no required check.

tools/sitecheck.py does what a build step would have done: internal links
resolve, fragments name ids that exist (including on another page), every
referenced asset exists and every asset is referenced (counting the og:image
and twitter:image cards a crawler fetches), external links are https or
mailto, and each page has a language, a title and exactly one h1.

Two findings from the first run were real: the dark and one-colour marks were
served and referenced by nothing. guidelines.html now has a section for the
mark offering all four variants with the rules for using them.

Test plan

  • 37 tests, one per rule, each stated as the smallest page that breaks it.
  • The suite ends by running the checker over this repository, so the gate
    fails on a real broken link rather than only on a unit case.
  • tools/sitecheck.py 99 percent lines and branches, against the 95 the
    project asks of its own code.
  • python3 tools/sitecheck.py . exits 0 on this branch: 2 pages, 7 assets,
    0 findings.
  • After merge: make python / coverage required on main.
The site had no gate. Nothing builds it, so a link that resolves to nothing, an asset that was removed or an external link over plain HTTP went straight to the public page with nobody in the way. It is the most visible repository in the organization and the only active one with no required check. `tools/sitecheck.py` does what a build step would have done: internal links resolve, fragments name ids that exist (including on another page), every referenced asset exists and every asset is referenced (counting the `og:image` and `twitter:image` cards a crawler fetches), external links are https or mailto, and each page has a language, a title and exactly one h1. Two findings from the first run were real: the dark and one-colour marks were served and referenced by nothing. `guidelines.html` now has a section for the mark offering all four variants with the rules for using them. ## Test plan - 37 tests, one per rule, each stated as the smallest page that breaks it. - The suite ends by running the checker over this repository, so the gate fails on a real broken link rather than only on a unit case. - `tools/sitecheck.py` 99 percent lines and branches, against the 95 the project asks of its own code. - `python3 tools/sitecheck.py .` exits 0 on this branch: 2 pages, 7 assets, 0 findings. - After merge: make `python / coverage` required on `main`.
Sign in to join this conversation.
No description provided.