convoy: add seed-visual-baselines workflow (harden-visual-diff-gate brief 1/2) #138

Merged
varutasu merged 1 commit from convoy/harden-visual-diff-gate-brief-1-seed-workflow into main 2026-06-12 22:37:50 -04:00
varutasu commented 2026-06-12 22:23:14 -04:00 (Migrated from github.com)

Why

`harden-visual-diff-gate` Brief 1. The visual-diff workflow has been advisory since `adopt-playwright-smoke` (PR #18) because flipping `continue-on-error: true` requires a fresh Linux baseline, and the only documented path to regenerate one was a Docker recipe (`mcr.microsoft.com/playwright:v1.60.0-noble`) that's slow, manual, and easy to skip. Now that CT 111 is online, a one-shot `workflow_dispatch` against the existing runner gives us a Git-native, byte-equivalent regen path.

What

New workflow `.github/workflows/seed-visual-baselines.yml`:

Property Value
Trigger `workflow_dispatch` only (no auto-runs)
Runner `[self-hosted, axiom]` (CT 111)
Inputs `base_url` (required, no default), `reason` (optional)
Output Auto-opens a `chore(visual): refresh baselines from ` PR via `peter-evans/create-pull-request@v6` — or emits a `::notice::` if no PNGs changed
Permissions `contents: write` + `pull-requests: write` (default `GITHUB_TOKEN`; no PAT)
Caches Same `node_modules` + Playwright keys as `visual-diff.yml` for cache reuse

The dispatched workflow:

  1. Checks out, installs deps, installs Chromium.
  2. Runs `npx playwright test --project=visual --update-snapshots` against the input URL.
  3. If `tests/visual/screenshots/` changed, opens a PR with the new PNGs + a review checklist.
  4. If no change (rendering matches existing baselines), exits clean with no PR.

How an operator uses it

```bash
gh workflow run seed-visual-baselines.yml \
-f base_url=https://.vercel.app \
-f reason="Glass redesign briefs landed — refresh"
```

Or via UI: Actions → Seed visual baselines → Run workflow → fill in inputs.

Test plan

  • `npm run lint` passes (1 pre-existing warning, unrelated)
  • Convoy metrics rows logged (3 events: conductor + architect + implementer) — satisfies the new `convoy-metrics-gate` (PR #134)
  • CI passes on this PR
  • After merge: operator dispatches the workflow against current `main`'s preview URL; verify it opens a baseline-refresh PR (or emits the `no changes` notice if the existing baseline happens to match)
  • After baseline PR merges: kick off Brief 2 (flip `continue-on-error: true` off `visual-diff.yml`, add 9th forbidden-patterns check)

Convoy state

  • Brief 1 (this PR): shipping. Workflow exists; runtime un-tested until first dispatch.
  • Brief 2: blocked-by-brief-1. Needs a baseline PR to merge first so that flipping the gate doesn't immediately red every UI-touching PR.
  • `.convoys/harden-visual-diff-gate.md` — convoy doc (updated in this PR to mark D1 ratified + Step 1 shipped)
  • PR #58 (`83a358b`) — original baseline seed (now stale relative to glass redesign work)
  • PR #132 (`f228c09`) — `visual-diff.yml` migration to CT 111
  • PR #134 (`9eef8d9`) — convoy-metrics-gate this PR is the first real test of

Made with Cursor

## Why \`harden-visual-diff-gate\` Brief 1. The visual-diff workflow has been advisory since \`adopt-playwright-smoke\` (PR #18) because flipping \`continue-on-error: true\` requires a fresh Linux baseline, and the only documented path to regenerate one was a Docker recipe (\`mcr.microsoft.com/playwright:v1.60.0-noble\`) that's slow, manual, and easy to skip. Now that CT 111 is online, a one-shot \`workflow_dispatch\` against the existing runner gives us a Git-native, byte-equivalent regen path. ## What New workflow \`.github/workflows/seed-visual-baselines.yml\`: | Property | Value | |---|---| | Trigger | \`workflow_dispatch\` only (no auto-runs) | | Runner | \`[self-hosted, axiom]\` (CT 111) | | Inputs | \`base_url\` (required, no default), \`reason\` (optional) | | Output | Auto-opens a \`chore(visual): refresh baselines from <url>\` PR via \`peter-evans/create-pull-request@v6\` — or emits a \`::notice::\` if no PNGs changed | | Permissions | \`contents: write\` + \`pull-requests: write\` (default \`GITHUB_TOKEN\`; no PAT) | | Caches | Same \`node_modules\` + Playwright keys as \`visual-diff.yml\` for cache reuse | The dispatched workflow: 1. Checks out, installs deps, installs Chromium. 2. Runs \`npx playwright test --project=visual --update-snapshots\` against the input URL. 3. If \`tests/visual/__screenshots__/\` changed, opens a PR with the new PNGs + a review checklist. 4. If no change (rendering matches existing baselines), exits clean with no PR. ## How an operator uses it \`\`\`bash gh workflow run seed-visual-baselines.yml \\ -f base_url=https://<production-or-preview>.vercel.app \\ -f reason="Glass redesign briefs landed — refresh" \`\`\` Or via UI: Actions → Seed visual baselines → Run workflow → fill in inputs. ## Test plan - [x] \`npm run lint\` passes (1 pre-existing warning, unrelated) - [x] Convoy metrics rows logged (3 events: conductor + architect + implementer) — satisfies the new \`convoy-metrics-gate\` (PR #134) - [ ] CI passes on this PR - [ ] After merge: operator dispatches the workflow against current \`main\`'s preview URL; verify it opens a baseline-refresh PR (or emits the \`no changes\` notice if the existing baseline happens to match) - [ ] After baseline PR merges: kick off Brief 2 (flip \`continue-on-error: true\` off \`visual-diff.yml\`, add 9th forbidden-patterns check) ## Convoy state - Brief 1 (this PR): **shipping**. Workflow exists; runtime un-tested until first dispatch. - Brief 2: **blocked-by-brief-1**. Needs a baseline PR to merge first so that flipping the gate doesn't immediately red every UI-touching PR. ## Related - \`.convoys/harden-visual-diff-gate.md\` — convoy doc (updated in this PR to mark D1 ratified + Step 1 shipped) - PR #58 (\`83a358b\`) — original baseline seed (now stale relative to glass redesign work) - PR #132 (\`f228c09\`) — \`visual-diff.yml\` migration to CT 111 - PR #134 (\`9eef8d9\`) — convoy-metrics-gate this PR is the first real test of Made with [Cursor](https://cursor.com)
vercel[bot] commented 2026-06-12 22:23:20 -04:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tcg-vault Ready Ready Preview, Comment Jun 13, 2026 2:30am

Request Review

[vc]: #vB21EnsB1tmGsK3q+V1QuNwqL0mX3MTPN66ewJVIjcA=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ0Y2ctdmF1bHQiLCJwcm9qZWN0SWQiOiJwcmpfRjZXOEVvRkd3Y0g3aWVGcnRvRlNlOXdVVkFhNSIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJ0Y2ctdmF1bHQtZ2l0LWNvbnZveS1oYXJkZW4tMjhiMWNjLXJhbmRhbGwtc3RpbGx3ZWxscy1wcm9qZWN0cy52ZXJjZWwuYXBwIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMvdGNnLXZhdWx0Lzk0dnBEU1lQUkhmU043WkpCZTFUVFU3YjJNVHAiLCJwcmV2aWV3VXJsIjoidGNnLXZhdWx0LWdpdC1jb252b3ktaGFyZGVuLTI4YjFjYy1yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsInJvb3REaXJlY3RvcnkiOm51bGx9XSwicmVxdWVzdFJldmlld1VybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS92ZXJjZWwtYWdlbnQvcmVxdWVzdC1yZXZpZXc/b3duZXI9c3R3bC1sYWJzJnJlcG89dGNnLXZhdWx0JnByPTEzOCJ9 The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [tcg-vault](https://vercel.com/randall-stillwells-projects/tcg-vault) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/randall-stillwells-projects/tcg-vault/94vpDSYPRHfSN7ZJBe1TTU7b2MTp) | [Preview](https://tcg-vault-git-convoy-harden-28b1cc-randall-stillwells-projects.vercel.app), [Comment](https://vercel.live/open-feedback/tcg-vault-git-convoy-harden-28b1cc-randall-stillwells-projects.vercel.app?via=pr-comment-feedback-link) | Jun 13, 2026 2:30am | <a href="https://vercel.com/vercel-agent/request-review?owner=stwl-labs&repo=tcg-vault&pr=138" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
github-actions[bot] commented 2026-06-12 22:24:38 -04:00 (Migrated from github.com)

Pipeline Health

Build + CI gates

Gate Status
Vercel build (Preview) pass
CI: Lint pass
CI: Schema map fresh skipped
Preview smoke pass
Visual diff ⏭ skipped or pending

Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).

Role reports

Role Status
Reviewer report pending
A11y audit pending
Design system audit pending

See individual comments above for details. This rollup updates automatically.

<!-- pipeline-rollup --> ## Pipeline Health ### Build + CI gates | Gate | Status | | --- | --- | | Vercel build (Preview) | ✅ pass | | CI: Lint | ✅ pass | | CI: Schema map fresh | ❌ skipped | | Preview smoke | ✅ pass | | Visual diff | ⏭ skipped or pending | _Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build)._ ### Role reports | Role | Status | | --- | --- | | Reviewer report | ⏳ pending | | A11y audit | ⏳ pending | | Design system audit | ⏳ pending | See individual comments above for details. This rollup updates automatically.
github-actions[bot] commented 2026-06-12 22:30:07 -04:00 (Migrated from github.com)

Visual Diff

Screenshots and diffs uploaded as artifacts: view run

If intentional changes: update snapshots locally with npx playwright test --project=visual --update-snapshots and commit.

## Visual Diff Screenshots and diffs uploaded as artifacts: [view run](https://github.com/stwl-labs/tcg-vault/actions/runs/27453777722) If intentional changes: update snapshots locally with `npx playwright test --project=visual --update-snapshots` and commit.
Sign in to join this conversation.
No description provided.