Skip to content

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

Draft
Lms24 wants to merge 2 commits intodevelopfrom
lms/chore-size-limit-auto-bump
Draft

chore(ci): Add workflow to auto-bump size limits via PR label#19690
Lms24 wants to merge 2 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.

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
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.63 kB - -
@sentry/browser - with treeshaking flags 24.13 kB - -
@sentry/browser (incl. Tracing) 42.43 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.09 kB - -
@sentry/browser (incl. Tracing, Replay) 81.25 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.87 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.3 kB - -
@sentry/browser (incl. FeedbackAsync) 35.35 kB - -
@sentry/browser (incl. Metrics) 26.8 kB - -
@sentry/browser (incl. Logs) 26.94 kB - -
@sentry/browser (incl. Metrics & Logs) 27.61 kB - -
@sentry/react 27.38 kB - -
@sentry/react (incl. Tracing) 44.77 kB - -
@sentry/vue 30.08 kB - -
@sentry/vue (incl. Tracing) 44.3 kB - -
@sentry/svelte 25.66 kB - -
⛔️ CDN Bundle (max: 27 kB) 28.17 kB - -
⛔️ CDN Bundle (incl. Tracing) (max: 42 kB) 43.26 kB - -
CDN Bundle (incl. Logs, Metrics) 29.01 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.1 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.09 kB - -
CDN Bundle (incl. Tracing, Replay) 80.14 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.53 kB - -
CDN Bundle - uncompressed 82.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.07 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.19 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.9 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.85 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.95 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.86 kB - -
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed (max: 200 kB) 260.67 kB - -
@sentry/nextjs (client) 47.18 kB - -
@sentry/sveltekit (client) 42.89 kB - -
@sentry/node-core 52.25 kB +0.02% +7 B 🔺
@sentry/node 174.73 kB +0.02% +19 B 🔺
⛔️ @sentry/node - without tracing (max: 90 kB) 97.39 kB +0.02% +11 B 🔺
⛔️ @sentry/aws-serverless (max: 1 kB) 113.2 kB +0.01% +7 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,186 - 9,030 +2%
GET With Sentry 1,584 17% 1,692 -6%
GET With Sentry (error only) 6,058 66% 5,999 +1%
POST Baseline 1,156 - 1,198 -4%
POST With Sentry 543 47% 581 -7%
POST With Sentry (error only) 1,025 89% 1,057 -3%
MYSQL Baseline 3,169 - 3,233 -2%
MYSQL With Sentry 382 12% 461 -17%
MYSQL With Sentry (error only) 2,611 82% 2,637 -1%

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
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