Auto-submit external TestFlight beta reviews
Merged
AZ
3mo ago+705+705+012345678901234567890123456789-33-33-01234567890123456789
Summary
- extend external TestFlight distribution to submit builds for Beta App Review when Apple reports
READY_FOR_BETA_SUBMISSION - keep the external distribution helper idempotent for already-submitted and already-approved builds
- document the new main-tracking behavior and cover the submission logic in workflow helper tests
Testing
- python3 tests/test_ios_testflight_external_distribution.py
- bash -n ios/scripts/upload-testflight.sh
- python3.9 -m py_compile ios/scripts/asc_assign_external_testflight_group.py
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Auto-submits external TestFlight builds for Beta App Review when Apple marks a new MARKETING_VERSION as READY_FOR_BETA_SUBMISSION, removing a manual step and speeding up external releases. The flow is idempotent, resilient to ASC delays, handles sibling-review races, and continues to auto-assign builds to the external group.
- New Features
asc_assign_external_testflight_group.pynow polls ASC and creates/reuses the submission forREADY_FOR_BETA_SUBMISSION; it treatsAPPROVED/IN_REVIEW/WAITING_FOR_REVIEWas success, no-ops when the build is already approved/testable, waits if a same-version sibling build is in review, retries transient lookup/submit errors, and fails on unexpected states; writes an assign state to${CMUX_TESTFLIGHT_ASSIGN_STATE_OUT_FILE}.- The workflow uploads
ios-testflight-assignment-state-{complete|pending}artifacts and the schedule uses them to retry assignment-only when sibling reviews block; if artifacts have expired (30d), missing state is treated as complete to avoid permanent red. - Adds a one-time
marketing_version_overridepath to upload latestmainunder an approved MARKETING_VERSION (skips notes; disallowsbuild_number); publishesios-testflight-build-metadata-overrideand excludes override runs from canonical “last uploaded” detection. - Raises external distribution timeout to 40m; updates
ios/README.md, workflow summaries, andupload-testflight.shto reflect automatic submission; expands tests to cover polling/retry, sibling-review handling, submission races, and delayed metadata.
Summary by CodeRabbit
- New Features
- Added an optional manual marketing-version override for re-uploading the current iOS build without triggering a new Beta App Review cycle.
- Documentation
- Updated TestFlight automation docs and command help to clearly describe automatic Beta App Review submission when builds are ready, plus required API key inputs.
- Bug Fixes
- Improved external distribution reliability by better detecting when Beta App Review submissions already exist, reusing/creating them as appropriate, and refining upload/assignment behavior.
- Tests
- Expanded and stabilized coverage for external review submission paths, retries, idempotency, and race/error handling.