Skip to content

Use Ruby 3.4.9 and Xcode 26.6 - #825

Merged
mokagio merged 13 commits into
trunkfrom
mokagio/ainfra-2723-ruby-349-xcode-266
Jul 21, 2026
Merged

Use Ruby 3.4.9 and Xcode 26.6#825
mokagio merged 13 commits into
trunkfrom
mokagio/ainfra-2723-ruby-349-xcode-266

Conversation

@mokagio

@mokagio mokagio commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

While working on #824 , I spun off to upgrade the tools here.

AI-generated details

Description

Moves the repo's CI tooling onto Ruby 3.4.9 and Xcode 26.6 / iOS 26.5, in line with wpios. Fixes AINFRA-2723.

The Ruby and Xcode bumps ride together because they share the CI config, and the lockfile re-resolve is only meaningful against the image that will run it. The a8c-ci-toolkit pin goes from 3.9.1 to 6.1.1 in the same pass — none of the 4.x/5.x/6.x breaking changes reach this pipeline (no pr_changed_files call; the rest are Windows-agent scripts).

Supersedes #803, which stalled on snapshot failures.

Gotchas

The job • pronouns • location line lays out with slightly tighter spacing around its separators on the CI host than on a developer Mac — same string, same font, shifted a pixel or two. Every view that renders that line fails a pixel-exact comparison on CI; views without it match exactly. Hence Snapshotting+HostTolerance.swift, whose thresholds come from the diffs measured in a CI run, not from taste. The file documents the reasoning; the short version is that the allowance stays below the share of the frame that line occupies, so a regression removing it still fails.

Two things that look like escape hatches are not. References cannot be recorded on CI: the run logs "a new snapshot was automatically recorded", but the artifacts come back bit-for-bit identical to what is committed — the simulator sandbox drops the writes. And re-recording locally does not converge, because the coupling is to the host macOS build, which the CI VM images move through on their own schedule.

BUNDLE_FORCE_RUBY_PLATFORM and the ruby-only PLATFORMS section are new, matching wpios — they stop the lockfile pinning gems to a Darwin version the CI image will eventually move off.

Testing Steps

  1. Let Buildkite run.
  2. bundle exec fastlane test locally on Xcode 26.6 (355 tests, 0 failures).
  3. Confirm the Deploy Gravatar DocC workflow still publishes on merge to trunk — it moved to the macos-26 runner.

Notes for reviewers

The two Probe: commits and their reverts are the diagnostic runs that produced the numbers above. Happy to squash them out if you would rather the history not carry them, but they are why the thresholds are what they are.

One of them is worth knowing about independently: wrapping validate_swift_package in || EXIT_CODE=$? suppressed the toolkit function's internal set -e, so a run with 30 failing tests exited 0 and reported a green check. Reverted in 667224d0.

mokagio and others added 4 commits July 21, 2026 14:47
Moves off Xcode 16.2 / iOS 18.2, which no longer has a CI VM image or a
bundled iPhone SE (3rd generation) simulator.

`IMAGE_ID` is now derived from `.xcode-version`, matching wpios and wcios,
so future bumps touch a single file.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
Brings the repo in line with the rest of the mobile repos (AINFRA-2723).

`BUNDLE_FORCE_RUBY_PLATFORM` and the `ruby`-only `PLATFORMS` section keep
the lockfile from pinning gems to a specific Darwin version, so it survives
the CI image's macOS bumps.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
The 4.0.0, 5.0.0 and 6.0.0 breaking changes don't reach this pipeline:
it doesn't call `pr_changed_files`, and the rest are Windows-agent scripts.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
SwiftUI rendering changed between iOS 18 and iOS 26, and the reference
device changed, so every image had to be recaptured.

Recorded on macOS 26.5.2 with Xcode 26.6 (17F113) and the iOS 26.5
simulator, which is what the `xcode-26.6` CI VM runs — these tests are
coupled to the host macOS, not just the Xcode and simulator versions,
so references recorded on a mismatched host fail on CI no matter how
many times they are re-recorded.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
@mokagio
mokagio requested a review from a team as a code owner July 21, 2026 04:50
Copilot AI review requested due to automatic review settings July 21, 2026 04:50
@mokagio mokagio self-assigned this Jul 21, 2026
@mokagio mokagio added the CI/CD label Jul 21, 2026
@mokagio
mokagio enabled auto-merge July 21, 2026 04:51

