Skip to content

fix(ci): TestFlight finish waits for the uploaded build - #80

Merged
nicglazkov merged 1 commit into
mainfrom
fix-testflight-race
Aug 1, 2026
Merged

fix(ci): TestFlight finish waits for the uploaded build#80
nicglazkov merged 1 commit into
mainfrom
fix-testflight-race

Conversation

@nicglazkov

Copy link
Copy Markdown
Owner

Summary

The forced validation run of the TestFlight refresh exposed a race inherited from the reference script: finish polls 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_NUMBER to the job env, and finish receives it as ASC_EXPECTED_VERSION, polling until that exact CFBundleVersion appears and reaches VALID (45 min budget instead of 30).

Test plan

  • Validation run 30684878692 demonstrates the race (publish finished 2s after upload against the old build)
  • After merge: re-dispatch the workflow with force=true and confirm the new build is attached to the public group

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ljo18m9Wka5Shs5b1AtPYA

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
@nicglazkov
nicglazkov merged commit 74ac032 into main Aug 1, 2026
3 checks passed
@nicglazkov
nicglazkov deleted the fix-testflight-race branch August 1, 2026 05:15
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