Skip to content

ci(size): TV APK size baseline is stale — the gate now fails every PR that builds TV #1364

Description

@ucguy4u

The TV leg of build-android fails the APK size guardrail on PRs that do not change TV size at all.

Measurement

  • Gate reading on fix: Pixel 9 QA pass — chat dead end, silent playlist failure, forced portrait, red suites #1362: tv | app-arm64-v8a-release.apk | 31.80 MB | budget 35.00 MB | baseline 29.63 MB | +7.31% | FAIL: exceeds 5% baseline increase
  • Built origin/main (678446b3) locally with the exact CI flags (--release --target=lib/main_tv.dart --target-platform=android-arm64 --dart-define=APP_VARIANT=tv --dart-define=APP_PLATFORM=androidTv --tree-shake-icons --split-debug-info --obfuscate): 31.80 MB, the same figure.

So main itself is 7.31% over the recorded baseline. The PR is size-neutral; the gate is measuring accumulated growth on main and charging it to whichever PR runs next. Every PR that builds the TV variant fails this check until the baseline moves.

Why the baseline never caught up

.github/apk-size-baselines.tsv says "This file is updated automatically after successful main builds", but its last content change was 18200609 (shell/TV/Coins composition unification). The update-apk-size-baselines job reports skipping on PR runs, and it cannot run after a main build that fails this same gate — so once main drifts past 5%, the refresh path is unreachable and the gate stays red for everyone.

Current recorded baselines:

component baseline budget
full 453201577 B (432.2 MB) 35 MB
tv 31071323 B (29.63 MB) 35 MB
coins 20745001 B (19.78 MB) 25 MB

(The full row is also worth a look — a 432 MB baseline against a 35 MB budget column reads like the budget is not being applied to that component.)

Decisions needed from the release owner

  1. Where did the 2.2 MB go? Absorbing it into the baseline accepts it permanently. It may be legitimate (TV gained features since 18200609) or a regression worth reverting; it should be attributed before it is accepted.
  2. Refresh the baseline to main's measured size once (1) is answered, in a commit that cites the measurement.
  3. Break the deadlock so this cannot recur: let the baseline refresh run on main even when the delta check fails (report-only on main, enforcing on PRs), or allow an explicit labelled override on a PR that intends to move the baseline.

Not fixing this in #1362, because bumping a size guardrail permanently accepts growth that PR did not cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/ci-cdCI/CD & Release Agent tasksbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions