Skip to content

feat(mobile): daily store train queues the newest builds for a human release - #20797

Merged
kodjima33 merged 3 commits into
mainfrom
kodjima33/mobile-daily-train
Oct 6, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
kodjima33/mobile-daily-train

Conversation

@kodjima33

@kodjima33 kodjima33 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

A daily store release train for the mobile app. A GitHub cron (14:00 UTC) starts the Codemagic mobile-daily-train workflow on main, which runs app/scripts/mobile_daily_train.py --platform both. Nothing auto-releases: a human still presses Release.

iOS

  • Newest processed TestFlight build above the live App Store version is submitted for review, release type MANUAL, What's New for every live locale.
  • Anything WAITING_FOR_REVIEW / IN_REVIEW holds the train (Apple allows one submission in flight).
  • A version that was approved but never released (PENDING_DEVELOPER_RELEASE) is left alone when it already carries the newest build; otherwise its review submission is cancelled (PATCH /v1/reviewSubmissions/{id} canceled=true) and the newer build is submitted. "If not released by a human, reject and replace with newer."
  • Versions are read per state because the unfiltered App Store Connect listing only returns live versions.

Android

  • Newest internal/alpha build above the live production release is written to production as a draft; each run overwrites the draft; a human presses Release in Play Console.

Release notes come from the unreleased fragments in the checkout, so a submission never ships empty notes. TRAIN_DRY_RUN=true prints the plan only.

Refactor

mobile_store_promote.py gains reusable pieces without changing the manual lane: submit_ios() takes the live locale list and sends --app-store-version-localizations (a bare --whats-new only covers the primary locale, which Apple rejects), select_play_release() takes the source track and parses Play names like "1.0.554 (1335)", play_edit()/play_track() split out of prepare_android(), submit_android() takes status="completed"|"draft".

Docs

Release-process contract documents the train's decisions and the Play draft; app/AGENTS.md points at it.

Verification

  • python3 app/scripts/mobile_daily_train_test.py → 25 OK
  • python3 .github/scripts/test_dispatch_mobile_daily_train.py → 3 OK
  • python3 app/scripts/mobile_store_promote_test.py → 12 OK
  • actionlint on the workflow; scripts/run-release-process-guards.sh (97 tests) green; Codemagic contract fixture digests refreshed with the guard's own loader.
  • Live read-only dry run against App Store Connect: plan=hold because 1.0.554 (1334) is WAITING_FOR_REVIEW today.
  • UNVERIFIED live: no real submission/cancel or Play draft write was executed from this branch (the first scheduled run is the live test; Play writes are unit-tested only, the Play service account lives in Codemagic).

Product invariants affected

  • INV-AUTH-1
  • INV-DATA-1
  • INV-BETA-1

(path-based citations from scripts/pr-preflight --suggest; the train only changes release plumbing and store submission, no auth/data/beta behavior)

mobile_store_promote.py gains the pieces the daily train composes without
changing the manual lane's behavior: submit_ios() accepts the live locale list
and sends --app-store-version-localizations (a bare --whats-new only covers the
primary locale, which Apple rejects), select_play_release() takes the source
track and parses Play Console names like "1.0.554 (1335)", play_edit()/
play_track() split out of prepare_android(), and submit_android() takes
status="completed"|"draft".

Verification: python3 app/scripts/mobile_store_promote_test.py (12 tests OK).
…release

A GitHub cron (14:00 UTC) starts the Codemagic mobile-daily-train workflow on
main, which runs app/scripts/mobile_daily_train.py --platform both.

iOS: the newest processed TestFlight build above the live App Store version is
submitted for review with release type MANUAL and What's New for every live
locale. Anything WAITING_FOR_REVIEW / IN_REVIEW holds the train (one submission
in flight). An approved but unreleased version (PENDING_DEVELOPER_RELEASE) is
left alone when it already carries the newest build; otherwise its completed
review submission is cancelled (PATCH /v1/reviewSubmissions/{id} canceled=true)
and the newer build is submitted. Versions are read per state because the
unfiltered App Store Connect listing returns only live versions.

Android: the newest internal/alpha build above the live production release is
written to production as a draft; each run overwrites the draft, a human
presses Release in Play Console.

Release notes are collected from unreleased fragments in the checkout so a
submission never ships empty notes; TRAIN_DRY_RUN=true prints the plan only.
The Codemagic contract fixture digests are refreshed with the guard's loader.

Verification: python3 app/scripts/mobile_daily_train_test.py (25 OK),
python3 .github/scripts/test_dispatch_mobile_daily_train.py (3 OK),
actionlint on the workflow, scripts/run-release-process-guards.sh and its
97-test suite, and a live read-only dry run against App Store Connect:
plan=hold because 1.0.554 (build 1334) is WAITING_FOR_REVIEW today.
The release-process contract documents the train's iOS/Android decisions and
the Play draft; app/AGENTS.md points at it within its size budget.
@kodjima33
kodjima33 merged commit 3612fa4 into main Oct 6, 2026
59 of 61 checks passed
@kodjima33
kodjima33 deleted the kodjima33/mobile-daily-train branch October 6, 2026 10:29
aryanorastar added a commit to aryanorastar/omi that referenced this pull request Oct 6, 2026
BasedHardware#20797 added .github/workflows/mobile_daily_train.yml without a ci-budget
entry, so check_ci_budget.py fails on main and on every branch whose diff
selects the ci-budget gate. Entries come from `check_ci_budget.py --refresh`,
with rationales taken from the workflow itself: a daily 14:00 UTC schedule
plus manual dispatch, one ubuntu job that only calls the Codemagic API, and
no pull_request or push trigger.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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