chore(size-limit-action): Resolve baseline by walking git history - #24310
Conversation
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>
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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; | ||
| } |
There was a problem hiding this comment.
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.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 4022882. Configure here.
Lms24
left a comment
There was a problem hiding this comment.
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. |


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
listWorkflowRunsfiltered bybranch+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 thesize-limit-actionartifact — 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.