Skip to content

Use tap trust for eval all#22476

Merged
MikeMcQuaid merged 1 commit into
mainfrom
tap-trust-eval-all
May 31, 2026
Merged

Use tap trust for eval all#22476
MikeMcQuaid merged 1 commit into
mainfrom
tap-trust-eval-all

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid commented May 30, 2026

  • Make HOMEBREW_REQUIRE_TAP_TRUST and
    HOMEBREW_NO_REQUIRE_TAP_TRUST enable commands that evaluate all
    formulae and casks.
  • Hide --eval-all and HOMEBREW_EVAL_ALL from generated help,
    completions and configuration unless the env var is set directly.
  • Keep legacy HOMEBREW_EVAL_ALL working with a deprecation warning
    so callers can move to the trust model.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review and extensive manual testing.


Copilot AI review requested due to automatic review settings May 30, 2026 20:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR shifts “evaluate all formulae/casks” behavior away from the legacy --eval-all / HOMEBREW_EVAL_ALL mechanism toward the tap-trust model, while keeping the legacy path working but de-emphasized.

Changes:

  • Make HOMEBREW_REQUIRE_TAP_TRUST and HOMEBREW_NO_REQUIRE_TAP_TRUST enable “eval all” behavior (Homebrew::EnvConfig.eval_all?) and add a deprecation warning for HOMEBREW_EVAL_ALL.
  • Hide --eval-all and HOMEBREW_EVAL_ALL from manpage/docs/completions/config output unless directly set, and update commands to use args.eval_all? || Homebrew::EnvConfig.eval_all?.
  • Expose/document brew trust and brew untrust and update related tests and TestBot logic.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
manpages/brew.1 Removes --eval-all docs from multiple commands; documents trust/untrust; documents new env vars.
Library/Homebrew/test/formula_spec.rb Adds coverage for Formula.all when tap-trust mode is enabled.
Library/Homebrew/test/env_config_spec.rb Adds unit tests for EnvConfig.eval_all? including deprecation warning behavior.
Library/Homebrew/test/cmd/uses_spec.rb Updates uses tests to rely on tap-trust env vars instead of --eval-all.
Library/Homebrew/test/cmd/desc_spec.rb Updates desc --search tests for the new tap-trust gating/error messaging.
Library/Homebrew/test/cmd/config_spec.rb Verifies hidden env behavior (don’t print HOMEBREW_EVAL_ALL unless directly set).
Library/Homebrew/test/cask/cask_spec.rb Adds coverage for Cask::Cask.all when trust checks are disabled via env var.
Library/Homebrew/test_bot/test_formulae.rb Adds helper to set trust requirements/environment for TestBot runs.
Library/Homebrew/test_bot/formulae.rb Updates TestBot’s brew uses invocation to use the tap-trust env instead of --eval-all.
Library/Homebrew/test_bot/formulae_dependents.rb Updates dependent enumeration to use the tap-trust env instead of --eval-all.
Library/Homebrew/system_config.rb Skips printing hidden env vars unless they are directly present in ENV.
Library/Homebrew/search.rb Updates --desc search behavior to treat tap-trust env vars as enabling “eval all”.
Library/Homebrew/formula.rb Updates Formula.all gating/error message to reference tap-trust env vars.
Library/Homebrew/env_config.rb Deprecates/hides HOMEBREW_EVAL_ALL, adds eval_all? custom implementation, updates env descriptions.
Library/Homebrew/dev-cmd/unbottled.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/dev-cmd/livecheck.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/dev-cmd/determine-test-runners.rb Hides legacy --eval-all and adjusts eval-all logic (but needs a runtime guard fix; see comments).
Library/Homebrew/dev-cmd/bump.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/dev-cmd/audit.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates odisabled guidance.
Library/Homebrew/commands.rb Filters hidden options out of conflict metadata (for help/completions generation).
Library/Homebrew/cmd/uses.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/cmd/untrust.rb Makes untrust visible in manpage by removing hide_from_man_page!.
Library/Homebrew/cmd/trust.rb Makes trust visible in manpage by removing hide_from_man_page!.
Library/Homebrew/cmd/tap.rb Uses tap-trust-based “verify/eval-all” behavior; hides legacy --eval-all.
Library/Homebrew/cmd/search.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/cmd/readall.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/cmd/options.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/cmd/info.rb Uses tap-trust-based eval_all? for JSON; hides legacy --eval-all.
Library/Homebrew/cmd/desc.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates usage errors.
Library/Homebrew/cmd/deps.rb Uses tap-trust-based eval_all?; hides legacy --eval-all; updates --for-each description.
Library/Homebrew/cask/cask.rb Updates Cask::Cask.all gating/error message to reference tap-trust env vars.
docs/Manpage.md Mirrors manpage changes: removes --eval-all docs, adds trust/untrust, adds env var docs.
completions/zsh/_brew Adds trust/untrust and removes --eval-all completions/constraints.
completions/internal_commands_list.txt Adds trust and untrust to internal command list.
completions/fish/brew.fish Adds trust/untrust and removes --eval-all completions.
completions/bash/brew Adds trust/untrust and removes --eval-all completions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/dev-cmd/determine-test-runners.rb
Comment thread Library/Homebrew/dev-cmd/determine-test-runners.rb
@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch from b42801f to c805041 Compare May 30, 2026 20:28
@github-code-quality
Copy link
Copy Markdown

