Add web bundle size budgets with explicit acceptance - #864
Merged
Merged
Conversation
This was referenced Oct 2, 2026
markmur
added this pull request to stack #865
October 2, 2026 08:57
markmur
marked this pull request as ready for review
October 2, 2026 09:53
markmur
force-pushed
the
bundle-size-budgets
branch
from
October 2, 2026 10:04
35d19cf to
7acf67f
Compare
markmur
force-pushed
the
bundle-size-budgets
branch
from
October 2, 2026 10:38
cb14347 to
948cefd
Compare
kiftio
approved these changes
Oct 2, 2026
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.
Add configurable bundle-size budgets, starting with a 35 KiB soft limit and 50 KiB hard limit for all shipped web JavaScript (currently
dist/index.js). Each budget explicitly selects its measurement: raw or gzip JavaScript, the whole compressed package, or an exact file’s uncompressed size inside the package. The PR report displays each budget’s scope.A growing bundle above its soft limit requires a repository writer to comment
/accept-size web <reason>. Acceptance records an independent size cap for each breached metric; later growth, a newly breached metric, or a changed measurement scope requires fresh acceptance. Hard-limit increases require a reviewed budget-file change. Unchanged or smaller bundles already over budget pass.The shared evaluator supports platform-specific metrics and combines them in one Size budgets check. PR builds upload measurements with read-only permissions; a trusted default-branch workflow validates comment permissions and updates the report and check.
The publisher becomes available when this workflow reaches
main. Then Size budgets should be added to the repository’s required checks alongside CI Required.Stack