Move Cask CI helpers into brew - #23886
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
There was a problem hiding this comment.
🟢 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-ciwith 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.
|
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? |
|
I don't feel strongly about it either way. Just trying to eliminate any |
|
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
left a comment
There was a problem hiding this comment.
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.
generate-cask-ci-matrixmoved into brew in November 2024, and homebrew-cask deleted itscmd/lib/ci_matrix.rband siblings in January 2025.check.rbandzap_check.rbare 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-ciprovides theinfo,snapshot,zap-checkandcheckoperations the Cask CI workflow needs, with the helpers namespaced underCask::CI. A follow-up in homebrew-cask deletes the tap copies and repoints the workflow.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5) drafted the move and its 28 tests; I reviewed the diff, confirmed the
manual_installcheck matches the existing idiom incask/upgrade.rb, verified the generated completions matchbrew generate-man-completionsoutput, and ranbrew lgtm --online.