Add launchpad diff command for build-to-build size comparison#642
Add launchpad diff command for build-to-build size comparison#642trevor-e wants to merge 1 commit into
launchpad diff command for build-to-build size comparison#642Conversation
Adds a `diff` CLI command that analyzes two artifacts and reports the size delta between them: total install/download size changes, per-category deltas, and per-file added/removed/modified changes. Supports table and JSON output. Useful for catching size regressions between builds. Generated with [Linear](https://linear.app/getsentry/issue/EME-1224/build-something-cool#agent-session-6e6bd37b) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
📲 Install BuildsiOS
Android
|
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.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf5cc20. Configure here.
| file_changes.append(FileChange(path=path, kind=ChangeKind.REMOVED, head_size=0, base_size=base_file.size)) | ||
| elif base_file is not None and head_file is not None: | ||
| if base_file.hash == head_file.hash and base_file.size == head_file.size: | ||
| continue |
There was a problem hiding this comment.
Empty hash skips real changes
Medium Severity
For paths present in both builds, compute_diff skips reporting when hash and size both match. Android analysis sets hash to an empty string for merged entries (e.g. combined DEX or duplicate paths), so two builds can differ in content while still being treated as unchanged when merged sizes match.
Reviewed by Cursor Bugbot for commit bf5cc20. Configure here.


Adds a
diffCLI command that analyzes two artifacts and reports the size delta between them — useful for catching size regressions between builds.It reports:
--limitcaps rows in table output.The core comparison lives in
compute_diff(size/diff.py) operating onBaseAnalysisResults, so it's platform-agnostic and unit-tested independent of the CLI. Table rendering reuses the existingsizecommand's byte formatting.Testing
tests/unit/size/test_diff.pycovers added/removed/modified/unchanged classification, category deltas, identical-build no-ops, and JSON serialization.tests/unit/test_cli.py.make checkpasses (lint/format/types).