Skip to content

download_queue: name the download in checksum mismatch errors - #24353

Merged
MikeMcQuaid merged 1 commit into
mainfrom
resource-error-naming
Oct 25, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
resource-error-naming

Conversation

@Moisan

@Moisan Moisan commented Oct 25, 2026

Copy link
Copy Markdown
Member

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

I used Claude Fable 5.1 to generate the fix and reviewed it manually.

If multiple resources have a SHA mismatch, the error was not naming the resource, only stating Resource reports different checksum, one example I encountered:

✘ Resource csound--ableton-link                                                                                                         Verifying     2.0MB/-------
✔︎ Resource csound--csound-plugins                                                                                                       Verified      9.3MB/  9.3MB
✔︎ Patch 13800c4dd58e3c214e5d7207180ad7115b4e2f27.patch?full_index=1                                                                     Verified      2.1KB/  2.1KB
✔︎ Patch hdf5-2.0.patch                                                                                                                  Verified    580.0 B/580.0 B
✔︎ Patch bb9bafcfa17a87d3733eda1e25a812fd0be08ac6.patch?full_index=1                                                                     Verified    685.0 B/685.0 B
✘ Resource csound--getfem                                                                                                               Verifying    16.9MB/ 16.9MB
✔︎ Formula csound (7.0.0)
Error: Resource reports different checksum: b0eba86d40a46b01ab821cdfb53041bfc693f0266538ea8163f1cea7ac42f476
       SHA-256 checksum of downloaded file: 23983a87eecc550be849598acb5219fbf1a16a5b4266a50ba4471b4f6c34f4a4
Error: Resource reports different checksum: 80b625d5892fe9959c3b316340f326e3ece4e98325eb0a81dd5b9ddae563b1d1
       SHA-256 checksum of downloaded file: 0e042770b86152b09be4bfd0ee160b8d10d49c3f8a0b9b06d55f1ffaa1d30fc4

This PR ensures the resource is named:

Error: Resource csound--ableton-link reports different checksum: b0eba86d...
       SHA-256 checksum of downloaded file:                     23983a87...
Error: Resource csound--getfem reports different checksum:       80b625d5...
       SHA-256 checksum of downloaded file:                     0e042770...

@coderabbitai

coderabbitai Bot commented Oct 25, 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: 441fa35d-028e-4d90-bb5e-7ab0caa42d03
Commits

Reviewing files that changed from the base of the PR and between c5b9f65 and 27ec677.

Files selected for processing: 2
  • Library/Homebrew/download_queue.rb
  • Library/Homebrew/test/download_queue_spec.rb

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

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Checksum mismatch reports now identify the downloadable by its displayed name, making it clearer which item failed verification.
    • The report continues to show the expected and actual checksum values alongside the checksum label.

Checksum-mismatch reports in serial and parallel fetch paths now use downloadable.download_queue_message to label the reported checksum. The tests check the label in both modes and check the checksum output on stdout in serial mode.

Changes: Checksum mismatch reporting

Layer / File(s) Summary
Use downloadable messages in checksum reports
Library/Homebrew/download_queue.rb, Library/Homebrew/test/download_queue_spec.rb
Both fetch paths pass the downloadable message to the alignment helper. Tests check the Bottle testball label in stderr and, in serial mode, the downloaded-file checksum in stdout.

Priority: Low

Merge Risk: Minimal · up to 27ec6

The checksum mismatch output change is ready to merge with no identified user-impacting risk.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the change: checksum mismatch errors in the download queue now name the download. This matches the raw summary, which says the labels now use the downloadable's message, and the PR obj…
Description check Passed The description explains the problem and the intended result. When several resources fail SHA-256 verification, the error does not name the resource. It gives an example output and shows the corrected…
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 names the change: checksum mismatch errors in the download queue now name the download. This matches the raw summary, which says the labels now use the downloadable's message, and the PR objectives, which say the resource name is added to each error. The title is specific and concise.

Full details: Description check

Explanation

The description explains the problem and the intended result. When several resources fail SHA-256 verification, the error does not name the resource. It gives an example output and shows the corrected output with the resource name. This matches the changes to the download queue and its spec file.

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

@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 25, 2026
Merged via the queue into main with commit 496a649 Oct 25, 2026
54 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the resource-error-naming branch October 25, 2026 13:34
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