Skip to content

ci(app): report debug APK size in the Android compile job summary - #14378

Merged
Git-on-my-level merged 5 commits into
mainfrom
task/msd-ci-f3-app-size
Sep 17, 2026
Merged

Git-on-my-level merged 5 commits into
mainfrom
task/msd-ci-f3-app-size

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Nothing in this repo tracked mobile app size. Android Compile Smoke already builds app-dev-debug.apk (arm64, flavor dev). This PR reports that APK's on-disk size and top-level zip buckets (lib/, assets/, classes.dex, …) into GITHUB_STEP_SUMMARY and uploads apk-size-<sha>.json.

This is a reported number, never a gate. Fork PRs work: no secrets, no PR comment bot.

Why not flutter build apk --analyze-size

Flutter's size tool is release-mode and single-ABI only (https://docs.flutter.dev/perf/app-size). Debug builds are explicitly not representative of Play download size. A second flutter build apk --release --flavor dev --target-platform android-arm64 --analyze-size inside this job would be another full Gradle compile — about 10–15 minutes on top of the existing ~11 minute debug APK, against a 25-minute job ceiling — for a non-gating number.

The zip breakdown costs under a minute (Python zipfile over the APK this job already produced). Coarser, but it always has a number whenever compile smoke runs.

Product invariants affected

none

Failure class (fixes)

Stacked V5 includes fix(ci): drop Gradle configuration cache that broke AGP 8.11.1. This PR's own commit is not a fix.

Failure-Class: none

How it was verified

  • python3 .github/scripts/test_report_debug_apk_size.py
  • actionlint -shellcheck "" .github/workflows/mobile-app-checks.yml
  • uv run --python 3.11.15 --with pytest pytest --noconftest backend/tests/unit/test_workflow_contracts.py
  • OMI_PR_BODY_FILE=.local/pr-body-f3-size.md make preflight

A stacked PR whose base is not main will not start Mobile App Checks until that trigger is unblocked (#14358 follow-up) or the PR is retargeted to main. The report itself is exercised by the script tests.

Tests

  • zip buckets group lib/, assets/, top-level classes.dex
  • CLI writes JSON + summary and exits 0
  • missing APK exits 2 (unreadable input), not a size threshold
  • script source has no THRESHOLD
  • workflow: report_debug_apk_size.py, GITHUB_STEP_SUMMARY, apk-size-<sha> artifact, no --analyze-size, no comment bot, no secrets

Part of the mobile self-driving program (CI and release lane). Implemented by Cursor cursor-grok-4.6-high. A reported number, never a gate. Coordinator verification: the script tests pass (4) and actionlint is clean; the PR's own CI run is the real check of the job-summary output.

🤖 Generated with Claude Code

Review in cubic

Git-on-my-level and others added 5 commits September 17, 2026 16:34
The APK build stays android-arm64 on every event, matching main since
c8f3506. Extra ABIs still OOM ubuntu-latest.

Co-authored-by: Cursor <[email protected]>
CI wiring lives in MOBILE_VERIFY.md so app/AGENTS.md stays inside its
lean budget.

Co-authored-by: Cursor <[email protected]>
Warn mode does not downgrade a cache-state serialization failure of
builtInKotlinServices. Generate the gitignored wrapper with --config-only
so the parallel JVM job can run without an APK compile.

Failure-Class: none
Co-authored-by: Cursor <[email protected]>
--analyze-size needs a second release compile (~10-15 min). The zip
breakdown of the APK this job already builds is a coarse, fork-safe
signal in under a minute, never a gate.

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit a7c1fbc into main Sep 17, 2026
63 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-ci-f3-app-size branch September 17, 2026 22:01
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.

1 participant