Skip to content

cask: recover unreadable installed metadata during upgrade#21961

Closed
yudgnahk wants to merge 3 commits intoHomebrew:mainfrom
yudgnahk:main
Closed

cask: recover unreadable installed metadata during upgrade#21961
yudgnahk wants to merge 3 commits intoHomebrew:mainfrom
yudgnahk:main

Conversation

@yudgnahk
Copy link
Copy Markdown

@yudgnahk yudgnahk commented Apr 9, 2026


  • 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?

Summary

  • Fixes upgrade failures caused by unreadable/legacy installed cask metadata by recovering an upgrade baseline from the current cask definition plus installed version.
  • Preserves bulk upgrade behavior by continuing with recoverable casks and providing actionable fallback guidance for unrecoverable metadata.
  • Adds regression tests for auto-updating casks with stale metadata, explicit/non-explicit unrecoverable paths, and a non-dry-run end-to-end recovery upgrade.

Testing

  • ./bin/brew tests --only=cask/upgrade --online
  • ./bin/brew lgtm --online

Fixes #21951
Regression introduced by #21882


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

I used OpenCode (OpenAI gpt-5.3-codex) to help draft and iterate on the implementation and tests. I manually reviewed all code and prose, ran the full required local checks (brew lgtm), and validated the behavior with targeted and end-to-end cask upgrade tests before opening this PR.


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.

brew upgrade broken by #21882 "cask: upgrade auto_updates casks when bundle version is stale"

1 participant