Copilot AI 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.

Pull request overview

Updates the repository’s CI/tooling configuration to align with newer Ruby and Xcode/iOS versions, including corresponding CI image/toolkit pins and lockfile re-resolution.

Changes:

  • Bump Ruby to 3.4.9 and update Bundler/lockfile settings (including forcing the Ruby platform in Bundler).
  • Move CI/Xcode targeting to 26.6 (and iOS 26.5 simulator usage in Fastlane), including deriving the Buildkite image from .xcode-version.
  • Update the DocC GitHub Actions workflow to run on the newer macOS runner and select the newer Xcode app bundle.

Reviewed changes

Copilot reviewed 6 out of 141 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Gemfile.lock Re-resolves lockfile for Ruby-platform gems and updates Bundler version metadata.
fastlane/Fastfile Updates the simulator OS/device target used by Fastlane test lanes.
.xcode-version Adds Xcode version pin used by CI configuration.
.ruby-version Bumps the Ruby version used by dev/CI tooling.
.github/workflows/docc.yml Moves DocC publishing workflow to the newer macOS runner and Xcode selection.
.bundle/config Forces Bundler to resolve Ruby-platform gems (avoid OS-specific lock entries).
.buildkite/shared-pipeline-vars Derives Buildkite image ID from .xcode-version and bumps CI toolkit pin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +9
# The ~> modifier is not currently used, but we check for it just in case
XCODE_VERSION=$(sed -E 's/^~> ?//' .xcode-version)

export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.9.1"
export IMAGE_ID="xcode-$XCODE_VERSION"
mokagio and others added 8 commits July 21, 2026 14:54
Just to be on the very latest tooling
Temporary. The tests run with `record: .failed`, so a failing CI run
rewrites the mismatching references in place — but on the previous VM
image those writes were silently dropped, and the uploaded artifacts came
back identical to the committed files.

Re-testing that on the `xcode-26.6` image: if the artifacts differ from
what is committed, the CI-recorded images are usable as references.

Revert once the question is answered.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
Views that rasterize an image don't render identically across macOS builds
even with Xcode, the simulator runtime, and the device all matched, and the
CI VM images move through point releases on their own schedule.

Confirmed on this branch: with everything else matched, 30 assertions still
mismatched on CI, all of them image-bearing. Recording on CI is not an
escape either — the artifacts a failing run uploads are bit-identical to
the committed references, so the simulator sandbox is dropping the writes.

Text-only suites match exactly and stay on `.image`.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
Temporary. `record: .failed` replaces the diffing message with a generic
"does not match reference", so the logs can't say whether the images differ
in size — which no precision setting can fix — or by how much they differ
perceptually.

`.never` lets the real message through. Revert once it is read.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
Temporary. The diffing message is lines 2-3 of the failure and xcbeautify
only prints line 1, so the real reason never reaches the log.

The bundle carries it, along with the reference/failure/difference images
the library attaches on failure — a different write path from the
`__Snapshots__` files the simulator sandbox drops.

Revert once the bundle is read.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
The earlier attempt set `perceptualPrecision` alone, which cannot pass:
`precision` stays at 1.0 by default and demands every pixel match, so the
failure count did not move by a single test.

Reading the diffs out of the CI xcresult showed what actually differs — the
`job • pronouns • location` line, laid out with tighter separator spacing on
the CI host. That, not the presence of an image, is what every failing suite
has in common.

Thresholds now come from the measured worst case per view rather than a
guess, and stay tight enough that losing the line would still fail.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Code Opus 4.8 <noreply@anthropic.com>
@wpmobilebot

wpmobilebot commented Jul 21, 2026

Copy link
Copy Markdown
App Icon📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar Prototype Build
Build Number2540
VersionPR #825
Bundle IDcom.automattic.gravatar-sdk-demo-uikit.prototype-build
Commit844de0c
Installation URL7tf6gequ095b8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Comment thread Tests/GravatarUITests/Snapshotting+HostTolerance.swift
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
@mokagio
mokagio merged commit 8d45de9 into trunk Jul 21, 2026
7 checks passed
@mokagio
mokagio deleted the mokagio/ainfra-2723-ruby-349-xcode-266 branch July 21, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants