…seen
Root cause of builds 40/41 never notifying testers, found by the user:
this workflow's default build number (github.run_number) only tracks
this workflow's own run count. Build 148 -- an out-of-band CircleCI
fallback-pipeline test upload, a completely separate path -- landed with
a build number far above where run_number was at the time. Apple's
uniqueness check is per exact build number, not strictly-increasing, so
every run_number-based build after that (40, 41) uploaded and validated
fine, reached externalState=IN_BETA_TESTING, autoNotifyEnabled=true,
group-assigned correctly -- every field an exhaustive API diagnostic
sweep could check was clean. But TestFlight never treats a numerically
lower build as newer than one it's already seen, so neither build was
ever offered to testers or triggered a notification. Currently testing
this theory live: build 149 (manually dispatched with build_number=149,
higher than 148) is uploading now; if it's the first build since 148 to
actually reach a device, this is confirmed.
Fix: when build_number isn't explicitly provided, query the App Store
Connect API for the highest build number seen for this app on any
upload path, and use max(that, run_number) + 1 instead of trusting
run_number blindly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Root cause of builds 40/41 never notifying testers, found by the user
(not something the API diagnostics in #643/#652/#654 could surface, since
build-number ordering is a cross-build comparison, not a property of any
single build's own state).
ios-testflight.yml's default build number isgithub.run_number— thisworkflow's own run counter. Build 148 was uploaded via a completely
separate path (the CircleCI fallback pipeline's own TestFlight
verification test — see its own "What to Test" text and
docs/circleci-agent-pipeline-design.md) with a build number far abovewhere
run_numberwas at the time. Apple's upload uniqueness check is perexact build number, not strictly-increasing, so every
run_number-basedbuild since (40, 41) uploaded and validated cleanly, reached
externalState=IN_BETA_TESTING,autoNotifyEnabled=true, correct groupassignment — every field checkable via the API was clean. But TestFlight
never treats a numerically lower build as newer than one it's already
seen, so neither was ever offered to testers or triggered a notification.
Currently testing live: build 149 (
build_number=149, manuallydispatched, higher than 148) is uploading now to confirm.
Fix: when
build_numberisn't explicitly provided, query the App StoreConnect API for the highest build number seen for this app across any
upload path, and use
max(that, run_number) + 1instead of trustingrun_numberblindly.🤖 Generated with Claude Code