Repository navigation
Conversation
The CLI had no size check. A change could make every command read more code, or grow the package, and CI stayed green. The bundle e2e test now runs six commands and fails when one reads more JavaScript than its budget. It also fails when the npm package ships more JavaScript than its budget. Each budget is about 3% over the size today. Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
|
Too much in flux right now so putting this on hold. Thanks for the PR tho. |
This branch was previously deployed
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.
The CLI has no size check in CI. Only
@sentry/mcp-serverhas one (MAX_BUNDLE_BYTES). A change can make every command read more code, or grow the package, and CI stays green. This PR sets the baseline that later size and startup changes measure against.Baseline
The JavaScript each command reads at startup, on main (
f0439045), signed out:sentry --versionsentry helpsentry auth statussentry org listsentry issue listsentry help --jsonEach budget is about 3% over the size today.
Changes
test/e2e/bundle.test.tsruns each command above and fails when it reads more JavaScript than its budget. It also fails whendistships more JavaScript than its budget. The CLI package already runstest:e2ein CI, so this needs no new workflow or script.sentry --version reads 1568 KB, over its 1620 KB budget.runReadingScriptshelper records the scripts a run reads. The two tests that had their own copy of this code now use it.packages/cli/AGENTS.mdsays what to do when a change goes over a budget: make the change smaller, or raise the budget and give the reason in the PR. Lower a budget when a command gets smaller.Checks
test/e2e/bundle.test.ts: 17 tests pass in 2.5 s.pnpm run lintandtscpass.Created with Claude Code