Repository navigation
feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) - #1360
Merged
jayminwest merged 3 commits intoOct 8, 2026
Conversation
…and reports a design-review check (warren-a694) (#1359) .github/workflows/ui-design-review.yml runs the ui-design-review skill through claude-code-action (pinned by commit) after each ui-visual run, validates the verdict with scripts/design-review/verdict.ts, and reports the result as the `design-review` check run on the PR head plus one sticky comment keyed by <!-- design-review -->. - gate (pull_request_target): every PR head into main gets the check at once, success "Skipped: no src/ui changes" or queued, so the check warren-dbef makes required never hangs. - prepare (workflow_run): trusts the artifact's PR number only when that PR's head is the run's head sha, maps changed files to manifest pages, stages only in-scope screenshots and the src/ui diff. - evaluate: contents: read token, scoped tools, no web tools, fixed prompt with no PR text, model/turn/budget caps from repo variables. - report: re-validates in a fresh checkout and fails closed on a missing or invalid verdict. Logic lives in pure, unit-tested modules under scripts/design-review/.
…PRs before arming (warren-dbef)
jayminwest
added a commit
that referenced
this pull request
Oct 9, 2026
…o-merge refuses without it (warren-4780) (#1356) * feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780) auto-merge.yml gains a UI baseline approval check next to Article IX. A PR that changes scripts/ui-visual/__golden__/ or the comparison machinery arms only when a human approver applied ui-baseline-approved to the exact baseline content the head carries. The gate reads the labeler from the issue events API (never label presence), the head the approver saw from the repository activity API, and compares baseline object ids. It runs the base branch's copy of scripts/ui-visual/baseline-approval.ts, fails closed, and disarms on refusal. The arm step now also refuses to arm a head the gates did not judge. Adds the label, CODEOWNERS routing, and docs/design/ui-visual-gate.md. * feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) (#1360) * docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) (#1361) * feat(ui-visual): design-review workflow runs the evaluator on UI PRs and reports a design-review check (warren-a694) (#1359) .github/workflows/ui-design-review.yml runs the ui-design-review skill through claude-code-action (pinned by commit) after each ui-visual run, validates the verdict with scripts/design-review/verdict.ts, and reports the result as the `design-review` check run on the PR head plus one sticky comment keyed by <!-- design-review -->. - gate (pull_request_target): every PR head into main gets the check at once, success "Skipped: no src/ui changes" or queued, so the check warren-dbef makes required never hangs. - prepare (workflow_run): trusts the artifact's PR number only when that PR's head is the run's head sha, maps changed files to manifest pages, stages only in-scope screenshots and the src/ui diff. - evaluate: contents: read token, scoped tools, no web tools, fixed prompt with no PR text, model/turn/budget caps from repo variables. - report: re-validates in a fresh checkout and fails closed on a missing or invalid verdict. Logic lives in pure, unit-tested modules under scripts/design-review/. * feat(auto-merge): require ui-visual and design-review success for UI PRs before arming (warren-dbef) * docs(ui): AGENTS.md UI conventions section and a UI definition of done (warren-598d) Adds a UI conventions section to AGENTS.md that pairs each rule with the check that holds it: the Tailwind arbitrary-value ratchet, the GritQL primitive and inline-style bans, check:ui-visual, the golden baseline approval label, and the design-review rubric. Folds the UI merge-gate paragraph out of Protected paths into it and moves the repro-first section next to it. The PR template gains a collapsed UI definition of done, and src/ui/README.md links both UI design records.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Seed warren-dbef (plan pl-10db step 16). A PR whose diff touches
src/ui/**orscripts/ui-visual/**now arms auto-merge only after theui-visualanddesign-reviewcheck runs both reportsuccesson its exact head sha. Every other PR behaves as before.scripts/ui-visual/required-checks.ts: new self-contained gate in the style ofbaseline-approval.ts. The workflow runs it from the base branch tip with the same fail-closed wrapper: onlyhit=falsefrom a gate that exited 0 permits arming.app.slug == github-actions).ui-visualrun counts only when its check suite belongs to apull_requestrun of.github/workflows/ui-visual.ymlon the same head. That excludes a second workflow with a job of the same name, and theupdate_goldensdispatch, which reports success without comparing.ui-visual concluded failure; design-review is queued on <sha>. It goes to the log, a notice annotation, and the job summary.auto-merge.yml): the workflow now also runs onworkflow_runofUI design review(completed). One completes after every ui-visual run, success or failure.targetsjob holds the existing admissionif:. Onpull_requestit emits this PR. Onworkflow_runit runs the sweep (required-checks.ts targets): open, non-draft, unarmed PRs by the owner or anAUTO_MERGE_BOT_LOGINlogin, withoutno-automerge, whose head has both checks green. All of it is read from the API, never from the payload.enable-auto-mergeis now a matrix over that list and judges every PR with all three gates (Article IX, baseline approval, UI checks) from scratch.--match-head-commitand the head-moved guard from feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780) #1356 are kept.check_runtrigger (aGITHUB_TOKEN-written check does not start workflows), polling (holds a runner for the length of a review), and re-running the first run (it replays stale labels).baseline-approval.tsaddsrequired-checks.tstoGATE_PATHS, so a change to the new gate always needs a human merge.docs/design/ui-visual-gate.mdgets a new "The merge gate" section, the dbef scope row moves toshipped, and the names and limits are updated. AGENTS.md "Protected paths" gains one sentence pointing there. Thescripts/ui-visual/README.mdis updated too.Validation
bun teston the newrequired-checks.test.ts(pure logic plus a fake API), the newrequired-checks.workflow.test.ts(runs the step's shell against a scratch repo with stub gates, and pins the triggers, sweep, matrix, mint/arm/disarm conditions), plus the updatedbaseline-approval*.test.tsandarticle-ix-gate.test.ts: 106 pass.actionlint .github/workflows/auto-merge.yml: clean.check:allgate is green.gateon feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780) #1356's head allowed it (its ui-visual check was traced through its suite to apull_requestrun of ui-visual.yml).gateon feat(ui-visual): design-review workflow and status check for UI PRs (warren-a694) #1359's head refused withdesign-review has not reported.targetslisted only feat(ui-visual): human-only approval for golden baseline changes; auto-merge refuses without it (warren-4780) #1356.Limits (documented in the design record)
checks: writecan create adesign-reviewcheck as GitHub Actions. That check is written through the Checks API, so its check suite cannot prove its origin. Follow-up suggested: protect.github/workflows/with a human-merge rule.mainnever get both checks, so they never auto-merge.main's Actions page, not on the PR.