Skip to content

Move Cask CI helpers into brew - #23886

Open
p-linnane wants to merge 1 commit into
mainfrom
move-cask-ci-command
Open

Move Cask CI helpers into brew#23886
p-linnane wants to merge 1 commit into
mainfrom
move-cask-ci-command

Conversation

@p-linnane

@p-linnane p-linnane commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

generate-cask-ci-matrix moved into brew in November 2024, and homebrew-cask deleted its cmd/lib/ci_matrix.rb and siblings in January 2025. check.rb and zap_check.rb are what was left behind, and since the tap has no spec suite they have never been tested, typechecked or linted.

This finishes that migration. brew cask-ci provides the info, snapshot, zap-check and check operations the Cask CI workflow needs, with the helpers namespaced under Cask::CI. A follow-up in homebrew-cask deletes the tap copies and repoints the workflow.


  • 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) drafted the move and its 28 tests; I reviewed the diff, confirmed the manual_install check matches the existing idiom in cask/upgrade.rb, verified the generated completions match brew generate-man-completions output, and ran brew lgtm --online.


Signed-off-by: Patrick Linnane <patrick@linnane.io>
Copilot AI balanced review requested due to automatic review settings September 8, 2026 01:26

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.

🟢 Approval recommended

The migration preserves the existing Cask CI behaviour while adding focused tests, strict typing and generated integration files.

Pull request overview

Moves Homebrew Cask CI helpers into brew under Cask::CI.

Changes:

  • Adds brew cask-ci with four CI operations.
  • Adds snapshot comparison and zap-check helpers.
  • Adds tests, Sorbet RBI and generated completions.
File summaries
File Description
Library/Homebrew/dev-cmd/cask-ci.rb Implements the command dispatcher and CI outputs.
Library/Homebrew/cask/ci/check.rb Captures and compares system state.
Library/Homebrew/cask/ci/zap_check.rb Exercises apps and checks zap coverage.
Library/Homebrew/test/dev-cmd/cask-ci_spec.rb Tests command operations and outputs.
Library/Homebrew/test/cask/ci/check_spec.rb Tests snapshot comparison behaviour.
Library/Homebrew/test/cask/ci/zap_check_spec.rb Tests zap matching and reporting.
Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/cask_ci.rbi Adds generated command argument types.
completions/bash/brew Adds Bash completion support.
completions/fish/brew.fish Adds fish completion support.
completions/zsh/_brew Adds zsh completion support.
Review details

Files not reviewed (1)

  • Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/cask_ci.rbi: File type not supported
  • Files reviewed: 9/10 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@bevanjkay

bevanjkay commented Sep 8, 2026

Copy link
Copy Markdown
Member

I'm not sure how many downstream taps actually exercise the scripts, mine is one of them. I wonder if we need to run a deprecation on the removal of the scripts from the tap, or a temporary function stub that prints the migration step or just leave it be?

@p-linnane

Copy link
Copy Markdown
Contributor Author

I don't feel strongly about it either way. Just trying to eliminate any brew ruby usage across our repos.

@bevanjkay

Copy link
Copy Markdown
Member

The blast radius seems like it's contained to 9 third-party taps, so I think we can just ahead with the migration cold turkey.

@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! ✅ to unblock. Would be nice to try to incorporate this into brew test-bot instead and have that be the default workflow for formula and casks. That'd vastly improve the experience for cask tap maintainers too.

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 8, 2026
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.

4 participants