Move bottle CI workflow helpers into brew - #23852
Merged
Merged
Conversation
7 tasks
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
The new single-use helper methods violate the repository鈥檚 explicit inlining convention.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds typed, tested brew commands to replace inline workflow scripting in homebrew-core.
Changes:
- Generates bottle CI runner matrices and detects existing bottles.
- Adds a read-only portable Ruby target-version option.
- Updates tests, RBI files and generated completions.
File summaries
| File | Description |
|---|---|
Library/Homebrew/dev-cmd/generate-bottle-ci-matrix.rb |
Implements matrix generation and bottle checks. |
Library/Homebrew/dev-cmd/update-portable-ruby.rb |
Adds target-version output mode. |
Library/Homebrew/test/dev-cmd/generate-bottle-ci-matrix_spec.rb |
Tests runner mapping and failures. |
Library/Homebrew/test/dev-cmd/update-portable-ruby_spec.rb |
Tests version output. |
Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/generate_bottle_ci_matrix.rbi |
Adds generated argument types. |
Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/update_portable_ruby.rbi |
Types the new switch. |
completions/bash/brew |
Adds Bash completions. |
completions/fish/brew.fish |
Adds fish completions. |
completions/zsh/_brew |
Adds zsh completions. |
Review details
Files not reviewed (2)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/generate_bottle_ci_matrix.rbi: File type not supported
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/update_portable_ruby.rbi: File type not supported
Suppressed comments (1)
Library/Homebrew/dev-cmd/generate-bottle-ci-matrix.rb:77
- This helper is likewise called only once and is not needed for direct unit testing. To comply with
AGENTS.md:5, inline the matrix-entry construction into therunners.mapblock.
def runner_spec(runner, github_run_id)
- Files reviewed: 7/9 changed files
- Comments generated: 1
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Add `brew generate-bottle-ci-matrix` to build the dispatched bottle runner matrix and reject runners whose bottle already exists, replacing the `github-script` and `brew ruby` steps in homebrew-core. - Check self-hosted `linux-arm64` runners as `arm64_linux` rather than `x86_64_linux` and check minor macOS versions such as `15.4-arm64`. - Add `brew update-portable-ruby --print-target-version` so workflows can read the revision-aware `pkg_version` without `brew ruby`. Signed-off-by: Patrick Linnane <patrick@linnane.io>
p-linnane
force-pushed
the
core-workflow-helpers
branch
from
September 6, 2026 20:20
a04cb21 to
52a621c
Compare
p-linnane
enabled auto-merge
September 6, 2026 20:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
brew generate-bottle-ci-matrix, which builds thedispatch-build-bottlerunner matrix and rejects runners whose bottle already exists, andbrew update-portable-ruby --print-target-version, which prints the revision-awarepkg_versionwithout writing anything. Both replacegithub-scriptandbrew rubysteps in homebrew-core so the logic is typed and tested here.The matrix matches the removed JavaScript. The bottle check fixes two gaps in the inline Ruby:
linux-arm64was checked asx86_64_linux, and minor macOS versions such as15.4-arm64were never checked. Existing bottles surface as error annotations viaofailwith a non-zero exit. The homebrew-core side is Homebrew/homebrew-core#302687 and lands after this.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Fable 5.1) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran
brew lgtm --onlineplus targeted specs.