Skip to content

ci: drop build-sandbox and the Pages preview leftovers; Storybook is built once per run - #8887

Merged
cixzhang merged 6 commits into
mainfrom
ci/drop-build-sandbox
Oct 30, 2026
Merged

cixzhang merged 6 commits into
mainfrom
ci/drop-build-sandbox

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

Every code pull request ran build-sandbox: a 2-core arm job of about 4 minutes (plus a per-PR Next.js cache) that built the Sandbox and uploaded a sandbox-<hash> artifact. No workflow downloads that artifact. Sandbox previews come from the exact-head Vercel deployment, which the PR comment already links, and the GitHub Pages PR preview is retired. Removing the job takes about 4 arm-minutes off every in-scope PR run (about 5,000 a day at recent volume) and one job off the build context's critical path. Reviewers see no change: the Sandbox preview link stays.

Change

  • Removed build-sandbox. The build join now needs build-storybook and typecheck, and fails unless both succeed.
  • Removed the Pages leftovers: build-storybook's sandbox_url output and the step that composed the github.io/<repo>/pr/<n>/sandbox/ URL. Nothing reads them.
  • Storybook stays built once per run in build-storybook and shared as storybook-<hash>.
  • ci-duration's job list drops build-sandbox, and comments are updated.

Tests

  • ci-tooling-routing.test.mjs:
    • a new case pins no build-sandbox job, no sandbox_url output, and exactly one Storybook build that can run on a pull request (build-storybook). It fails on main and passes here.
    • the join case asserts build = build-storybook + typecheck, both required to succeed.
  • spec-owner-workflow.test.mjs now ends the build-storybook slice at the next top-level job instead of at build-sandbox:.
  • visual-gate/workflow-concurrency.test.mjs now asserts CI uploads no sandbox- artifact (it used to require the deleted upload).
  • Every .github/scripts suite passes locally: 77 files, 1,424 tests.

Lines

+45 / −122, net −77: ci.yml +11/−105, tests +29/−12, scripts/score-ledger.mjs comments +4/−4 (they named the removed job).

Order

This is part of the CI-spend set. It is based on main and rebases onto whatever lands before it. It touches only build-sandbox, build, and build-storybook's outputs and URL step, so it doesn't overlap the heavy-lane conditions or runs-on labels changed elsewhere.

…built once per run

Sandbox previews come from the exact-head Vercel deployment and the PR
comment links them there, so build-sandbox's ~4-minute arm build and its
sandbox-<hash> artifact served nothing (no workflow downloads it). The
GitHub Pages PR preview is retired; build-storybook's sandbox_url output,
a github.io/<repo>/pr/<n>/sandbox URL nothing reads, goes with it.

- The build join is build-storybook + typecheck, each required to succeed.
- ci-duration's job list drops build-sandbox.
- New ci-shared-storybook.test.mjs pins it: no Sandbox build or Pages URL,
  one Storybook build per pull-request run (build-storybook), and every
  Storybook consumer downloads that artifact. It fails on main.
- ci-tooling-routing and spec-owner-workflow follow the removed job.
@vercel

vercel Bot commented Oct 29, 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 Oct 30, 2026 3:59am UTC

Request Review

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

astracat-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 30, 2026, 4:13 AM UTC

… net-negative

The new contract file becomes one case in ci-tooling-routing.test.mjs: no
build-sandbox job, no sandbox_url output, and one Storybook build per
pull-request run (build-storybook). It still fails on main.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changes requested: .github/scripts/visual-gate/workflow-concurrency.test.mjs (line 163) still expects ci.yml to upload sandbox-${{ steps.urls.outputs.short_hash }}, so that suite fails on this head and will turn the required test check red. Please drop or invert that expectation, and remove the old build-sandbox header comment left above the build join (ci.yml lines 1300–1303) along with the "Sandbox artifact remains on Pages" note at lines 1135–1137. Worth a line in the description: with build-sandbox gone, a change that breaks only the Sandbox build no longer fails any required check, and only the Vercel deployment would show it.

[Automated review]

Comment thread .github/workflows/ci.yml
- name: Upload Sandbox artifact
uses: actions/upload-artifact@v7
with:
name: sandbox-${{ steps.urls.outputs.short_hash }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This upload is still asserted by .github/scripts/visual-gate/workflow-concurrency.test.mjs:163-165 (expect(value).toContain('name: sandbox-${{ steps.urls.outputs.short_hash }}')), so that suite fails once this step is gone. Drop or invert that expectation in the same change.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines 1301 to 1303
# its own job so it overlaps build-storybook instead of serializing after it.
# PR-only: merge_group runs never deploy previews, and docsite-only PRs skip
# preview builds entirely.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These lines, with line 1300 above them, are the deleted build-sandbox job's header; they now sit directly above the build join and read as describing it. Delete lines 1300–1303.

The workflow-concurrency test asserted the deleted sandbox-<hash> upload;
it now asserts CI uploads no Sandbox. The removed job's header comment no
longer sits above the build join.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready: build still reports on every pull request and fails when build-storybook or typecheck fails, and the visual-gate test now asserts that CI uploads no sandbox- artifact. One small cleanup, before or after merging: the comment in build-storybook's "Write PR comment metadata" step (ci.yml lines 1135–1137) still says the Sandbox artifact remains on Pages, and two comments in scripts/score-ledger.mjs (lines 1241–1242 and 1315–1317) still name build-sandbox. Consider a line in the description noting that a change which breaks only the Sandbox build will now show up on the Vercel deployment rather than on a required check.

[Automated review]

…es Sandbox

The PR comment metadata note says both preview links come from Vercel, and
score-ledger's two shape-guard comments name the Sandbox build rather than
the removed CI job.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: build still reports on every pull request and fails unless build-storybook and typecheck succeed, the contract tests pin the new shape, and the comment cleanup from the previous round is done. Optionally, the description could note that a change which breaks only the Sandbox build will now show up only on the Vercel deployment rather than failing build.

[Automated review]

# Conflicts:
#	.github/workflows/ci.yml

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: build still reports on every pull request and fails unless build-storybook and typecheck succeed, and the contract tests pin the new shape. Two optional touch-ups: the rewritten build join comment still says a merge-queue run or a failed check-scope skips build-storybook, though neither does (see the inline note), and the description could mention that a change breaking only the Sandbox build will now show up on the Vercel deployment rather than failing build.

[Automated review]

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +1334 to +1336
# it fails when build-storybook or typecheck fails. A skipped
# build-storybook (merge_group, or a failed check-scope) skips this gate
# too, as the old single-job build did.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Optional, and carried over from the old comment: neither case in the parenthetical skips build-storybook. check-scope writes spec_only=false for every non-pull-request event (line 210), so build-storybook and build both run in the merge queue, as the file header says; and when check-scope fails, build-storybook still runs under always() and fails at its classification step (lines 1050-1054), so build runs and fails. The skip cases are spec-only and release-bump pull requests (line 216), for example: A skipped build-storybook (a spec-only or release-bump pull request) skips this gate too.

check-scope reports spec_only=false outside pull requests, so the merge
queue runs build-storybook, and a failed check-scope fails it rather than
skipping it. The skips are spec-only and release-bump pull requests.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: build still reports on every pull request and fails unless build-storybook and typecheck succeed, the contract tests pin the new shape, and the build join comment now names the cases that really skip it. Worth a line in the description: with build-sandbox gone, a change that breaks only the Sandbox build fails only the Vercel status, which is not a required check, so it no longer blocks merging. The description also still calls the removed job a 2-core arm job, though it has run on a standard ubuntu-24.04-arm runner since #8885.

[Automated review]

@cixzhang cixzhang closed this Oct 30, 2026
@cixzhang cixzhang reopened this Oct 30, 2026
@cixzhang cixzhang closed this Oct 30, 2026
@cixzhang cixzhang reopened this Oct 30, 2026
@cixzhang
cixzhang merged commit a23ce4e into main Oct 30, 2026
52 checks passed

This branch was successfully deployed

1 active deployment
Preview — b002d31c Deployed Oct 30, 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