Skip to content

Validate meetup image sources at build time (#142)#144

Merged
alexwolson merged 9 commits into
mainfrom
validate-image-sources
Jul 4, 2026
Merged

Validate meetup image sources at build time (#142)#144
alexwolson merged 9 commits into
mainfrom
validate-image-sources

Conversation

@alexwolson

Copy link
Copy Markdown
Collaborator

Closes #142.

Adds _scripts/validate_images.sh (with _scripts/test_validate_images.sh), exposed as make validate and run on pull requests via ci.yml. It checks that every meetup's image: front matter resolves to a file in archives/images/events/, skipping external http(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.yml and make generate are untouched, so production deploys are never gated by this check.

What's here

  • _scripts/validate_images.shset -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.
  • Makefilemake validate target (kept out of make generate).
  • .github/workflows/ci.ymlValidate meetup image references step on PRs to main, between generate and build.
  • Docs in README.md / CLAUDE.md, plus the design spec and implementation plan under docs/superpowers/.

Dependency / sequencing

This check correctly fails on the pre-existing #549 (hacknight_549.avif) until #141 (CivicTechTO/archives#26) is merged and the archives submodule pointer is updated. The red Validate meetup image references check 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

alexwolson and others added 8 commits June 28, 2026 11:11
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>
@alexwolson alexwolson requested a review from Khasir June 28, 2026 17:32
@alexwolson

Copy link
Copy Markdown
Collaborator Author

Note that the failing check above is demonstrating that this PR works as intended.

@Khasir Khasir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
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.

@alexwolson alexwolson merged commit 864cb23 into main Jul 4, 2026
6 checks passed
@alexwolson alexwolson deleted the validate-image-sources branch July 4, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate meetup image sources at build time to catch missing files early

2 participants