Skip to content

Add web bundle size budgets with explicit acceptance - #864

Merged
markmur merged 7 commits into
mainfrom
bundle-size-budgets
Oct 2, 2026
Merged

markmur merged 7 commits into
mainfrom
bundle-size-budgets

Conversation

@markmur

@markmur markmur commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Oct 2, 2026
@markmur
markmur added this pull request to stack #865 October 2, 2026 08:57
@markmur markmur self-assigned this Oct 2, 2026
@markmur
markmur marked this pull request as ready for review October 2, 2026 09:53
@markmur
markmur requested a review from a team as a code owner October 2, 2026 09:53
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Protocol — Coverage Report

Lines Statements Branches Functions
Coverage: 94%
93.49% (158/169) 89.16% (107/120) 90.9% (30/33)

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
95.16% (374/393) 84.32% (199/236) 97.08% (100/103)

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 91%
90.97% (363/399) 87.29% (213/244) 100% (92/92)

@markmur
markmur force-pushed the bundle-size-budgets branch from 35d19cf to 7acf67f Compare October 2, 2026 10:04
Base automatically changed from web-full-output-minification to main October 2, 2026 10:38
@markmur
markmur force-pushed the bundle-size-budgets branch from cb14347 to 948cefd Compare October 2, 2026 10:38
@markmur
markmur merged commit 0d8f237 into main Oct 2, 2026
34 checks passed
@markmur
markmur deleted the bundle-size-budgets branch October 2, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants