fix(ci): TestFlight finish waits for the uploaded build - #80
Merged
Conversation
Right after an upload the new build is not visible in the App Store Connect API yet, so the finish step matched the previous, already-VALID build and published nothing. The forced validation run proved it: build 202608010456 uploaded and the publish step finished in two seconds against the older build. The archive step now exports its date-based build number and the finish step polls until that exact version appears and processes, up to 45 minutes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ljo18m9Wka5Shs5b1AtPYA
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.
Summary
The forced validation run of the TestFlight refresh exposed a race inherited from the reference script:
finishpolls the newest build, but immediately after upload the new build is not in the API yet, so the step matched the previous already-VALID build, attached it again (409, tolerated), and reported success without ever publishing the new build.Fix: the Archive step exports
BUILD_NUMBERto the job env, andfinishreceives it asASC_EXPECTED_VERSION, polling until that exactCFBundleVersionappears and reaches VALID (45 min budget instead of 30).Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ljo18m9Wka5Shs5b1AtPYA