Commit graph

2 commits

Author SHA1 Message Date
varutasu
c100c5f192
convoy: add seed-visual-baselines workflow (harden-visual-diff-gate brief 1) (#138)
Adds a workflow_dispatch-triggered job on the self-hosted axiom runner
that captures fresh `tests/visual/__screenshots__/*.png` against a
caller-provided URL and opens a `chore(visual): refresh baselines from
<url>` PR via peter-evans/create-pull-request@v6.

This is brief 1 of 2 of the harden-visual-diff-gate convoy. The
workflow exists but is not invoked by this PR — operator dispatches via
the GitHub UI or `gh workflow run seed-visual-baselines.yml` once they
want a fresh baseline against post-glass-redesign main.

Brief 2 (flip continue-on-error: true off visual-diff.yml, add 9th
forbidden-patterns check) is unblocked once a fresh baseline lands via
this workflow's auto-PR.

Convoy decision D1 ratified: Option B (workflow_dispatch + auto-PR)
chosen over Option A (ad-hoc SSH-into-CT-111 + manual commit). The
workflow gives the baseline regeneration a reviewable Git-native shape;
the auto-PR carries a checklist for visual sanity-check before merge.

Workflow shape:
- Inputs: base_url (required, no default to avoid wrong-target
  accidents), reason (optional, used in PR body).
- Permissions: contents: write + pull-requests: write — sufficient for
  default GITHUB_TOKEN; no PAT needed.
- Caches: shares the node_modules + Playwright browser caches with
  visual-diff.yml so the byte-equivalence guarantee holds without
  cache miss overhead.
- Idempotent: peter-evans/create-pull-request short-circuits to a
  ::notice:: annotation if the captures match the existing committed
  baselines (no PR opened).

Metrics: logged role-conductor + role-architect + role-implementer
events for this convoy in .convoys/.metrics.jsonl. Satisfies the
convoy-metrics-gate (PR #134, 9eef8d9) that fires on convoy:-titled
PRs requiring at least one new metrics row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 21:37:50 -05:00
varutasu
e3b4b0e213
chore(docs): sweep stale visual-baseline references + queue gate-hardening convoy (#135)
PR #58 (83a358b, 2026-06-02) committed the first Linux visual baseline,
resolving the seed-visual-baselines-on-linux convoy. But the cleanup
sweep across docs that referenced the convoy as "queued / not yet done"
never landed. Three files still describe the world as if PR #58 hadn't
happened, which confuses any agent reading the codebase to understand
the visual-diff pipeline:

  1. tests/visual/homepage.spec.ts module docblock — described "FIRST
     RUN (no committed baseline yet)" and "SEEDING THE BASELINE
     (post-merge follow-up)" as the active state.
  2. playwright.config.js snapshotPathTemplate comment — said
     "Per Decision 4, we don't commit baselines this convoy" and
     pointed at the queued seed convoy as future work.
  3. AGENTS.md § Testing § Visual baselines + § CI behavior §
     Screenshot diff — claimed "none committed yet" and that the first
     visual-diff run "will fail at the test step because no baseline
     exists yet."

Sweeping all three to describe the current reality. The Mac-vs-Linux
platform footgun (snapshotPathTemplate has no {platform} token) is
still live, so that warning stays — just rephrased from "don't have
baselines yet" to "don't regenerate them on a Mac."

Also surfaces a separate finding the seed work left behind:
visual-diff.yml's screenshot capture step still carries
`continue-on-error: true`, making the diff advisory rather than gating.
Flipping it requires re-seeding the baseline against post-glass-redesign
main first (the PR #58 baseline predates unify-glass-panel-surfaces +
cleanup-card-item-list-and-share-modal-palette +
migrate-button-input-mobilenav-to-glass-primitive). New convoy seed at
.convoys/harden-visual-diff-gate.md captures the two-step shape (re-seed
baseline, then flip the gate) plus the recommended workflow_dispatch
approach for repeatable re-seeding on CT 111.

No code behavior changes. Documentation + .md convoy seed only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 20:30:34 -05:00