Validate meetup image sources at build time (#142)#144
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Note that the failing check above is demonstrating that this PR works as intended. |
Contributor
Pa11y Accessibility Report✅ All pages passed — 0 warning(s) (WCAG2AA) Homepage✅ No issues found. Event✅ No issues found. Project✅ No issues found. Person✅ No issues found. Organization✅ No issues found. Venue✅ No issues found. Resource✅ No issues found. Tag✅ No issues found. Category✅ No issues found. |
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.
Closes #142.
Adds
_scripts/validate_images.sh(with_scripts/test_validate_images.sh), exposed asmake validateand run on pull requests viaci.yml. It checks that every meetup'simage:front matter resolves to a file inarchives/images/events/, skipping externalhttp(s)URLs, and exits non-zero on a missing source. This is the guard that would have caught #549 before it shipped.Scope is meetups only — projects use external image URLs and organizations'
image:is unrendered and lives in the main repo (see the design doc).pages.ymlandmake generateare untouched, so production deploys are never gated by this check.What's here
_scripts/validate_images.sh—set -euo pipefail,ARCHIVES_DIR-overridable, guards a missing meetups dir, skips empty/http(s)values, exits 1 on any miss._scripts/test_validate_images.sh— fixture-based tests: present→0, missing→1 (names the file), external-URL→0, CRLF→0. All pass locally.Makefile—make validatetarget (kept out ofmake generate)..github/workflows/ci.yml—Validate meetup image referencesstep on PRs tomain, between generate and build.README.md/CLAUDE.md, plus the design spec and implementation plan underdocs/superpowers/.Dependency / sequencing
This check correctly fails on the pre-existing #549 (
hacknight_549.avif) until #141 (CivicTechTO/archives#26) is merged and thearchivessubmodule pointer is updated. The redValidate meetup image referencescheck on this PR is the expected, correct signal that the guard works — not a defect to fix by weakening the check. CI goes green once the #549 fix is in the pinned submodule commit.🤖 Generated with Claude Code