Uh oh!
There was an error while loading. Please reload this page.
fix(server): avoid treating Ubuntu binaries as Homebrew-managed - #8832
fix(server): avoid treating Ubuntu binaries as Homebrew-managed#8832asfires wants to merge 1 commit into
Conversation
- Add regression coverage for `/usr/local/bin` provider executables on Ubuntu - Restrict Homebrew path detection to `/opt/homebrew/bin`
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped provider-maintenance bug fix that prevents generic Ubuntu You can add or adjust custom eligibility rules. Learn more. |
juliusmarminge
commented
Sep 1, 2026
Closing in favor of #6436, which includes this Ubuntu fix and verifies Homebrew ownership instead of guessing from /usr/local/bin. Thanks for the contribution! |
What Changed
/usr/local/binas Homebrew-managed./usr/local/bin./opt/homebrew/binand resolved Cellar or Caskroom paths.Why
The provider update detection added in #2312 treats
/usr/local/binas a Homebrew-specific location. However,/usr/local/binis a generic local installation prefix on Ubuntu and other Unix systems. This can cause T3 Code to offer abrew upgradeaction for provider installations that Homebrew does not manage.Removing the generic
/usr/local/binmatch fixes the classification without breaking Intel Mac Homebrew installations. T3 Code resolves the executable’s real path, so/usr/local/Cellarand/usr/local/Caskroomtargets remain recognized.Checklist
Model: GPT-5.6 Sol
Harness: Codex in T3 Code
Note
Low Risk
Small heuristic change in provider update routing with targeted test coverage; no auth or data handling impact.
Overview
Provider maintenance no longer classifies executables under
/usr/local/binas Homebrew-managed, so Linux installs in that generic prefix are not offeredbrew upgradeone-click updates.Homebrew detection still uses
/opt/homebrew/binplus resolved Cellar and Caskroom paths (including/usr/local/cellarand/usr/local/caskroomon Intel Mac). A regression test asserts a provider at/usr/local/bin/package-toolresolves withupdate: nullinstead of a brew command.Reviewed by Cursor Bugbot for commit 7c207c0. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
isHomebrewCommandPathto not treat/usr/local/binas Homebrew-managedRemoves the condition in providerMaintenance.ts that classified any path under
/usr/local/bin/as Homebrew-managed. The function still detects Homebrew via cellar/caskroom paths and/opt/homebrew/bin/. Adds a test case in providerMaintenance.test.ts covering an Ubuntu/usr/local/binbinary with an empty PATH.Macroscope summarized 7c207c0.