Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Check locally; don't wait on CI to learn whether a change passes. There are thre
| ----- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quick | `vp run ready:quick` | The docs site's link check, which compiles every page, then `vp check` and `vp test` |
| PR | `vp run ready` | Quick, plus production builds, the release checks (size budgets, API reports, package exports), the React, SSR, registry and package-graph gates, and the a11y suite in Chromium. CI runs the same tasks on every PR: `ready:checks` and `a11y`. |
| Full | `vp run ready:full` | Everything in PR, plus the a11y suite at CI's speed (`a11y:ci-speed`) and in Firefox and WebKit (`browsers`), the release dry run (a fresh build, the packed tarballs installed from the pnpm store into a clean project, the registry built for that version), the docs site's types and search, and the dry run's tarballs in use (`release:artifacts`): the SSR fixture's tests and the docs site's build in copies outside the workspace, and `shadcn add` into clean Vite and Next.js apps, which needs the network. It's the release gate. |
| Full | `vp run ready:full` | Everything in PR, plus the a11y suite at CI's speed (`a11y:ci-speed`) and in WebKit (`browsers`; Firefox is off until #263), the release dry run (a fresh build, the packed tarballs installed from the pnpm store into a clean project, the registry built for that version), the docs site's types and search, and the dry run's tarballs in use (`release:artifacts`): the SSR fixture's tests and the docs site's build in copies outside the workspace, and `shadcn add` into clean Vite and Next.js apps, which needs the network. It's the release gate. |

When each tier runs:

Expand All @@ -47,7 +47,7 @@ When each tier runs:
- **Full, for releases only:** the release workflow runs it on the release commit before it
publishes. A PR doesn't run it, with one exception: a PR that changes the full gate itself or the
release tooling runs it once, to show the gate still works, and links a green run of CI's
on-demand `release-gate` job on a fresh runner, which runs Firefox too. A PR that changes the
on-demand `release-gate` job on a fresh runner. A PR that changes the
release tooling also links a green dry run of the release workflow (`vp run release --dry-run`
from its branch).

Expand All @@ -62,8 +62,8 @@ only redoes what changed; `a11y:ci-speed` never replays, since a timing race can
When a tier fails, `vp run --last-details` names the step; rerun it alone with `vp run <step>`.

The browser runs need Playwright's browsers once: `vp exec --filter a11y playwright install chromium
firefox webkit` (add `--with-deps` on Linux). Playwright's Firefox doesn't start on macOS 27 (#182);
there `browsers` runs WebKit alone. CI runs both on demand: `gh workflow run ci.yml --ref <branch>`.
firefox webkit` (add `--with-deps` on Linux). `browsers` runs WebKit alone until #263 brings Firefox
back. CI runs it on demand: `gh workflow run ci.yml --ref <branch>`.

A new check joins a tier in `vite.config.ts`: `ready:checks` or `gate:serial` for the PR tier,
`ready:full` or `gate:serial:full` for the full gate only. Put it in a `gate:serial` lane if it
Expand Down
6 changes: 3 additions & 3 deletions docs/internal/quality-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ installs the polyfill before any test imports, as an app would, and a test check
- Some tests skip in WebKit: focus kept in view in the scrolling agenda (#185, a known issue for
rc.1), and until #181 the agenda's end, the 10,000-event agenda scroll (too slow on the polyfill
in CI), a day swipe's and a month step's snap points, and a drag against the edge.
- Playwright's Firefox doesn't start on macOS 27 (#182). There the run leaves it out and says so;
CI runs it on Linux in the on-demand `browsers` job and in the release gate, green since #204
(#192).
- Firefox is left out of every run, the release gate's included, until #263 brings it back: a drag
test failed there in the 1.0.0-rc.2 release gate. Playwright's Firefox also doesn't start on
macOS 27 (#182).

## Passing gates

Expand Down
16 changes: 7 additions & 9 deletions tools/a11y/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { availableParallelism, release } from "node:os";
import { availableParallelism } from "node:os";

import tailwindcss from "@tailwindcss/vite";
import { configDefaults, defineConfig } from "vite-plus";
Expand All @@ -8,28 +8,26 @@ import { mouse } from "./mouse";
import { Watchdog } from "./watchdog";

/**
* Playwright's Firefox can't find a profile folder on macOS 27 and quits before it opens a page
* (#182). There, `--mode browsers` runs WebKit alone.
* `--mode browsers` leaves Firefox out until #263 brings it back: a drag test failed there in the
* 1.0.0-rc.2 release gate. Playwright's Firefox also can't start on macOS 27 (#182).
*/
const firefoxStarts = !(process.platform === "darwin" && Number(release().split(".")[0]) >= 27);
const firefoxRuns = false;

/** Reduced motion runs in a Chromium context of its own. */
const chromiumOnly = ["tests/reduced-motion.a11y.tsx"];

export default defineConfig(({ mode }) => {
// `vp run browsers`: the suite in Firefox and WebKit instead of Chromium.
const otherBrowsers = mode === "browsers";
if (otherBrowsers && !firefoxStarts) {
console.warn("Firefox left out: Playwright's Firefox doesn't start on macOS 27 (#182).");
}
if (otherBrowsers && !firefoxRuns) console.warn("Firefox left out until #263.");

/**
* Test files that run at once, each in a page of its own. Vitest gives each browser a pool of
* up to 12 pages, which oversubscribed the machine: a browser run shares it with the gate's build
* and unit-test lane. So a run takes half the cores, split between its browsers, and the full
* gate runs its browser runs one at a time. Reduced motion has one file, so one page.
*/
const browsers = otherBrowsers && firefoxStarts ? 2 : 1;
const browsers = otherBrowsers && firefoxRuns ? 2 : 1;
const maxWorkers = Math.max(1, Math.ceil(availableParallelism() / 2 / browsers));

return {
Expand Down Expand Up @@ -61,7 +59,7 @@ export default defineConfig(({ mode }) => {
headless: true,
instances: otherBrowsers
? [
...(firefoxStarts ? [{ browser: "firefox" as const, exclude: chromiumOnly }] : []),
...(firefoxRuns ? [{ browser: "firefox" as const, exclude: chromiumOnly }] : []),
{ browser: "webkit" as const, exclude: chromiumOnly },
]
: [
Expand Down
Loading