fix(gallery): gate committed gallery drift in CI and prune stale pages - #211
Merged
Merged
Conversation
Found in a review of the Pages site: - docs/gallery/ is committed but regenerated at deploy, so a stale commit shipped fine and drifted silently. Validate now regenerates it and fails on any diff. - build_gallery.py never removed the page folder of a renamed or removed entry, so the old page stayed published. It now deletes folders that hold only a generated index.html and match no entry. - signpost-preview.webp and wall-torch-preview.webp in docs/gallery/assets were referenced by nothing and still published. - The tag filter offered both "render" and "rendering", and both "transform" and "transforms". Merged into the majority spelling. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four gallery hygiene defects from the Pages review (#208, #209) that were out of scope there. The main one:
docs/gallery/is committed, butpages.ymlregenerates it at deploy time, so a stale commit ships fine and drifts silently. Nothing checked it.Type
featfix— generator and CI correctnessdocs/chore/ci/refactorChanges
validate.yml: new step "Check committed gallery matches its generator". It runsscripts/build_gallery.pyand fails on anygit status --porcelain -- docs/galleryoutput.build_gallery.py: deletes the page folder of a renamed or removed entry. Only folders holding a loneindex.htmland matching no entry are removed, soassets/,contact-sheets/andasset-sheets/are safe.docs/gallery/assets/signpost-preview.webpandwall-torch-preview.webp. Nothing indocs/,examples/,showcase/,scripts/orREADME.mdreferenced them, yet both were published.examples/gallery.json: the tag filter offered bothrender(3 uses) andrendering(9), and bothtransform(1) andtransforms(2). Merged into the majority spelling onsky-texture-sun-elevation,prop-origin-transform,lightmap-uv-channelandvertex-color-ao. The file round-trips byte-identically throughjson, so only those 4 lines changed.Evidence
teachesstring withPROBEwithout regenerating makes the step fail, reportingM docs/gallery/index.htmlandM docs/gallery/swatch-grid/index.html. After restoring, it passes and the tree is clean.docs/gallery/zz-stale-probe/index.htmlis removed (Removed stale page docs\gallery\zz-stale-probe), and the 79 real pages are rewritten unchanged.docs/gallery/index.html(the two duplicate tag chips drop, 40 → 38).Checklist
Signed-off-by:present.🤖 Generated with Claude Code