#30294·fastlane

[spaceship] Client methods whose HTTP requests no spec exercises

Author: lacostejCreated Sep 29, 2026Updated Sep 29, 2026

While removing unused WebMock stubs (#30288), we found stubs that were never requested since the day they were added. For each feature, the commit that added it also added a spec that mocks the client method (expect(client).to receive(:create_passbook!)), so the model is tested, but the client method that builds the request (endpoint, parameters, response parsing) has never run in a spec. The stubs and fixtures such a client spec would need were deleted in #30288 and can be restored from its history; #30288 itself adds client specs for create_website_push! and delete_website_push!.

Which endpoints Apple still answers was checked against a real account, with reads only: an App Store Connect API key for the official API, and an Apple ID for the internal ones.

Worth client specs: internal APIs with no official equivalent, or used by a fastlane tool

  • repair_provisioning_profile! (Developer Portal): used by sigh repair, via Spaceship.provisioning_profile and repair!. The official API has profiles, which ConnectAPI already supports, but no repair; the alternative would be delete and recreate.
  • team_invite, team_remove_member! (Developer Portal): no fastlane tool uses them. The official API's users and invitations answer; whether they cover the same team membership needs checking.
  • delete_beta_feedback (App Store Connect's internal iris host): the official API has no betaFeedbacks resource (GET /v1/betaFeedbacks answers 404 PATH_ERROR), so it only works with an Apple ID.

Migrate rather than test: an official equivalent exists

  • Pass type IDs (create_passbook!, delete_passbook!): the official API has list, read, create, modify and delete, and /v1/passTypeIds answers. No fastlane tool uses them. The deleted addPassTypeId.action.json fixture was a copy of the website push response, under the wrong key, and the removed macOS stubs were for a mac: option these methods do not have.
  • Merchant IDs: /v1/merchantIds answers; produce merchant still uses the internal API. The internal macOS path does not exist, see #30292.

Legacy iTunes Connect (WebObjects)

  • Gone at Apple, a plain 404 page: build_trains, all_build_trains, all_builds_for_train. No fastlane tool uses them, and Spaceship::ConnectAPI.get_builds covers them. Two of them return nil instead of failing, see #30293.
  • Still answer, but untested at the client level: get_build_info_for_review, build_details, versions_history, version_states_history.
  • Write, so not checked: update_build_trains!, update_build_information!, remove_testflight_build_from_review!, reject! (on TunesClient), reinvite_member.

These are only called by spaceship's own Tunes models. Spaceship::Tunes as a whole is not deprecated and cannot simply be: precheck fetches in-app purchases through it, and fastlane init logs in and selects the team with it.

Proposal: client specs for the first group, one small PR per area, with stubs local to each spec; a separate proposal to use the official API for pass type IDs and merchant IDs; deprecating the three legacy methods that are gone; and a decision on the remaining legacy methods.