Skip to content

test(cli): export's refused-import cases run as one test each - #13194

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/render-named-import-split
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/render-named-import-split

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

One test in packages/cli/api/render/render.interactive.test.mjs ("refuses a named import its module does not export, as a build does, naming the file and line") renders thirteen pages in a single it. Alone it takes about 11 s. After the node-leg durations were rebalanced, it shares a leg with the heaviest render files, and on a busy runner it went past the 30 s test timeout in all three attempts. That fails the whole leg for any change that lands there, whatever the change is.

Intended invariant

The export's import checks keep the same coverage: every page the old test rendered is still rendered, with the same assertions.

Change

The one it becomes a describe with the old title and ten its that group the thirteen pages by case (the accepted no-value-use pages share one, and so do the two unexported subpaths). The pages, messages and assertions are unchanged. The page with type-only imports also writes the small shared module it imports, so each test stands alone. The longest test is now under 3 s.

Evidence

  • Failure before the change: the single test took 10.6–11.3 s alone on a dev machine, and past 30 s on a busy CI leg.
  • Success after the change: the ten tests take 0.5–2.8 s each; the whole file passes (55/55).
  • Product/runtime behavior verified unchanged: test-only change; no source file is touched.
  • CI impact (for a change to workflows, actions or CI scripts): none (no workflow or script changes).

Scope

Components: CLI experimental export tests

  • 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

  • pnpm exec vitest run --project node packages/cli/api/render/render.interactive.test.mjs (55 passed)
  • eslint on the changed file

preflight: pass a86fde0 (same tree as fbe0bff, where CI ran 19/19 pass locally; node-suite env-only fail, same at merge base: global-local G59. The review's only finding was the page count in this text and the commit message, now fixed; the code was clear.)

@vercel

vercel Bot commented Nov 21, 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 21, 2026 6:28am UTC

Request Review

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

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 6:33 AM UTC

@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.

Changes requested. The split keeps every page and assertion and the file passes, but the description does not match the code.

  • The description says the old test "renders ten pages in a single it" and that the ten new tests are "one for each refused or accepted import case", but the old test renders 13 pages and the fifth new test (render.interactive.test.mjs:1566) still renders three accepted pages (types-only, shadowed, re-and-raw), so please correct the wording or split that test into three.

Nothing else blocks this change once that is fixed.

Claims and files checked

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

  • Claim: the old test renders ten pages in one test — false; it renders 13 (base lines 1504-1675).
  • Claim: the old test takes about 11 s alone — consistent with a timed run of the base test.
  • Claim: the test timed out past 30 s on a busy CI leg — not checkable; no run is linked, though the 30 s per-test limit (vitest.config.ts:246) fits.
  • Claim: every page is still rendered, with the same pages, messages and assertions — verified; the only added statement is a second, identical lib-y.ts write.
  • Claim: one test becomes a describe with the old title and ten tests — verified (line 1504).
  • Claim: one test for each refused or accepted import case — false for the accepted cases; the fifth test (line 1566) renders three pages.
  • Claim: the type-only page writes its shared module, so each test stands alone — verified (lines 1567-1570); the ten tests also pass in shuffled order.
  • Claim: the longest test is under 3 s, and the ten take 0.5–2.8 s each — consistent in proportion with a timed run of both trees.
  • Claim: the whole file passes, 55 of 55 — verified.
  • Claim: test-only, with no source, workflow or script change — verified.
  • File: packages/cli/api/render/render.interactive.test.mjs — one finding (above); otherwise clear.

Automated review (maintainer link)

The export test that rendered thirteen pages in one test ran about 11 s alone
and timed out at 30 s on a busy CI leg. The pages now run in ten tests grouped
by case (the accepted no-value-use pages share one, and so do the two
unexported subpaths), with the same pages and assertions.

[skip ci]

@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.

The split keeps all 13 pages and their assertions, each of the ten tests stands alone, and the description now matches the code. Nothing blocks this change.

Claims and files checked

Review mode: full; reason: history

  • Claim: the old test renders thirteen pages in a single test — verified.
  • Claim: alone it takes about 11 s — consistent; the old test took 10.4 s alone in a timed run.
  • Claim: it went past the 30 s test timeout on a busy CI leg — not checkable here; no run is linked, though the Node project's per-test limit is 30 s (vitest.config.ts:246).
  • Claim: every page is still rendered, with the same messages and assertions — verified; the only added statement is a second, identical src/lib-y.ts write.
  • Claim: the test becomes a describe with the old title and ten tests grouped by case — verified (line 1504); the fifth test holds the three accepted pages and the eighth the two unexported subpaths.
  • Claim: the type-only page writes its shared module, so each test stands alone — verified (lines 1567-1570); the fifth test passes alone, and the ten pass in shuffled order.
  • Claim: the longest test is under 3 s, and the ten take 0.5–2.8 s each — verified (0.51–2.80 s).
  • Claim: the whole file passes, 55 of 55 — verified.
  • Claim: test-only, with no source, workflow or script change — verified.
  • Claim: eslint passes on the changed file — verified.
  • Claim: the earlier finding about the page count and wording is fixed — verified.
  • Claim: the author's local preflight passed — not checkable here.
  • Title: the refused-import cases run as one test each — verified under the description's grouping.
  • File: packages/cli/api/render/render.interactive.test.mjs — clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13189 (same tree as this head a86fde0).

@github-actions
github-actions Bot deleted the josephfarina/render-named-import-split branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — a86fde0c Deployed Nov 21, 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