Verify theme delivery in CI and define release policy (#25) - #29
Conversation
CI built the samples with --strict but never asserted the theme's assets reached the output, so a site linking to CSS or woff2 that were never emitted could still pass green. Releasing had neither a guard nor a stated policy: a tag whose installed surface matched the previous tag's still cut an empty-diff bump in every consumer, MAJOR/MINOR/PATCH had no documented meaning, and the published sample site showed unreleased state with no provenance. - Add scripts/verify-theme-delivery.py and run it in ci.yml after each sample builds. It reads extra_css and theme.logo from the resolved config and asserts, against the built site/ directory, that every stylesheet, the logo, and the six shipped woff2 faces landed and that the deliberately excluded paths did not. - Add scripts/check-release-surface.sh and gate release.yml on it. It resolves the previous tag by MAJOR.MINOR.PATCH order and fails when the release surface is byte-identical, passing when no predecessor exists. The release checkout now fetches full history and tags so the previous tree resolves. - Document the versioning policy in README and reference it from CHANGELOG; re-scope the CHANGELOG Unreleased section by consumer area (manual, api-reference, shared, scripts). - State in README that a consumer commits docs/theme/ and verifies its digest against docs/theme/.meta. - Stamp the built revision onto the sample landing page in docs.yml so the published preview is not mistaken for a released state. Closes #25
|
[Reviewer Round 1] Solid work — this closes all six scopes and the design choices match the issue's intent closely. A few observations, mostly minor; nothing I'd consider blocking. What holds up well
Minor points
Hygiene
Nice PR. |
|
[Review Verdict Round 1: APPROVED] |
Summary
Closes the two remaining delivery/release-safety gaps around the vendored theme and documents the release policy.
Verify theme delivery in built sitesstep in thebuild-htmljob runsscripts/verify-theme-delivery.pyagainst each sample's builtsite-ci/<name>directory. It readsextra_cssandtheme.logofrom the resolved config (so it tracksmkdocs-base.yml), asserts everyextra_cssentry, the logo, and the six shipped woff2 faces exist in the output, and asserts the deliberately excluded paths (theme/pdf/,theme/mkdocs-base.yml,theme/build-docs-pdf.sh,theme.toml) are absent. The check runs against the real builtsite/, not a re-run--strictbuild.Guard release surfacestep inrelease.ymlrunsscripts/check-release-surface.sh, which byte-diffs the release surface (everythingfetch-theme.shinstalls plusfetch-theme.shitself) between the new tag and itsMAJOR.MINOR.PATCH-ordered predecessor and fails with an explanatory message when identical. It passes without comparing when no predecessor resolves. The checkout gainsfetch-depth: 0andfetch-tags: trueso the previous tag's tree is readable. This is an added gate; the release-notes extraction andgh release createstep are untouched.README.mdgains a## Versioningsection defining the no-v-prefixMAJOR.MINOR.PATCHtags, the MAJOR/MINOR/PATCH meanings, and that templates are not versioned separately;CHANGELOG.mdlinks to it.Unreleasedentries are regrouped under### manual,### api-reference,### shared, and### scriptswith all content preserved, and the intro note is updated. Release-notes extraction keys off## <version>headings only, so this is unaffected.README.mdnow states explicitly that a consumer commitsdocs/theme/(vendored, not git-ignored) and verifies the installed tree againstdocs/theme/.meta.docs.ymlstamps the built commit (short SHA + link, build date) onto the landing page footer, so the Pages deploy is not mistaken for installable released state.Test plan
scripts/install-samples.sh, build each sample, and confirm the delivery-assertion step passes against a clean build.extra_cssentry is missing from a sample's built site output.theme.logofile is missing from a sample's built site output.shared/fonts/).theme/pdf/,theme/mkdocs-base.yml,theme/build-docs-pdf.sh,theme.toml) appears in a built site.site/directory, not a re-run--strictbuild.README.mddocuments theMAJOR.MINOR.PATCH(novprefix) policy with the MAJOR/MINOR/PATCH definitions and states templates are not versioned separately.README.mdstates a consumer commitsdocs/theme/and verifies its digest againstdocs/theme/.meta.CHANGELOG.mdgroups entries under### manual,### api-reference,### shared, and### scripts, with the previousUnreleasedcontent preserved.Closes #25