Use bottled inputs and add RuboCop guard - #23468
Open
MikeMcQuaid wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens Homebrew鈥檚 structured install-step runners to avoid depending on formula source and post-pour resources by switching to bottled inputs and API-derived context, and it adds enforcement via a dedicated RuboCop cop plus accompanying specs.
Changes:
- Add a new
Homebrew/InstallStepsSourceIndependenceRuboCop cop and spec coverage to prevent formula/source/resource lookups and direct downloads in install-step runners. - Update install-step execution logic to resolve helper-tool paths and
pkgetcpaths without loading formula source. - Update install-step specs to use API-loaded formula structs and to validate bootstrapping behavior against bottled wheel/archive inputs.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/test/rubocops/install_steps_source_independence_spec.rb | Adds spec coverage for the new RuboCop cop鈥檚 allowed/forbidden patterns. |
| Library/Homebrew/test/install_steps_spec.rb | Updates tests to use API-loaded formula structs and validates bootstrapping via bottled wheel/archive inputs and opt-path tool resolution. |
| Library/Homebrew/rubocops/install_steps_source_independence.rb | Introduces the RuboCop cop enforcing install-step source independence. |
| Library/Homebrew/rubocops/all.rb | Registers the new RuboCop cop for loading. |
| Library/Homebrew/install_steps/formula_actions.rb | Switches CPython/PyPy bootstrapping to use bottled wheels/archives rather than formula resources. |
| Library/Homebrew/install_steps.rb | Resolves helper-tool and pkgetc paths without loading formula source. |
| Library/.rubocop.yml | Enables/scopes the new cop to install-step runner files. |
| docs/Formula-Cookbook.md | Documents that named actions must use bottled inputs rather than formula resources after pouring. |
馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Discover CPython wheels already packaged in each keg. - Expand PyPy bootstrap archives packaged in `libexec`. - Resolve dependency paths without loading formula source. - Validate helper executables before attempting to run them. - Enforce source independence with RuboCop and API-loaded tests. - Keep the internal JSON API unchanged and minimal.
MikeMcQuaid
force-pushed
the
bottled-post-install-inputs
branch
from
August 7, 2026 13:44
6635b2c to
a75d41b
Compare
MikeMcQuaid
enabled auto-merge
August 7, 2026 15:40
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.
libexec.Fixes #23465
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 Sol xhigh with local review and testing.