Skip to content

Flag unchanged auto_updates apps as outdated - #24382

Merged
MikeMcQuaid merged 1 commit into
mainfrom
auto-updates-recorded-version
Oct 29, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
auto-updates-recorded-version

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

Cask#auto_updates_bundle_outdated? gets nil from compare_version_strings when the app's version and the cask version have different segment counts, so Firefox installed at 158.0 was never reported as outdated against 158.0.1, nor 156.0.1 against 157.0, and the default brew upgrade skipped it. When that comparison is inconclusive and the app's short version still matches the installed cask version, a different non-CSV cask version is now treated as outdated, as for casks without auto_updates, including an older version after a rollback or a change of numbering scheme. Decisive comparisons are unchanged, so same-shape rollbacks such as 2.62 to 2.61 are still skipped, CSV versions still go through the build comparisons and the FAQ notes the exception.


  • 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 brew benchmark results.
  • 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?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Claude Code (Opus 5.5) wrote the change and tests, checked that the new outdated examples fail without the change and ran brew lgtm --online. Codex (GPT-6 Astra) reviewed it and suggested the CSV guard and the rollback example.


@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 39fb9d8b-97fb-49d7-823b-75fe5a731dd5
Commits

Reviewing files that changed from the base of the PR and between 334a802 and 7c285c6.

Files selected for processing: 1
  • docs/FAQ.md
Files skipped from review as they are similar to previous changes: 1
  • docs/FAQ.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Corrected upgrade checks for self-updating apps when the installed app’s short version still matches Homebrew’s installation record. brew upgrade now includes the cask when its version differs, including when the cask version is older or version segments differ.
  • Documentation
    • Updated the FAQ to explain when this exception applies to self-updating casks.

The cask outdatedness check now handles matching installed short versions for single-entry CSV versions. Tests cover version-comparison cases, and the FAQ documents the related upgrade rule.

Changes: Auto-updating cask version checks

Layer / File(s) Summary
Outdatedness check and documented behaviour
Library/Homebrew/cask/cask.rb, Library/Homebrew/test/cask/cask_spec.rb, docs/FAQ.md
The check treats a single-entry CSV version as outdated when the installed short version matches the installation record. Tests cover differing version segments, self-updated versions, and CSV candidates. The FAQ describes when upgrades include the cask.

Priority: Normal

Merge Risk: Minimal · up to 7c285

The FAQ now describes the limited upgrade exception without implying that a conclusive rollback will be upgraded. The change is ready to merge after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "Flag unchanged auto_updates apps as outdated" matches the main change. The diff makes Cask#auto_updates_bundle_outdated? return true when the app's short version still matches the installed…
Description check Passed The description explains the problem: compare_version_strings returns nil when segment counts differ, so Firefox 158.0 installed against cask 158.0.1 was never reported as outdated. It states the new …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Flag unchanged auto_updates apps as outdated" matches the main change. The diff makes Cask#auto_updates_bundle_outdated? return true when the app's short version still matches the installed cask version and the version comparison is inconclusive, so unchanged auto_updates apps are flagged as outdated. The title is specific and uses no vague terms.

Full details: Description check

Explanation

The description explains the problem: compare_version_strings returns nil when segment counts differ, so Firefox 158.0 installed against cask 158.0.1 was never reported as outdated. It states the new behaviour for non-CSV versions, the unchanged decisive comparisons, the CSV exception, and the FAQ update. It also gives the testing done and the reason for the change. It is directly related to the changeset.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50f8787a-3d20-468b-a0ad-46e94e649870
Commits

Reviewing files that changed from the base of the PR and between 2833c25 and 334a802.

Files selected for processing: 3
  • Library/Homebrew/cask/cask.rb
  • Library/Homebrew/test/cask/cask_spec.rb
  • docs/FAQ.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread docs/FAQ.md Resolved
- `compare_version_strings` returns `nil` when the app bundle and tap
  versions have different segment counts, so `auto_updates` casks
  such as Firefox weren't reported as outdated going from 158.0 to
  158.0.1 or from 156.0.1 to 157.0.
- An app whose short version still matches the installed cask version
  shows no sign of having updated itself, so treat a different non-CSV
  tap version as outdated, as for casks without `auto_updates`.
- CSV tap versions still go through the bundle version comparisons,
  since their build component can be compared with the app's.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
@p-linnane
p-linnane force-pushed the auto-updates-recorded-version branch from 334a802 to 7c285c6 Compare October 29, 2026 04:05

@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 Oct 29, 2026
Merged via the queue into main with commit d46a604 Oct 29, 2026
53 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the auto-updates-recorded-version branch October 29, 2026 09:06
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

⌂ 换网址