Skip to content

chore(size-limit-action): Resolve baseline by walking git history - #24310

Merged
mydea merged 1 commit into
developfrom
fix/size-limit-baseline-from-git-history
Sep 11, 2026
Merged

chore(size-limit-action): Resolve baseline by walking git history#24310
mydea merged 1 commit into
developfrom
fix/size-limit-baseline-from-git-history

Conversation

@mydea

@mydea mydea commented Sep 10, 2026

Copy link
Copy Markdown
Member

The size-limit GitHub action was comparing PRs against a stale develop baseline — e.g. #24299 (run at 12:10 on Sep 10) picked a baseline build from Sep 8, two days and many commits behind the tip, without the "not the latest" warning banner.

Root cause

Baseline resolution drove off listWorkflowRuns filtered by branch + event=push. That listing is backed by an eventually-consistent index that can omit or reorder recent runs. At the time #24299 ran, that index returned the Sep 8 run as the first (newest) result even though six completed Sep 10 develop runs already carried the size-limit-action artifact — so the action took the Sep 8 build and stopped.

Solution

Now, we pick the latest commits from git, and fetch the artifacts for their CI runs. This should always be correct and not eventually consistent.

The size-limit GH action resolved the develop baseline from
`listWorkflowRuns` filtered by branch + event. That listing is backed by
an eventually-consistent index that can omit or reorder very recent runs,
so the action would silently compare against a days-old baseline while
still reporting it as the latest one (the `isLatest` flag was derived from
`filtered[0]` of the same stale listing, so it could never detect the
staleness it was meant to warn about).

Drive baseline resolution from `repos.listCommits` (authoritative,
strictly ordered git history) instead, and pin each candidate run by exact
`head_sha`. Walking commits newest-first means the order is exact and, when
the tip commit has no artifact yet, we fall back to its parent and
correctly report the baseline as not-latest so the warning banner fires.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mydea mydea changed the title fix(size-limit-action): Resolve baseline by walking git history chore(size-limit-action): Resolve baseline by walking git history Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.92 kB - -
@sentry/browser - with treeshaking flags 27.21 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.11 kB - -
@sentry/browser (incl. Tracing) 50.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 50.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 53.27 kB - -
@sentry/browser (incl. Tracing, Replay) 89.77 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 78.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 94.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 107.47 kB - -
@sentry/browser (incl. Feedback) 46.41 kB - -
@sentry/browser (incl. sendFeedback) 33.97 kB - -
@sentry/browser (incl. FeedbackAsync) 39.08 kB - -
@sentry/browser (incl. Metrics) 29.93 kB - -
@sentry/browser (incl. Logs) 30.2 kB - -
@sentry/browser (incl. Metrics & Logs) 30.87 kB - -
@sentry/react 30.67 kB - -
@sentry/react (incl. Tracing) 52.6 kB - -
@sentry/vue 36.16 kB - -
@sentry/vue (incl. Tracing) 52.53 kB - -
@sentry/svelte 28.93 kB - -
CDN Bundle 30.66 kB - -
CDN Bundle (incl. Tracing) 50.78 kB - -
CDN Bundle (incl. Logs, Metrics) 32.93 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 52.74 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.62 kB - -
CDN Bundle (incl. Tracing, Replay) 88.33 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 90.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 94.37 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 96.38 kB - -
CDN Bundle - uncompressed 90.73 kB - -
CDN Bundle (incl. Tracing) - uncompressed 151.69 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.31 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 157.66 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.72 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 271.26 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 277.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 284.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 290.9 kB - -
@sentry/nextjs (client) 54.92 kB - -
@sentry/sveltekit (client) 50.7 kB - -
@sentry/core/server 37.08 kB - -
@sentry/core/browser 13.66 kB - -
@sentry/node 128.59 kB +0.02% +14 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.82 kB - -
@sentry/node - without tracing 89.55 kB +0.04% +30 B 🔺
@sentry/node - without channel injection 107.53 kB +0.03% +22 B 🔺
@sentry/aws-serverless 97.77 kB +0.03% +22 B 🔺
@sentry/cloudflare (withSentry) - minified 203.01 kB - -
@sentry/cloudflare (withSentry) 505.44 kB - -

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4022882. Configure here.

}
core.warning(`No "${artifactName}" artifact found on branch "${branch}".`);
return null;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix PR missing regression tests

Medium Severity

This fix PR adds no unit, integration, or E2E test for the stale-baseline regression. Flagged because the review rules file asks for a test that fails without the change and passes with it, so the listCommits walk, head_sha pinning, and truthful isLatest behavior are covered.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 4022882. Configure here.

@mydea
mydea marked this pull request as ready for review September 11, 2026 07:25
@mydea
mydea requested review from Lms24 and chargome September 11, 2026 07:25

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks reasonable to me.

One ask: I'd appreciate more condensed and less AI-generated PR descriptions. In this case, Linear's PR review guide summary helped a lot understand what's going on.

@mydea

mydea commented Sep 11, 2026

Copy link
Copy Markdown
Member Author

Change looks reasonable to me.

One ask: I'd appreciate more condensed and less AI-generated PR descriptions. In this case, Linear's PR review guide summary helped a lot understand what's going on.

Yeah, you are right, this is a pretty confusing PR description, sorry about that.

@mydea
mydea merged commit 413eed2 into develop Sep 11, 2026
44 checks passed
@mydea
mydea deleted the fix/size-limit-baseline-from-git-history branch September 11, 2026 07:46
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.

3 participants