Skip to content

list: test the Bash fast path against the Ruby command - #23247

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
aholland:list-bash-ruby-parity
Jul 21, 2026
Merged

list: test the Bash fast path against the Ruby command#23247
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
aholland:list-bash-ruby-parity

Conversation

@aholland

Copy link
Copy Markdown
Contributor

The follow-up promised on #23235: bare brew list invocations are served by the Bash fast path in production, while the test suite's examples enter at the Ruby command — so a feature added to one implementation can pass its own tests while production serves the other. That is exactly how #23235's warning shipped inert on its main path.

This adds a parity test: both implementations run against the same installed state (a formula, a cask, and a broken Caskroom symlink) across the flag variants both serve — bare, -1, --formula, --cask — and their stdout, stderr and exit status are diffed against each other, not against hand-written expectations. Drift now fails in CI whichever side changed. (--versions --json is excluded: the Ruby command intentionally defers that to the Bash path.)

Red/green: disabling the Bash-side warning from #23245 — recreating the drift that actually shipped — fails the test.


  • 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 Hyperfine benchmarks.
  • 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?

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

Written with Claude in Claude Code under my direction and review. Red/green verified as described above. brew typecheck, brew style and changed tests clean locally.

The Bash fast path serves bare brew list invocations in production while
the test suite's integration examples enter at the Ruby command, so a
feature added to one implementation can pass its own tests while
production serves the other - which is exactly how the broken-symlink
warning shipped inert on the common path. Run both implementations
against the same installed state and diff their stdout, stderr and exit
status against each other, so drift fails in CI whichever side changed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

Thanks!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 21, 2026
Merged via the queue into Homebrew:main with commit 126b4b0 Jul 21, 2026
43 checks passed
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.

2 participants