ci: Use Ruby 4 for development tooling - #319
Conversation
Run contributor defaults, lint, packaging, and release tooling on Ruby 4 while retaining Ruby 3.2 in the compatibility matrix and syntax floor. Pin Minitest to the Ruby-4-compatible 5.27 line to avoid the unrelated Minitest 6 migration, and regenerate the lockfile with Bundler 4.
There was a problem hiding this comment.
Pull request overview
Updates the repository’s contributor/devtooling baseline to Ruby 4 while keeping Ruby 3.2 in the CI compatibility matrix, plus minimal dependency bumps needed for Ruby 4 compatibility.
Changes:
- Set the default contributor Ruby to 4.0.6 via
.ruby-version. - Run lint, packaging, and release workflows on Ruby 4.0.
- Update dev/test dependencies (notably Minitest) and refresh the lockfile (including a Bundler major-version bump).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Gemfile.lock | Bumps Minitest + unicode-emoji and updates the lockfile’s Bundler version. |
| Gemfile | Pins minitest to ~> 5.27 for Ruby 4 compatibility. |
| .ruby-version | Updates the default Ruby for contributors to 4.0.6. |
| .github/workflows/create-releases.yml | Runs release tooling on Ruby 4.0. |
| .github/workflows/ci-checks.yml | Runs lint/package jobs on Ruby 4.0 while keeping a multi-Ruby test matrix. |
Comments suppressed due to low confidence (1)
.github/workflows/ci-checks.yml:83
- Same as the lint job: with the lockfile now requiring Bundler 4.0.17, the workflow should ensure that Bundler version is installed before
bundle installto avoid CI failures due to a mismatched default Bundler.
- name: Set up Ruby
uses: ruby/setup-ruby@c515ec17f69368147deb311832da000dd229d338 # v1
with:
ruby-version: '4.0'
bundler-cache: false
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
One substantive tooling compatibility issue: the pinned ruby/setup-ruby revision does not support the new Ruby 4.0.6 contributor default, breaking the Stainless artifact path and leaving other Ruby 4 jobs on 4.0.2. See the inline comment for the exact failure and fix.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Re-reviewed the current head (ef2911b). The earlier setup-ruby compatibility issue is resolved consistently across every workflow reference. The change keeps the Ruby 3.2 runtime support contract and compatibility matrix intact while moving contributor, lint, package, and release tooling to Ruby 4; the Minitest 5.x boundary is explicit, and the lockfile churn is limited to the expected tooling updates. I found no remaining structural, boundary, branching, file-size, abstraction, or maintainability concerns.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Re-reviewed exact head ef2911ba5bbf39e50cc9dba35d3987d4d7b6c351. The earlier setup-ruby compatibility finding is resolved: all five pins use 95ef2b042f9d7a56d8268cba8559e2842e2ad01b, whose source and bundled action data include Ruby 4.0.6; it also preserves .ruby-version resolution and lockfile-driven Bundler 4.0.17 installation. The full change keeps the Ruby 3.2 runtime contract and test matrix intact, with dependency churn limited to the intended tooling updates. I found no substantive issues.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (5)
.github/workflows/ci-checks.yml:83
- The repo is pinned to Ruby 4.0.6 via
.ruby-version, but this job uses the floating minor'4.0'. Pinning to 4.0.6 here makes packaging/build outputs more deterministic across time.
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
ruby-version: '4.0'
bundler-cache: false
.github/workflows/ci-checks.yml:64
- The repo is pinned to Ruby 4.0.6 via
.ruby-version, but this job uses the floating minor'4.0'. Pinning to 4.0.6 here makes lint results reproducible and avoids surprise CI breakage on future 4.0.x patch releases.
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
ruby-version: '4.0'
bundler-cache: false
.github/workflows/ci-checks.yml:106
- The test matrix includes the floating minor
'4.0', which will track future 4.0.x patch releases, while.ruby-versionis pinned to 4.0.6. If the intent is a pinned toolchain, consider using 4.0.6 in the matrix for consistency/reproducibility.
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false
.github/workflows/ci-checks.yml:33
- This job omits
ruby-version, so it will implicitly track.ruby-version(now 4.0.6) while other jobs in this workflow pin to'4.0'. Making the version explicit here avoids mixed semantics and unexpected changes when.ruby-versionis updated again.
This issue also appears in the following locations of the same file:
- line 60
- line 79
- line 102
- name: Set up Ruby
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
bundler-cache: false
.github/workflows/create-releases.yml:46
.ruby-versionis pinned to 4.0.6, but this workflow uses the floating minor'4.0'. Pinning to 4.0.6 makes release tooling more reproducible and reduces the chance of a patch-level Ruby change breaking releases unexpectedly.
with:
bundler-cache: false
ruby-version: '4.0'
Summary
Why
Routine development and release tooling should exercise the newest supported Ruby. The outdated tooling default was also causing problems for the Ruby generator, so aligning these defaults fixes generator runs while minimum-runtime compatibility remains an explicit matrix responsibility.
Validation
bundler-audit: no vulnerabilities across 1,221 advisoriesThis PR intentionally does not change the Ruby 3.2 support floor.