Fix GitHub release version detection - #23338
Merged
Merged
Conversation
- Prefer numeric release tags over asset filename versions. - Audit equivalent versions with different string forms. - Fixes #23336.
chenrui333
approved these changes
Jul 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes Homebrew’s version inference for GitHub “releases/download” URLs by preferring the numeric release tag version (e.g., v3.2) over versions embedded in asset filenames (e.g., hstr-3.2.0-...). It also tightens formula auditing to catch “equivalent but differently formatted” version changes (e.g., 1.0 → 1.0.0) that can cause operational mismatches.
Changes:
- Add a GitHub releases URL parser to detect versions from numeric release tags earlier in the parser chain.
- Add a version detection spec asserting that the release tag takes precedence over the asset filename.
- Update the formula auditor to flag stable version “format-only” changes (same comparable version, different string form) and add coverage for it.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Library/Homebrew/version.rb | Adds an early GitHub releases URL parser to prioritize numeric release tag versions. |
| Library/Homebrew/test/version_spec.rb | Adds a regression test ensuring the release tag version is chosen over the asset filename version. |
| Library/Homebrew/formula_auditor.rb | Audits and reports stable version changes that only alter string formatting (e.g., 1.0 → 1.0.0). |
| Library/Homebrew/test/formula_auditor_spec.rb | Adds a spec asserting the new “format-only version change” audit behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 28, 2026
7 tasks
7 tasks
tcmulcahy
added a commit
to block/homebrew-tap
that referenced
this pull request
Jul 28, 2026
By default, setup-homebrew will use the main branch. Specifying `stable: true` instead uses the latest stable release. Homebrew/brew#23338 made it so some of our formula don't pass brew audit. Using `stable: true` mitigates this: We'll still break when there's a new stable release, but at least we won't break outside of new releases. Co-authored-by: Codex <noreply@openai.com>
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.
Fixes #23336.
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 Sol xhigh with local review and testing.