Repository navigation
fix(mobile): unblock iOS releases and prepare 0.0.36 - #10888
Merged
Merged
Conversation
The closed-train guard looked up each candidate version's own App Store record, but a version only gets one once it is submitted for review. 0.0.34 reached TestFlight and was never submitted, so it had no record, nothing looked closed, and the patch-bump walk stopped there — while 0.0.35 had already shipped. Apple rejected the upload after a 24-minute build (90186 closed train, 90062 needs a higher CFBundleShortVersionString). Fetch the highest closed version once and treat everything at or below it as closed, comparing semver numerically so 0.0.10 outranks 0.0.9. Also read appVersionState alongside appStoreState: the latter is deprecated in App Store Connect API 3.3 and renames the shipped state to READY_FOR_DISTRIBUTION, so reading only the old field would silently find zero closed versions once Apple stops populating it.
Contributor
📝 WalkthroughWalkthroughThe release version guard now recognizes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
app.json sat at 0.0.32 while 0.0.35 shipped on the App Store, because release versions are resolved on the runner and never committed back. Close the four-version drift so the checked-in version matches reality and the iOS release no longer depends on the closed-train walk to find an open version. Bump Android versionCode 8 -> 9 in the same commit: the version is shared between platforms, and shipping 0.0.36 with the code that already shipped for 0.0.32 produces an APK that cannot install over the released build.
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
* fix(mobile): block iOS uploads below the last shipped App Store version The closed-train guard looked up each candidate version's own App Store record, but a version only gets one once it is submitted for review. 0.0.34 reached TestFlight and was never submitted, so it had no record, nothing looked closed, and the patch-bump walk stopped there — while 0.0.35 had already shipped. Apple rejected the upload after a 24-minute build (90186 closed train, 90062 needs a higher CFBundleShortVersionString). Fetch the highest closed version once and treat everything at or below it as closed, comparing semver numerically so 0.0.10 outranks 0.0.9. Also read appVersionState alongside appStoreState: the latter is deprecated in App Store Connect API 3.3 and renames the shipped state to READY_FOR_DISTRIBUTION, so reading only the old field would silently find zero closed versions once Apple stops populating it. * chore(mobile): prepare 0.0.36 app.json sat at 0.0.32 while 0.0.35 shipped on the App Store, because release versions are resolved on the runner and never committed back. Close the four-version drift so the checked-in version matches reality and the iOS release no longer depends on the closed-train walk to find an open version. Bump Android versionCode 8 -> 9 in the same commit: the version is shared between platforms, and shipping 0.0.36 with the code that already shipped for 0.0.32 produces an APK that cannot install over the released build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Run 30238959540 built an .ipa for ~24 minutes, then Apple rejected the upload:
90186— train0.0.34is closed for new build submissions90062—CFBundleShortVersionString [0.0.34]must be higher than the previously approved version0.0.35The closed-train guard was supposed to prevent exactly this, but it asked the wrong question. It looked up each candidate's own App Store record:
A version only gets a record once it is submitted for review.
0.0.34reached TestFlight but was never submitted — no record, so nothing looked closed and the patch-bump walk stopped there. Meanwhile0.0.35shipped, which closes0.0.34retroactively: Apple requires a version higher than the last approved one, not merely one that isn't itself released. The guard checked version-by-version; the real constraint is a floor across the whole app.The same root cause failed run 30169107429 two days earlier, identically.
What changed
fix(mobile): block iOS uploads below the last shipped App Store versionhighest_closed_app_store_versionfetches all versions and takes the highest in a closed state — one call, no per-version filter, so unsubmitted versions no longer create blind spots.closed_train?treats anything<= highest_closedas closed, comparing[major, minor, patch]numerically. A string sort ranks0.0.9 > 0.0.10, which would break at the next double-digit patch.appVersionStatealongsideappStoreState. CI runs fastlane 2.237.0, whereappStoreStateis deprecated as of App Store Connect API 3.3 and the shipped state is renamedREADY_FOR_SALE→READY_FOR_DISTRIBUTION. Reading only the old field would silently find zero closed versions once Apple stops populating it — re-breaking this bug in a way that looks like success.respond_to?-guarded, since older spaceship lacks the new field.The API-error path still degrades to "open" and proceeds, as before — never worse than current behavior.
chore(mobile): prepare 0.0.36app.jsonsat at0.0.32while0.0.35had shipped — four versions of drift, because release versions are resolved on the runner and never committed back. This closes the gap so the checked-in version matches reality, and the iOS release no longer depends on the closed-train walk to find an open version (the walk remains as the safety net).Android
versionCodegoes 8 → 9 in the same commit. The version string is shared between platforms, and shipping0.0.36with the code that already shipped for0.0.32produces an APK that cannot install over the released build. Git history shows this being missed and patched after the fact twice (20ebe858af,d1cc78d5c5), so it is bundled here rather than left as a follow-up.Testing
ruby fastlane/ios_release_version_test.rb, already wired intomobile.ymlCI. New cases cover the 0.0.34 regression, numeric-vs-lexical ordering, minor/major boundaries, and non-semver input.closed_state?helper across both field vocabularies (old-gem, new-field-only, and both-nil).node scripts/prepare-android-release.mjsaccepts the new state:Prepared Orca Mobile Android 0.0.36 (9).Follow-up (not in this PR)
Nothing commits the resolved version back after a release, so
app.jsonwill start drifting again from the next release onward. Worth a durable fix — this PR resets the counter but does not change that mechanism.