Skip to content

Gate Android releases on emulator lifecycle and startup acceptance - #20485

Merged
Git-on-my-level merged 5 commits into
mainfrom
codex/android-emulator-release-gates
Oct 3, 2026
Merged

Git-on-my-level merged 5 commits into
mainfrom
codex/android-emulator-release-gates

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

What changed and why

The Android startup cancellation race fixed in #20437 passed host tests and reproduced only in Android's real foreground-service command queue. Add Android 16 emulator acceptance to the existing Mobile App Checks workflow: 25 native lifecycle stress cases using production service sources and three offline cold launches of a minified AOT fixture APK that must render Get Started and retain the same healthy process.

Android full-release and production Shorebird-patch tag builds now require a successful non-skipped emulator job on the exact main source SHA, alongside the existing release proofs. Manual execution of the existing workflow supplies that proof when ordinary path-based checks were skipped. Broaden Android PR selection to startup, capture, WAL and acceptance-runner inputs, and retain logs, screenshots, UI hierarchies and artifact hashes.

Product invariants affected

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

The Codemagic edit only selects stricter Android source admission. Production authority, auth/session ownership and desktop Beta identity remain covered by their existing contracts.

How it was verified

  • Android 16/API 36 local emulator: all 25 native service cases passed without process crashes, service, notification or wake-lock leaks.
  • Three additional offline cold launches passed on a universal APK reconstructed from released build 1338. It is debug re-signed for the local emulator, so this does not claim original-signature or Play split-install acceptance.
  • Offline unit fixtures exercise failed startup, ANR/process restart, missing rendered UI, account-state refusal, network restoration and exact-source admission rejection.
  • Actionlint, CI budget validation and repository preflight.
  • The packaged startup check uses local Firebase fixtures and debug signing, with network connectivity disabled before installation. This does not prove physical BLE/OEM behavior, authenticated upgrades, or the signed Play split-install artifact. Linux/KVM CI validates the x86_64 lane; local acceptance uses arm64.

Tests

Behavioral tests run the actual aggregate shell with failed/cancelled/skipped outcomes and refuse Android release admission without a successful real canonical job. A behavioral test executes the actual Shorebird publishing script and proves failed admission cannot reach publication. Collector fixtures cover push/manual acceptance, stale SHA, wrong branch/workflow/event, reruns and skipped jobs. Startup fixtures cover successful execution and failure receipts/cleanup.

Failure class (fixes)

Failure-Class: FC-foreground-start-cancelled-before-delivery

New guards

Real instance: #20437. Reuse the production-source native probe and a shared bounded ADB/offline boundary; Android's asynchronous foreground-service delivery requires emulator execution rather than a host-only assertion. The deterministic contract fixtures are registered for local and CI lanes.

The Linux daily budget cap increases from 11,900 to 12,100 minutes to cover the new selected emulator lane and broader startup/WAL selection; other caps are unchanged. The Codemagic whole-document hashes are refreshed for the shared Android admission boundary on full-release and OTA-patch paths only; desktop workflow/publication contracts are unchanged.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T18:02:12.377061Z 9ef4b1e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found and verified against the latest diff

Confidence score: 4/5

  • The 35-minute limit in .github/workflows/mobile-app-checks.yml may be tight for a cold x64 release build, emulator startup, and all 25 probe cases, risking timeouts on slower runs. Add headroom or reduce the probe workload.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/mobile-app-checks.yml">

<violation number="1" location=".github/workflows/mobile-app-checks.yml:531">
P3: The 35-minute job budget leaves little headroom for the new worst-case pacing: cold x64 release R8 build with `cache-read-only`, emulator boot, then up to 25 probe cases at 60 s each (`--rounds 5`, five modes, `deadline = time.monotonic() + 60`), plus three ~20 s startup-smoke rounds. On a busy host a cancelled job yields `needs.android-emulator-checks.result == 'cancelled'`, which hard-fails Mobile Release Eligibility and loses the in-progress receipt/evidence. Raise the budget to 60 or split the probe and smoke into separate steps/jobs so each fails independently.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/docs/android-emulator-acceptance.md Resolved
Comment thread app/scripts/android_startup_smoke.py Resolved
Comment thread .github/workflows/mobile-app-checks.yml Resolved
Comment thread .github/ci-budget.yaml Resolved
Comment thread scripts/pre_push_ci_prediction.py Resolved
Comment thread .github/workflows/mobile-app-checks.yml Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6ad99d11c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codemagic.yaml Resolved
@Git-on-my-level
Git-on-my-level merged commit f3b233c into main Oct 3, 2026
60 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/android-emulator-release-gates branch October 3, 2026 18:37
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