Skip to content

Fix flaky conflicts_with brew spec#21977

Merged
MikeMcQuaid merged 1 commit intomainfrom
flaky-test
Apr 10, 2026
Merged

Fix flaky conflicts_with brew spec#21977
MikeMcQuaid merged 1 commit intomainfrom
flaky-test

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

Sorbet's runtime validate_call uses bind_call to invoke the original formulae_by_full_name method, bypassing RSpec mocks. Replace the mock with a real formula that declares conflicts_with "mysql55" via stub_formula_loader.


  • 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?
  • 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. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Claude Code with manual verification and testing.


Sorbet's runtime `validate_call` uses `bind_call` to invoke
the original `formulae_by_full_name` method, bypassing RSpec
mocks. Replace the mock with a real formula that declares
`conflicts_with "mysql55"` via `stub_formula_loader`.
Copilot AI review requested due to automatic review settings April 10, 2026 08:12
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

Fixes a flaky conflicts_with spec by avoiding an RSpec mock that can be bypassed by Sorbet runtime validate_call, and instead using a real stubbed formula definition that exposes conflicts_with through the normal code path.

Changes:

  • Replace formulae_by_full_name mocking with stub_formula_loader + a stub formula declaring conflicts_with "mysql55".
  • Keep the rest of the install/upgrade/service expectations unchanged while making the spec exercise the real formula hashing path.

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

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit d476a82 Apr 10, 2026
42 checks passed
@MikeMcQuaid MikeMcQuaid deleted the flaky-test branch April 10, 2026 14:22
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.

3 participants