Skip to content

fix(ci): compare native binary size against PR merge base#2112

Merged
fengmk2 merged 3 commits into
mainfrom
fix/binary-size-merge-base
Jul 10, 2026
Merged

fix(ci): compare native binary size against PR merge base#2112
fengmk2 merged 3 commits into
mainfrom
fix/binary-size-merge-base

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jul 9, 2026

Copy link
Copy Markdown
Member

The size gate compared the PR head against the current tip of the base branch. A branch that forked before a native-input change landed on main failed the hash comparison and got a six-platform rebuild plus a size report whose deltas came from commits already on main. #2111 hit this: an RFC-only PR received the size report for the #2104 dependency upgrade.

The gate now resolves the merge base and both compares and builds against it. The build runs only when the PR itself changes a native input, and the report covers only the PR's own delta. PRs that edit this workflow file still trigger a run.

The run on this PR exercised the new path end to end: base built at the merge base, head at the PR, and the size report shows 0 B raw delta on every artifact.

@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit ee0ba23
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a507029493211000822fac1

fengmk2 commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Native binary sizes (ee0ba23)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.

Artifact Format Base PR Change
vp (Linux x64) Binary 10.28 MiB 10.28 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.41 MiB 4.41 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 33.41 MiB 33.41 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 12.78 MiB 12.78 MiB +1 B (+0.00%)
vp (macOS ARM64) Binary 7.61 MiB 7.61 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.82 MiB 3.82 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 40.77 MiB 40.77 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 17.04 MiB 17.04 MiB +109 B (+0.00%)
vp (Windows x64) Binary 8.33 MiB 8.33 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 3.63 MiB 3.63 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 27.87 MiB 27.87 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 10.78 MiB 10.78 MiB 0 B (0.00%)
Trampoline (Windows x64) Binary 203.00 KiB 203.00 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 97.91 KiB 97.91 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.46 MiB 4.46 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.08 MiB 2.08 MiB 0 B (0.00%)

@fengmk2 fengmk2 marked this pull request as ready for review July 10, 2026 02:11
@fengmk2 fengmk2 self-assigned this Jul 10, 2026
@fengmk2 fengmk2 requested a review from wan9chi July 10, 2026 02:12
@fengmk2

fengmk2 commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 17c098aa7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

fengmk2 added 2 commits July 10, 2026 10:39
The size gate diffed the PR head against the live tip of the base branch,
so a branch merely behind on native-input changes already merged into the
base branch would rebuild and post a size report it does not own (for
example a docs-only PR forked before a dependency upgrade).

Resolve the merge base and both compare and build against it, so the gate
decision and the reported delta reflect only the PR's own changes.
Drop the explicit fetch of base.sha: checkout with fetch-depth 0 fetches
every branch, so the extra fetch was a no-op round trip on each PR push.
Fetch with filter blob:none: merge-base resolution needs commit ancestry,
not historical blobs, cutting the gate checkout from ~28 MiB to ~10 MiB.
Rename the base_sha output to merge_base_sha to distinguish it from
pull_request.base.sha.
@fengmk2 fengmk2 force-pushed the fix/binary-size-merge-base branch from 9f793ef to 8854385 Compare July 10, 2026 02:40
@fengmk2 fengmk2 requested a review from cpojer July 10, 2026 04:08
@fengmk2 fengmk2 merged commit 5b216f2 into main Jul 10, 2026
57 checks passed
@fengmk2 fengmk2 deleted the fix/binary-size-merge-base branch July 10, 2026 05:21
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.

2 participants