list: test the Bash fast path against the Ruby command - #23247
Merged
Conversation
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>
8 tasks
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.
The follow-up promised on #23235: bare
brew listinvocations 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 --jsonis 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.
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Written with Claude in Claude Code under my direction and review. Red/green verified as described above.
brew typecheck,brew styleand changed tests clean locally.