Skip to content

Pin the CocoaPods installer used by iOS releases - #30181

Merged
nwparker merged 1 commit into
mainfrom
nwparker/deps-ios-installer
Oct 18, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/deps-ios-installer

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​220 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​216

ELI5

An iOS release currently downloads an unpinned npm program to install CocoaPods. Releases will instead use the exact CocoaPods version and gem checksums reviewed in the repository.

What Changed

Pin CocoaPods 1.17.0 beside Fastlane in the existing frozen Ruby bundle and run bundle exec pod install from mobile/ios. Add a scoped macOS PR check that runs this command against a local pod and a temporary Xcode project, verifies the installed version and workspace, and confirms that frozen Bundler rejects a changed tool manifest.

Why

Using the existing Ruby lockfile removes the extra executable download without adding a second package manager or an npm override. The locked installer also supplies CocoaPods instead of relying on a runner's global installation. CocoaPods requires public_suffix 4.x, so the shared lock changes that gem from 7.0.5 to 4.0.7; Fastlane remains 2.240.1.

Linked Issue

Maintainer-requested supply-chain follow-up; no existing issue.

Visual Proof

N/A — release tooling only; no application UI changes.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

On macOS 26.3.1, Ruby 4.0.6 and Xcode 26.1.1:

  • Frozen bundle install and bundle check passed using an isolated /tmp bundle.
  • Real local pod installation and Xcode project integration passed; frozen manifest drift was rejected.
  • Fastlane lane-loading smoke check passed; Ruby release tests passed (15 tests, 32 assertions).
  • Workflow routing tests passed (104 tests).
  • Formatting, changed-code quality and diff checks passed.
  • Actionlint passed with existing diagnostics filtered: unsupported pre-existing background/wait steps and SC2016 on an unchanged JavaScript snippet. Unfiltered actionlint still reports those baseline diagnostics.

The new PR job runs the installer check with Ruby 3.3, matching release CI, without signing credentials or uploads. Typecheck/application builds are unaffected; normal PR CI remains enabled.

Review

The pin and checksums cover the Ruby installer, not every native pod downloaded by the generated application Podfile. Native dependency locking and registry provenance remain separate follow-ups; no generated native project is committed here.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Only the macOS iOS release installer changes. Other platforms and remote execution are unaffected. Existing release checks, signing order and upload steps are preserved.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The Gemfile pins CocoaPods at version 1.17.0. A new macOS check installs a local fixture pod with frozen Bundler settings and verifies the installation and lockfile behavior. The mobile verify job exposes the Ruby release-check scope and conditionally runs this check. The iOS release workflow runs the Bundler-installed CocoaPods executable from mobile/ios.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to a4ef2

The release path can proceed, but the installer check has limited reliability in local runs. Address these checks or accept the bounded risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: pinning the CocoaPods installer used by iOS releases.
Description check Passed The description is complete and aligned with the template. It explains the change, rationale, testing, scope, visual-proof status, and checklist. It does not link an issue, but it explicitly identifie…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is complete and aligned with the template. It explains the change, rationale, testing, scope, visual-proof status, and checklist. It does not link an issue, but it explicitly identifies this as a maintainer-requested follow-up, which matches the template's maintainer exception.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments: 2
mobile/scripts/check-cocoapods-install.rb: 2

13-13: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

locked_version lookup depends on the process environment, not on the Gemfile path.

Bundler.definition reads BUNDLE_GEMFILE from the process environment. The script computes gemfile on Line 10, but it does not set ENV["BUNDLE_GEMFILE"]. The workflow runs the script with bundle exec, which sets this variable. A direct ruby scripts/check-cocoapods-install.rb run can resolve a different Gemfile or fail.

Set ENV["BUNDLE_GEMFILE"] = gemfile before the lookup. Alternatively, use Bundler::LockfileParser.new(original_lock).

Proposed fix
-locked_version = Bundler.definition.locked_gems.specs.find { |spec| spec.name == "cocoapods" }.version.to_s
+locked_version = Bundler::LockfileParser.new(original_lock).specs.find { |spec| spec.name == "cocoapods" }.version.to_s

73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

The lockfile-unchanged check does not run when an earlier step aborts.

abort exits the script before Line 73. The temporary directory is cleaned up. The lockfile is not restored. This matters only for local runs. In CI, the checkout is discarded.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b00be404-782c-4402-aebb-291f33bfac8d
📥 Commits

Reviewing files that changed from the base of the PR and between 6c45958 and a4ef242.

⛔ Files ignored due to path filters: 1
  • mobile/Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing: 4
  • .github/workflows/mobile-ios-release.yml
  • .github/workflows/mobile.yml
  • mobile/Gemfile
  • mobile/scripts/check-cocoapods-install.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@nwparker
nwparker merged commit ed40719 into main Oct 18, 2026
22 checks passed
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