Skip to content

fix(gallery): gate committed gallery drift in CI and prune stale pages - #211

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/site-hygiene
Sep 23, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
fix/site-hygiene

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Four gallery hygiene defects from the Pages review (#208, #209) that were out of scope there. The main one: docs/gallery/ is committed, but pages.yml regenerates it at deploy time, so a stale commit ships fine and drifts silently. Nothing checked it.

Type

  • feat
  • fix — generator and CI correctness
  • docs / chore / ci / refactor

Changes

  • validate.yml: new step "Check committed gallery matches its generator". It runs scripts/build_gallery.py and fails on any git status --porcelain -- docs/gallery output.
  • build_gallery.py: deletes the page folder of a renamed or removed entry. Only folders holding a lone index.html and matching no entry are removed, so assets/, contact-sheets/ and asset-sheets/ are safe.
  • Removed: docs/gallery/assets/signpost-preview.webp and wall-torch-preview.webp. Nothing in docs/, examples/, showcase/, scripts/ or README.md referenced them, yet both were published.
  • examples/gallery.json: the tag filter offered both render (3 uses) and rendering (9), and both transform (1) and transforms (2). Merged into the majority spelling on sky-texture-sun-elevation, prop-origin-transform, lightmap-uv-channel and vertex-color-ao. The file round-trips byte-identically through json, so only those 4 lines changed.

Evidence

  • live-run-proven (local, no Blender):
    • Drift step falsified: prefixing one teaches string with PROBE without regenerating makes the step fail, reporting M docs/gallery/index.html and M docs/gallery/swatch-grid/index.html. After restoring, it passes and the tree is clean.
    • Stale-page removal: a planted docs/gallery/zz-stale-probe/index.html is removed (Removed stale page docs\gallery\zz-stale-probe), and the 79 real pages are rewritten unchanged.
    • Regeneration: the only generated change is docs/gallery/index.html (the two duplicate tag chips drop, 40 → 38).
  • Pending CI: this PR's own Validate run is the first run of the drift step on Linux. Committed output was generated on Windows; git normalizes line endings to LF, which is what Linux writes.

Checklist

  • Explicit paths only.
  • Counts unchanged; manifest untouched.
  • The new check was falsified once (above).
  • DCO Signed-off-by: present.
  • No credentials, emails, or local paths.

🤖 Generated with Claude Code

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>
@github-actions github-actions Bot added examples Runnable smoke-gated examples under examples/ documentation Improvements or additions to documentation ci labels Sep 23, 2026
@TMHSDigital
TMHSDigital merged commit 7e07b17 into main Sep 23, 2026
11 checks passed
@TMHSDigital
TMHSDigital deleted the fix/site-hygiene branch September 23, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation examples Runnable smoke-gated examples under examples/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant