Repository navigation
test(bundler-tests): Guard server runtime entries against build-time tooling - #25724
Merged
isaacs merged 1 commit intoOct 30, 2026
Conversation
Contributor
size-limit report 📦Compared: 0341c0b (PR test merge using develop at 30cfb4c) Against: 30cfb4c (develop) · base run #64245 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 56 successful. See the run.
Successful checks
|
nicohrubec
reviewed
Oct 28, 2026
isaacs
force-pushed
the
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time-guard
branch
from
October 29, 2026 17:58
13284a5 to
a837f5a
Compare
isaacs
requested review from
andreiborza,
logaretm,
msonnb,
mydea and
nicohrubec
and removed request for
a team
October 29, 2026 17:58
…tooling Build tooling keeps leaking into server runtime entries: bundler plugins, orchestrion bundler transforms, Vite, Babel, WASM. Each time, users find it in a different consumer, often in a production deploy (#22794, #23034, #23243, #24775, #25470). Nothing stopped the same shape from coming back. The new test traces each server runtime entry with `@vercel/nft`, the tracer behind Next standalone and the Vercel adapters. It resolves each entry through a fixture, under the export conditions of each runtime, in ESM and CJS. It fails if the trace reaches build-only code, and prints the import chain to it. The trace stops at the first build-time module and does not expand globs. Without that, an entry that does reach build tooling walks all of Vite and Babel, and globs the whole repo, which takes minutes instead of seconds. Every export of a tested package must now be in `CASES`, `BUILD_TIME_CASES`, or `CLIENT_ENTRIES`. This found seven runtime entries that the test did not check, now added to `CASES`. Two of them, `@sentry/remix/v3` and `@sentry/remix/v3/node`, reach the orchestrion load hook. Remix 3 has no bundler, so its asset server runs the transform at request time. They are now known violations. Each build-time entry must reach build-time tooling. If our tooling changes and `BUILD_TIME_PATTERNS` no longer matches it, these cases fail. The test only covers packages it already knows about. A new Bugbot rule flags a new server package, or a new export in an untested one, so that it gets added to the test. Refs #25676 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
isaacs
force-pushed
the
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time-guard
branch
from
October 29, 2026 18:03
a837f5a to
8cbb9ca
Compare
isaacs
enabled stacked auto-merge (squash)
October 30, 2026 19:08
isaacs
deleted the
isaacschlueter/js-3989-guard-server-runtime-entries-against-pulling-in-build-time-guard
branch
October 30, 2026 21:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build tooling keeps leaking into server runtime entries: bundler plugins, orchestrion bundler transforms, Vite, Babel, WASM. Each time, users find it in a different consumer, often in a production deploy (#22794, #23034, #23243, #24775, #25470). Nothing stopped the same shape from coming back.
The new test traces each server runtime entry with
@vercel/nft, the tracer behind Next standalone and the Vercel adapters. It resolves each entry through a fixture, under the export conditions of each runtime, in ESM and CJS. It fails if the trace reaches build-only code, and prints the import chain to it.The trace stops at the first build-time module and does not expand globs. Without that, an entry that does reach build tooling walks all of Vite and Babel, and globs the whole repo, which takes minutes instead of seconds.
@sentry/astroand@sentry/solidstartare known violations: their root entries also re-export the config-timesentryAstroandwithSentry, and must keep doing so until v12. The test fails if either becomes clean, so the list cannot go stale.Refs #25676
Stack created with GitHub Stacks CLI • Give Feedback 💬