Skip to content

Add PR validation workflow (schema check + export smoke test)#3

Merged
Hefrock merged 1 commit into
mainfrom
claude/intelligent-gates-2s4z93
Jun 19, 2026
Merged

Add PR validation workflow (schema check + export smoke test)#3
Hefrock merged 1 commit into
mainfrom
claude/intelligent-gates-2s4z93

Conversation

@Hefrock

@Hefrock Hefrock commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/validate-patterns.js: loads index.html and checks every PATTERNS entry against the schema documented in CLAUDE.md — required fields, valid cat/group/kind enums, members present when kind is set, no duplicate pattern names, and that every distinct statefulness value has a matching STATEFULNESS_INFO entry (so the hover tooltip from Add statefulness explanation tooltips #2 never silently renders empty)
  • Adds .github/workflows/ci.yml, triggered on every PR targeting main. Runs npm run validate, then npm run export:images and npm run export:pptx as an end-to-end smoke test of the real export scripts
  • Documents both in CLAUDE.md

Why

Until now there was no PR-time validation in this repo — deploy.yml only runs after merging to main. A real bug (the loop-pattern "Done" node clipping, fixed earlier) shipped past manual review and was only caught by deliberately running the export scripts by hand. This gives every future PR an automated check before merge.

Limitations

This catches crashes and schema violations, not visual regressions (e.g. a node clipped at the edge of its SVG viewBox) — those still need a manual screenshot check.

Test plan

  • Ran validate-patterns.js against the current index.html — passes (15/15 patterns)
  • Deliberately broke the data three different ways (invalid cat enum, kind:"parallel" step missing members, a statefulness value with no STATEFULNESS_INFO entry) and confirmed each is caught with a clear error message and non-zero exit code
  • Confirmed npm ci works (lockfile present) and npm run export:images / npm run export:pptx still run clean against current index.html

Generated by Claude Code

Adds scripts/validate-patterns.js, which loads index.html and checks
every PATTERNS entry against the documented schema (required fields,
valid cat/group/kind enums, members present when kind is set, no
duplicate names, and that every statefulness value has a matching
STATEFULNESS_INFO entry so the tooltip never renders empty).

Wires this plus the existing export scripts into a new ci.yml workflow
that runs on every PR targeting main, so a broken PATTERNS entry or a
script-crashing change is caught before merge instead of after.
@Hefrock
Hefrock merged commit be06ab7 into main Jun 19, 2026
1 check passed
@Hefrock
Hefrock deleted the claude/intelligent-gates-2s4z93 branch June 19, 2026 03:23
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.

2 participants