Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): avoid treating Ubuntu binaries as Homebrew-managed #8832

Closedasfires(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/8832/headopened View on GitHub

What Changed

  • Stop treating every provider executable under /usr/local/bin as Homebrew-managed.
  • Add regression coverage for an Ubuntu provider installed at /usr/local/bin.
  • Continue recognizing Homebrew through /opt/homebrew/bin and resolved Cellar or Caskroom paths.

Why

The provider update detection added in #2312 treats /usr/local/bin as a Homebrew-specific location. However, /usr/local/bin is a generic local installation prefix on Ubuntu and other Unix systems. This can cause T3 Code to offer a brew upgrade action for provider installations that Homebrew does not manage.

Removing the generic /usr/local/bin match fixes the classification without breaking Intel Mac Homebrew installations. T3 Code resolves the executable’s real path, so /usr/local/Cellar and /usr/local/Caskroom targets remain recognized.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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/bin as Homebrew-managed, so Linux installs in that generic prefix are not offered brew upgrade one-click updates.

Homebrew detection still uses /opt/homebrew/bin plus resolved Cellar and Caskroom paths (including /usr/local/cellar and /usr/local/caskroom on Intel Mac). A regression test asserts a provider at /usr/local/bin/package-tool resolves with update: null instead of a brew command.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7c207c08042285362e5b4e10c264b41f1089fcf8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix isHomebrewCommandPath to not treat /usr/local/bin as Homebrew-managed

Removes 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/bin binary with an empty PATH.

Macroscope summarized 7c207c0.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 5e7dcbca-72e6-4b45-b49a-9db48d6e6aa9

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Warning

      Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved at 7c207c0

      Macroscope's review found this PR approvable — This is a narrowly scoped provider-maintenance bug fix that prevents generic Ubuntu /usr/local/bin binaries from being routed to Homebrew updates while preserving legitimate Homebrew path detection. A targeted regression test covers the changed behavior, and no product defaults or sensitive areas are modified.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. 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!

    5. juliusmarminge closed this

Sign in to join this conversation.