Add package-size PR comments#309
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3b2e7d0 to
d7ee161
Compare
Package Size
Measured from the PR base SHA and PR head SHA. This comment reports package artifact sizes only; it is not a final app binary-size report. |
9c69f52 to
72199ea
Compare
Assisted-By: devx/2d407d2d-edb2-4884-b788-a5b3151d00f1
72199ea to
fd696cf
Compare
markmur
approved these changes
Jun 22, 2026
markmur
pushed a commit
that referenced
this pull request
Jun 22, 2026
Assisted-By: devx/2d407d2d-edb2-4884-b788-a5b3151d00f1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stack Context
This stack adds a non-required package-size signal for Checkout Kit PRs, then trims RN package-only test files that the size report makes visible.
Why?
PR builds currently do not surface published artifact-size changes. This adds a PR-only workflow that measures package artifacts from the PR base SHA and PR head SHA, then updates a sticky PR comment with base/head/delta rows.
The workflow intentionally stays out of
CI Required. It adds extra latency by measuring both sides of the diff, but it does not block merging when the required CI suite is green.What gets measured?
pnpm build, thenpnpm pack, and reports the generated npm tarball size.@shopify/checkout-kitpackage as published to npm.pnpm module clean,pnpm module build, thenpnpm packinside the RN module package.@shopify/checkout-kit-react-nativenpm package: JS outputs, TS/source files, native bridge source, podspec/Gradle config, and bundled protocol package files.com.shopify:checkout-kitAAR in a consuming app../gradlew :lib:assembleReleaseand reportsplatforms/android/lib/build/outputs/aar/lib-release.aar.How are deltas calculated?
The workflow checks out both sides of the PR:
github.event.pull_request.base.shagithub.event.pull_request.head.shaThat makes the delta stack-aware. For example, a stacked PR compares against its parent PR branch rather than
origin/main, so the comment reflects only the package-size impact of that PR in the stack.If base measurement fails, the workflow still measures the head and renders the base/delta cells as unavailable.
Why no Swift yet?
Swift/SPM does not publish a single binary artifact in this repo. It ships source/resources through Swift Package Manager, and the CocoaPods spec is also source-based. We could cheaply measure an SPM or CocoaPods source/resource payload, but that is a different kind of signal from npm tarballs and the Android AAR.
For now this PR skips Swift so the comment stays focused on directly published package artifacts. A follow-up could add a clearly labeled
Swift — SPM source/resource payloadrow if that signal becomes useful.