ci(workflows): exclude pages/api/** from visual-diff path filter #26
No reviewers
Labels
No labels
agent-context-drift
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rstillwell/deckhearth#26
Loading…
Reference in a new issue
No description provided.
Delete branch "convoy/tighten-visual-diff-path-filter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Tighten
.github/workflows/visual-diff.yml'spaths:filter so API-only PRs no longer trigger theScreenshot diffworkflow. Single negated-glob entry inserted immediately afterpages/**. Closes the queuedtighten-visual-diff-path-filterfollow-up tracked in.convoys/ship-readiness.md§ Queued convoys.Why
pages/**matchespages/api/**too, so any PR touching only API routes (Next.js Pages-router backend) was triggering the visual-diff workflow even though it can't possibly move a single rendered pixel. Empirical false-positives:cors-tighten(squashda50d78) — 24 files, all underpages/api/**. TriggeredScreenshot diff, swallowed viacontinue-on-error: true.add-rate-limiting(squash708ef45) — 6 routes underpages/api/pluslib/rate-limit.jsandpages/admin/card-import.js. Same false-trigger.Cost per false-trigger: ~55s of CI runtime —
wait-for-vercel-previewagainst the deployed preview, plus Playwrightnpm ci+npx playwright install+ thevisualproject run. The job exits 0 (Decision-4 end state ofadopt-playwright-smokeuntilseed-visual-baselines-on-linuxlands), but it still posts a "Visual Diff — view run" comment and clutters the Checks tab with a green-but-meaningless run.The change
Single edit in
.github/workflows/visual-diff.yml:GitHub Actions evaluates
paths:with minimatch and supports!-prefixed exclusions per the published path-filter cheatsheet. Order matters: a!patternonly takes effect if it appears AFTER an include that already matched the path. Hence!pages/api/**sits at index 1, immediately afterpages/**.All five existing entries are preserved verbatim; only the one exclusion entry plus an inline comment block (explaining the ordering rule and naming the empirical PRs that motivated this) is added.
preview-smoke.ymlis intentionally untouched — itson:block has nopaths:filter at all (triggers on every PR targetingmain, with skip-via-PR-body-directive in the gate job). There is no false-positive shape to fix there. Smoke SHOULD run on every PR, including API-only ones, because changes topages/api/**can break the home-redirect / sign-in //api/healthendpoints the smoke spec exercises. Documented in the convoy file's § Scope.Test plan (post-merge verification)
YAML parse + lint baseline + vitest were all green at commit time, but those don't actually verify the path filter works — only that we didn't break anything else. The only true verification is that the next API-only PR after this merges does NOT trigger
Screenshot diff. The convoy file's § Verification plan documents this explicitly as deferred-to-post-merge; the doc-writer pass that closes the convoy will record the next API-only PR's number + a "Screenshot diff: not triggered" line as the as-shipped success criterion (mirroring.convoys/fix-reset-db-script.md's same line forscripts/**PRs).We deliberately do NOT live-verify by pushing a throwaway API-only commit to a sacrificial branch and watching CI — that'd be theater. GitHub's path-filter semantics are documented and stable; the YAML parse + the syntax match against the published cheatsheet is enough pre-merge confidence for a P3-polish convoy.
Pre-merge gates (recorded at convoy time):
Follow-ups
seed-visual-baselines-on-linux(P3 polish, already queued byadopt-playwright-smoke) — once visual baselines are seeded undertests/visual/__screenshots__/from a Linux runner, theScreenshot diffjob will start posting real visual-diff comparisons andcontinue-on-error: truecan be removed. Orthogonal to this PR.paths:filter to per-feature globs (pages/dashboard.js,pages/cards/**,pages/decks/**, …). Track only if R1 actually surfaces.Made with Cursor
The latest updates on your projects. Learn more about Vercel for GitHub.
Pipeline Health
Build + CI gates
Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).
Role reports
See individual comments above for details. This rollup updates automatically.