Skip to content

chore(ci): Add workflow to auto-bump size limits via PR label#19690

Closed
Lms24 wants to merge 6 commits intodevelopfrom
lms/chore-size-limit-auto-bump
Closed

chore(ci): Add workflow to auto-bump size limits via PR label#19690
Lms24 wants to merge 6 commits intodevelopfrom
lms/chore-size-limit-auto-bump

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 6, 2026

This PR adds an Accept Bundlesize Increase label-triggered workflow that automatically bumps failing size-limit entries in .size-limit.js. When the size-limit check fails on a PR, authors can add this label which triggers the new workflow:

  1. Download build artifacts from the most recent CI run
  2. Run size-limit --json to get actual sizes
  3. Bump only the failing entries with a min(10%, 1KB) margin, rounded up to 0.5 KB
  4. Commit, push, and post a summary comment on the PR

The workflow includes SHA verification to ensure the build artifacts match the current HEAD, concurrency control per PR, and automatic label removal after bumping.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.64 kB - -
@sentry/browser - with treeshaking flags 24.14 kB - -
@sentry/browser (incl. Tracing) 42.44 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.1 kB - -
@sentry/browser (incl. Tracing, Replay) 81.26 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.88 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.95 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.21 kB - -
@sentry/browser (incl. Feedback) 42.44 kB - -
@sentry/browser (incl. sendFeedback) 30.31 kB - -
@sentry/browser (incl. FeedbackAsync) 35.36 kB - -
@sentry/browser (incl. Metrics) 26.8 kB - -
@sentry/browser (incl. Logs) 26.95 kB - -
@sentry/browser (incl. Metrics & Logs) 27.62 kB - -
@sentry/react 27.39 kB - -
@sentry/react (incl. Tracing) 44.78 kB - -
@sentry/vue 30.09 kB - -
@sentry/vue (incl. Tracing) 44.31 kB - -
@sentry/svelte 25.66 kB - -
⛔️ CDN Bundle (max: 27 kB) 28.18 kB - -
⛔️ CDN Bundle (incl. Tracing) (max: 42 kB) 43.27 kB - -
CDN Bundle (incl. Logs, Metrics) 29.02 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.11 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.1 kB - -
CDN Bundle (incl. Tracing, Replay) 80.15 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.54 kB - -
CDN Bundle - uncompressed 82.38 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.09 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.21 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.93 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.88 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.98 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.8 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.89 kB - -
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed (max: 200 kB) 260.7 kB - -
@sentry/nextjs (client) 47.19 kB - -
@sentry/sveltekit (client) 42.9 kB - -
@sentry/node-core 52.27 kB +0.02% +7 B 🔺
@sentry/node 174.77 kB +0.01% +4 B 🔺
⛔️ @sentry/node - without tracing (max: 90 kB) 97.44 kB +0.02% +11 B 🔺
⛔️ @sentry/aws-serverless (max: 1 kB) 113.24 kB -0.01% -5 B 🔽

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,242 - 9,197 +0%
GET With Sentry 1,702 18% 1,781 -4%
GET With Sentry (error only) 6,185 67% 6,225 -1%
POST Baseline 1,202 - 1,203 -0%
POST With Sentry 588 49% 603 -2%
POST With Sentry (error only) 1,052 88% 1,044 +1%
MYSQL Baseline 3,248 - 3,335 -3%
MYSQL With Sentry 461 14% 516 -11%
MYSQL With Sentry (error only) 2,649 82% 2,714 -2%

View base workflow run

@Lms24 Lms24 changed the title ci: Add workflow to auto-bump size limits via PR label chore(ci): Add workflow to auto-bump size limits via PR label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Bumped size limits:

  • : 27 KB -> 29 KB
  • : 42 KB -> 43.5 KB
  • : 200 KB -> 256 KB
  • : 90 KB -> 96.5 KB
  • : 1 KB -> 112 KB

Lms24 and others added 6 commits March 9, 2026 13:15
Add an "Accept Bundlesize Increase" label-triggered workflow that
automatically bumps failing size-limit entries in .size-limit.js
with a min(10%, 1KB) margin. The workflow reuses build artifacts
from the most recent CI run to avoid a full rebuild.

Also improve the size-limit action failure message to list exceeded
entries with details and instruct users about the label.

Co-Authored-By: Claude <noreply@anthropic.com>
Made-with: Cursor
@Lms24
Copy link
Member Author

Lms24 commented Mar 9, 2026

Going to close this in favour of #19715 for the moment. We're not 100% happy with the CI-based approach because it needs to commit to the branch, making local development cumbersome. The skill seems like solid middle ground for now. We can revisit at any time.

@Lms24 Lms24 closed this Mar 9, 2026
Lms24 added a commit that referenced this pull request Mar 9, 2026
As a "manual but less manual than editing `.size-limit.js`" alternative
to #19690, this PR adds a skill that takes care of bumping size limits.
I also added a `test:size-limit` script for convenience since we didn't
document elsewhere how to manually run the `size-limit` CLI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant