Add Homebrew Upgrade Auto-Confirm Flag

I'd like the auto-update mechanism for homebrew to add the --yes flag to brew upgrade since the user already confirmed that they want to upgrade the package at this point. I feel like having brew prompt them one more time isn't helpful in this context.
I’m using the required skills for this code change: using-superpowers for skill setup, then brainstorming/test-driven-development only as much as needed for a narrow behavior edit.
The local AGENTS workflow explicitly says concrete edits should proceed directly, so I’m treating the brainstorming skill as superseded here. I’ll keep this narrow: find the Homebrew upgrade path, add a failing test for --yes, then make the smallest code change.
I’m checking the repo’s current state and locating the Homebrew update code before touching anything. If there’s checkpoint history on the exact files, I’ll use it; otherwise I’ll label this as source-inferred.
The relevant area is cmd/entire/cli/versioncheck; the existing tests already assert the exact brew command string in several places. I’m reading that code and its history now so the change lands at the command construction point rather than patching call sites.
Source inference so far: the brew command is centralized in updateCommand, and tests assert the command that reaches the prompt and installer. I’m going test-first by changing the brew expectations to include --yes, running the focused tests to see the current code fail, then updating the production command.
The test expectations now describe the desired behavior; I’m running the focused versioncheck tests before changing production code so the failure proves the test catches the missing flag.
The red test result is the expected one: every brew auto-update path still produces brew upgrade entire. I’m applying the production change at updateCommand and cleaning up the remaining test message that still names the old command.
There’s one unrelated checkpoint-policy test that passes an arbitrary sample update command; I’m leaving that alone because it tests message formatting, not the Homebrew command builder.
The production change is in place. I’m formatting the touched Go files, then I’ll rerun the focused tests and the relevant package checks.
Formatting made no terminal output. Now I’m running the package tests that cover update command construction and the auto-update prompt/install path.
The targeted tests are green. I’m widening verification inside the changed package now: full package tests plus go vet for the same package.
Package-level checks passed. I’m running the project lint task once because this is a Go production change and the repo calls that out as the lint boundary.
Lint is clean. I’m doing the final diff review now to make sure only the intended command string and matching tests changed.
The diff is tightly scoped to the Homebrew command and related assertions. I’m checking the completion-verification skill before I close this out so I report only verified results.
I’ve already got fresh test, vet, and lint evidence. One last lightweight check: whitespace/diff sanity and a search for remaining brew upgrade strings in the touched area.
Implemented the Homebrew auto-update change.
Changed versioncheck.go so brew-installed binaries now use:
Updated the related auto-update/versioncheck tests in autoupdate_test.go and versioncheck_test.go.
Verification:
- Red test first:
go test ./cmd/entire/cli/versioncheck -run 'TestUpdateCommand|TestMaybeAutoUpdate' -count=1exited1, showing the oldbrew upgrade entirecommand. go test ./cmd/entire/cli/versioncheck -run 'TestUpdateCommand|TestMaybeAutoUpdate|TestCheckAndNotify_BrewSkipUntilNextVersionCachesLatest' -count=1exited0.go test ./cmd/entire/cli/versioncheck -count=1exited0.go vet ./cmd/entire/cli/versioncheckexited0.mise run lintexited0with0 issues.git diff --checkexited0.
No commit made.
I’ll commit the current focused change first, then run the pfleidi:review workflow against the branch as requested.
Before committing I’m re-reading the current diff and status, then I’ll use the prior focused test/vet/lint results from the unchanged tree as the commit-time verification basis.
The working tree contains only the three intended versioncheck files, and git diff --check produced no output. I’m committing that scoped change now.