github-code-quality Bot commented May 30, 2026

Code Coverage Overview

Languages: Ruby

Ruby / code-coverage/simplecov

The overall coverage in the branch remains at 78%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File 7470da6 848a24c +/-
cmd/casks.rb 100% 80% -20%
cmd/formulae.rb 100% 80% -20%
cmd/untrust.rb 100% 85% -15%
cmd/trust.rb 100% 94% -6%
commands.rb 88% 88% 0%
test_bot/test_formulae.rb 37% 38% +1%
cmd/uninstall.rb 75% 76% +1%
diagnostic.rb 51% 53% +2%
trust.rb 85% 88% +3%
search.rb 82% 85% +3%

Updated May 31, 2026 18:08 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch 4 times, most recently from 17a988c to 72f4979 Compare May 31, 2026 14:18
@MikeMcQuaid MikeMcQuaid requested a review from Copilot May 31, 2026 14:22
@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch from 72f4979 to 03d250c Compare May 31, 2026 14:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 67 out of 67 changed files in this pull request and generated 2 comments.

Comment thread Library/Homebrew/items.sh
Comment thread Library/Homebrew/env_config.rb Outdated
@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch 4 times, most recently from 8ee5901 to 4c5aff4 Compare May 31, 2026 15:13
@MikeMcQuaid MikeMcQuaid enabled auto-merge May 31, 2026 15:18
@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch 2 times, most recently from 3ef67c8 to 9ffb47a Compare May 31, 2026 16:02
@MikeMcQuaid MikeMcQuaid changed the base branch from main to env-config-truthy-booleans May 31, 2026 17:44
@MikeMcQuaid MikeMcQuaid disabled auto-merge May 31, 2026 17:50
- Make `HOMEBREW_REQUIRE_TAP_TRUST` and
  `HOMEBREW_NO_REQUIRE_TAP_TRUST` enable commands that evaluate all
  formulae and casks.
- Hide `--eval-all` and `HOMEBREW_EVAL_ALL` from generated help,
  completions and configuration unless the env var is set directly.
- Keep legacy `HOMEBREW_EVAL_ALL` working with a deprecation warning
  so callers can move to the trust model.
@MikeMcQuaid MikeMcQuaid force-pushed the tap-trust-eval-all branch from 9ffb47a to 848a24c Compare May 31, 2026 17:50
Base automatically changed from env-config-truthy-booleans to main May 31, 2026 18:21
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 31, 2026
Merged via the queue into main with commit 850b39a May 31, 2026
46 checks passed
@MikeMcQuaid MikeMcQuaid deleted the tap-trust-eval-all branch May 31, 2026 18:44
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