Skip to content

test(cli): doctor-integration, validate-integration and check-failures fixtures check their own files - #9496

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:test/cli-fixtures-own-tsconfig
Nov 3, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:test/cli-fixtures-own-tsconfig

Conversation

@vjeux

@vjeux vjeux commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

Three CLI test fixtures compiled every file in the repository on each props comparison.

  • They are packages in a folder inside the repository with no TypeScript config of their own. Such a package gets the repository's root config, as tsc reads it, so the props comparison compiles every file that config includes.
  • This happened 15 times per run:
    • doctor-integration's components cases;
    • validate-integration's "leaves local and installed packages byte-for-byte unchanged";
    • the check-failures fixture's one strict check, which runs in a beforeAll with a 60 s budget.

Intended invariant

Every CLI test fixture inside the repository is checked against its own files: none reads the repository's root config.

Change

  • Each fixture carries a config scoped to its own files. The config extends the repository's root config, so the compiler options are unchanged, as the public-imports fixtures already do.
  • In validate-integration, the config sits beside the two packages, so neither package's snapshot changes. The installed copy, under node_modules, reads none.

Evidence

  • Root-config reads, counted with a temporary probe in the config reader: 15 on main, 0 on this branch.
  • Same time, pinned to two cores, 1 worker each, in two worktrees at the same base, two rounds:
    • doctor-integration: 68.7 s and 66.5 s on main; 32.4 s and 32.0 s here;
    • validate-integration: 13.8 s and 13.0 s on main; 6.2 s and 6.4 s here;
    • the check-failures file (wall time, one at a time): 17.4 s and 16.9 s on main; 10.5 s and 11.8 s here;
    • every case passes on both sides: 40, 35 and 5 cases.
  • A whole-suite run found no other fixture that reads the root config: the probe ran over the CLI's node project. Its one other hit, the public-imports fresh-scaffold case, is fixed separately.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

packages/cli: clients/cli/commands/doctor-integration.test.mjs, api/integration/validate-integration.test.mjs, test/integration-check-failures.test.mjs (Vitest, node project).

Local gates at 8b51c30:

  • the three files (80 cases);
  • Prettier and ESLint on them;
  • pnpm lint (0 errors);
  • changeset coverage (nothing ships).

…s fixtures check their own files

Three CLI test fixtures are packages in a folder inside the repository
with no TypeScript config of their own, so each props comparison read the
repository's root config, as `tsc` does, and compiled every file in the
repository: 15 times across doctor-integration's components cases,
validate-integration's read-only case and the check-failures fixture's one
strict check, which runs in a beforeAll with a 60 s budget.

Each fixture now carries a config scoped to its own files that extends the
repository's root config, as the public-imports fixtures do. The root
config is read 0 times. Pinned, same time: doctor-integration 66.5 to
68.7 s becomes 32.0 to 32.4 s, validate-integration 13.0 to 13.8 s becomes
6.2 to 6.4 s, and the check-failures file 16.9 to 17.4 s becomes 10.5 to
11.8 s; every case passes on both sides.
@vercel

vercel Bot commented Nov 2, 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 2, 2026 7:00am UTC

Request Review

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

astracat-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 2, 2026, 7:03 AM UTC

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8b51c30

Storybook · Sandbox · built from this PR's head

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

API changes: none in this pull request

Committed API report behind this build: core 5 rows; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


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.

This change looks good. Each fixture's own tsconfig.json keeps the root compiler options and scopes the props comparison to the fixture's files. All three suites keep their assertions and pass in roughly half the time. Nothing else is needed from you.

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 3, 2026 08:34
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 3, 2026
@cixzhang
cixzhang marked this pull request as draft November 3, 2026 08:37
@cixzhang
cixzhang marked this pull request as ready for review November 3, 2026 08:37
@cixzhang
cixzhang merged commit c7a5c23 into meta:main Nov 3, 2026
138 of 143 checks passed
@vjeux
vjeux deleted the test/cli-fixtures-own-tsconfig branch November 3, 2026 09:13

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) 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.

2 participants