Skip to content

Maintain bottle coverage during macOS bootstrap - #23918

Merged
p-linnane merged 1 commit into
mainfrom
golden-gate-bottle-transition
Sep 10, 2026
Merged

Maintain bottle coverage during macOS bootstrap#23918
p-linnane merged 1 commit into
mainfrom
golden-gate-bottle-transition

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

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 existing arm64_golden_gate coverage 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 universal all bottle 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_SUPPORTED reaches 27.

The matching homebrew-core workflow change removes the macOS 27 upload guard and will merge after this.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

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 lgtm plus targeted specs.


Copilot AI balanced review requested due to automatic review settings September 10, 2026 03:40
@p-linnane
p-linnane force-pushed the golden-gate-bottle-transition branch from bebc4ff to 86b2dd0 Compare September 10, 2026 03:49

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.

馃煛 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.

Comment thread Library/Homebrew/github_runner_matrix.rb Outdated
Comment thread Library/Homebrew/dev-cmd/pr-upload.rb Outdated
Comment thread Library/Homebrew/dev-cmd/pr-upload.rb Outdated
@p-linnane
p-linnane force-pushed the golden-gate-bottle-transition branch 2 times, most recently from 3dc2c39 to dc589f7 Compare September 10, 2026 04:21
@p-linnane
p-linnane requested a balanced review from Copilot September 10, 2026 04:21

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.

馃煛 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

Comment thread Library/Homebrew/github_runner_matrix.rb Outdated
@p-linnane
p-linnane force-pushed the golden-gate-bottle-transition branch from dc589f7 to 4fcf9e2 Compare September 10, 2026 04:48

@ZhongRuoyu ZhongRuoyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work, thanks!

@p-linnane
p-linnane added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
Signed-off-by: Patrick Linnane <patrick@linnane.io>
@p-linnane
p-linnane force-pushed the golden-gate-bottle-transition branch from 4fcf9e2 to 58ab641 Compare September 10, 2026 05:38
@p-linnane
p-linnane enabled auto-merge September 10, 2026 05:39
@p-linnane
p-linnane added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 983dcdc Sep 10, 2026
52 checks passed
@p-linnane
p-linnane deleted the golden-gate-bottle-transition branch September 10, 2026 06:01

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May be worth keeping around in some form for the macOS 28 if this goes well?

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.

4 participants