Skip to content

fix(preflight): the browser step passes the selected Chromium specs before --project, which takes every value after it - #13082

Merged
cixzhang merged 1 commit into
mainfrom
fix/preflight-interaction-project-arg
Nov 20, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/preflight-interaction-project-arg

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Who this helps

Anyone running pnpm preflight --browser on a change that selects Chromium interaction specs. Today the interaction step fails before any test runs: preflight puts the selected spec files after --project chromium, and Playwright's --project takes every value after it, so it reads the spec path as a project name (Error: Project(s) "packages/core/src/Calendar/__tests__/CalendarMonthButtonPress.interaction.browser.spec.ts" not found. Available projects: "chromium", "webkit"). The same spec, with the file first, passes 3/3. Found on #12363.

What changes

  • scripts/preflight.mjs: the interaction step's command is pnpm test:interaction <selected specs> --project chromium. A command can now carry argsAfter, which runChecks appends after the arguments it reads from a file (argsFrom) and before the heavy-step wrapper, so the printed failing command is the one that ran. A full selection still runs pnpm test:interaction --project chromium. CI's own a11y contracts step (.github/scripts/a11y-pr-contracts.mjs) already puts its filters before --project.
  • scripts/preflight.test.mjs: a test, "the interaction specs step". It plans the --browser checks, writes the selection the selector would write, and runs the step through runChecks with a fake command runner:
    • with {"full": false, "specs": ["a.spec.ts", "b.spec.ts"]} the command is pnpm test:interaction a.spec.ts b.spec.ts --project chromium;
    • with a full selection it is pnpm test:interaction --project chromium.

Tests (red first)

On main, the selected-specs case fails (Received pnpm test:interaction --project chromium a.spec.ts b.spec.ts) and the other 22 pass; with the fix, 23/23 pass.

CI impact

CI impact: none (preflight is a local tool; no workflow change).

Overlap checked: #13019 (ours, draft; it adds a lab sync check to the same two files at other lines; separate solution, merges cleanly)

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, on green, CodeBunny approval and Specs' exact-head /approve-spec.

…efore --project, which takes every value after it
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 20, 2026 11:20am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 20, 2026
@astracat-bot

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 20, 2026, 11:27 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 67e7d4a

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 67e7d4a

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it runs once the pull request is marked ready.

The interaction specs step now hands the selected spec files to Playwright before --project chromium, so a run with a specific Chromium selection runs those specs instead of stopping on a "project not found" error. The new test fails on main and passes here, and Playwright accepts the new order. No blocking findings.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • The interaction step failed whenever the selection named specific specs, because they came after --project chromium: verified (the base plan appends them after it, and Playwright exits 1 with a project-not-found error for that order).
  • Playwright's --project takes every value after it: verified (Playwright 1.61.1 declares the option variadic).
  • The same spec with the file first passes 3/3: verified in part (the file-first order is accepted and lists a Calendar spec's tests in chromium; the browser run of the other pull request's spec was not repeated).
  • The step's command is now pnpm test:interaction <selected specs> --project chromium: verified (scripts/preflight.mjs:366-373, :549).
  • argsAfter goes after the file-read arguments and before the heavy-step wrapper, so the printed failing command is the one that ran: verified (scripts/preflight.mjs:547-551, :578).
  • A full selection still runs pnpm test:interaction --project chromium: verified (the new full-selection test).
  • CI's accessibility contracts step already puts its filters before --project: verified (.github/scripts/a11y-pr-contracts.mjs:1450-1474).
  • On main the new selected-specs test fails and the other 22 pass; with the fix all 23 pass: verified (both runs).
  • No CI impact and no workflow change: verified (only two script files change).
  • The failure was found on another pull request's Calendar spec: verified (that pull request adds the named spec).
  • The overlapping draft touches the same two files and merges cleanly: verified (a merge of the two heads has no conflict).
  • Changeset entries: none in this pull request.

Files:

  • scripts/preflight.mjs: clear
  • scripts/preflight.test.mjs: clear

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 20, 2026 11:31
@cixzhang
cixzhang merged commit b07619f into main Nov 20, 2026
204 of 206 checks passed

This branch was successfully deployed

1 active deployment
Preview — 67e7d4a8 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant