Maintain bottle coverage during macOS bootstrap - #23918
Conversation
bebc4ff to
86b2dd0
Compare
There was a problem hiding this comment.
馃煛 Changes recommended
An unchanged test dependency without any usable bottle can incorrectly schedule a Golden Gate job that cannot produce a bottle.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Preserves Golden Gate bottle coverage during the macOS 27 bootstrap period.
Changes:
- Adds base-branch transition coverage detection.
- Adds targeted Golden Gate CI runners and dependency selection.
- Validates committed and uploaded bottle metadata.
File summaries
| File | Description |
|---|---|
Library/Homebrew/bottle_transition.rb |
Implements transition policy. |
Library/Homebrew/github_runner_matrix.rb |
Selects transition runners and dependencies. |
Library/Homebrew/dev-cmd/pr-upload.rb |
Validates upload metadata. |
Library/Homebrew/test_bot/bottles_fetch.rb |
Enforces coverage before merging. |
Library/Homebrew/test/bottle_transition_spec.rb |
Tests transition policy. |
Library/Homebrew/test/github_runner_matrix_spec.rb |
Tests runner selection. |
Library/Homebrew/test/dev-cmd/pr-upload_spec.rb |
Tests upload validation. |
Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb |
Tests end-to-end runner selection. |
Library/Homebrew/test/test_bot/bottles_fetch_spec.rb |
Tests merge-time enforcement. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 3
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
3dc2c39 to
dc589f7
Compare
There was a problem hiding this comment.
馃煛 Changes recommended
Transition jobs can be scheduled without changed dependencies that are compatible with the transition platform.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Balanced
dc589f7 to
4fcf9e2
Compare
Signed-off-by: Patrick Linnane <patrick@linnane.io>
4fcf9e2 to
58ab641
Compare
| require "test_runner_formula" | ||
|
|
||
| # Preserve bottles while bootstrapping a macOS release. | ||
| # TODO: remove this class and its callers when `HOMEBREW_MACOS_NEWEST_SUPPORTED` is `27`. |
There was a problem hiding this comment.
May be worth keeping around in some form for the macOS 28 if this goes well?
Homebrew delays adding a new macOS runner to ordinary CI until mass bottling finishes, so routine formula updates during that window drop the coverage mass bottling just created and those formulae need bottling again.
This adds
BottleTransition, which reads a formula's bottle block on the base branch and requires existingarm64_golden_gatecoverage to survive later changes. Enrolled formulae get a Golden Gate runner in ordinary CI along with any changed dependencies they need, and publication and merge queue checks reject an upload that drops the coverage. A universalallbottle satisfies the requirement but does not enroll a formula by itself, so nothing is enrolled until the first Golden Gate bottle lands on the default branch.When an unchanged dependency has no usable bottle, runner selection warns and skips that Golden Gate build rather than failing, so the rest of CI still runs. Publication compares the committed bottle block against the artifacts being uploaded, including package version, rebuild, registry URL and per-tag checksums, and rejects a bottle directory holding more than one package version. Runner capacity controls are unchanged, and the checks stop applying once
HOMEBREW_MACOS_NEWEST_SUPPORTEDreaches 27.The matching homebrew-core workflow change removes the macOS 27 upload guard and will merge after this.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran
brew lgtmplus targeted specs.