Skip to content

Preserve cask container metadata#23100

Merged
MikeMcQuaid merged 1 commit into
mainfrom
nested-container-staging
Jul 14, 2026
Merged

Preserve cask container metadata#23100
MikeMcQuaid merged 1 commit into
mainfrom
nested-container-staging

Conversation

@MikeMcQuaid

@MikeMcQuaid MikeMcQuaid commented Jul 14, 2026

Copy link
Copy Markdown
Member

Fixes #23094

  • Retain nested paths and explicit types for API-backed downloads.
  • Ensure queued staging extracts the declared nested container.

  • 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 Hyperfine benchmarks.
  • 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?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review and testing.


Copilot AI review requested due to automatic review settings July 14, 2026 08:13

Copilot AI 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.

Pull request overview

This PR fixes a regression/bug in queued cask staging for API-backed installs by ensuring container metadata (including nested: and explicit type:) is preserved when constructing the Cask::Download object from API structs, so nested-container extraction occurs during DownloadQueue staging.

Changes:

  • Populate container stanza (nested path + type) when building API-backed Cask objects for downloads.
  • Add a regression spec verifying queued staging extracts a declared nested container for an API-loaded cask.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/api/cask_download.rb Ensures API-backed downloads retain container metadata so queued staging can extract nested containers correctly.
Library/Homebrew/test/cask/installer_spec.rb Adds a regression test covering nested-container extraction when using DownloadQueue staging for an API-loaded cask.

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

@MikeMcQuaid MikeMcQuaid enabled auto-merge July 14, 2026 12:42
- Retain nested paths and explicit types for API-backed downloads.
- Ensure queued staging extracts the declared nested container.
@MikeMcQuaid MikeMcQuaid force-pushed the nested-container-staging branch from 2540410 to 055a227 Compare July 14, 2026 14:05
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 6e21a1a Jul 14, 2026
44 checks passed
@MikeMcQuaid MikeMcQuaid deleted the nested-container-staging branch July 14, 2026 16:27
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 install --cask silently skips nested-container extraction (container nested: casks install empty)

3 participants