Skip to content

fix(doctor): ignore Linux Hopper launcher candidates on macOS - #6355

Closed
dezzy-music wants to merge 1 commit into
morluto:mainfrom
dezzy-music:fix/doctor-macos-hopper-linux-candidates
Closed

dezzy-music wants to merge 1 commit into
morluto:mainfrom
dezzy-music:fix/doctor-macos-hopper-linux-candidates

Conversation

@dezzy-music

Copy link
Copy Markdown

Summary

Resolves #6228.

On macOS with no explicit launcher override (HOPPER_LAUNCHER_PATH unset), rea doctor --provider hopper previously considered Linux system launcher candidates (systemLinuxHopperLauncherCandidates, e.g. /opt/hopper-v4/bin/hopper), checking them before renamed macOS bundles (manualHopperPaths()). This could report a Linux-only path as healthy on macOS or displace an eligible renamed macOS bundle.

Changes

  • In src/application/DoctorDiagnostics.ts, scoped automatic Hopper candidate discovery in findHopper strictly by host platform: on darwin, only macOS canonical candidates and renamed bundles are probed; on linux, Linux home and system candidates are probed.
  • Added unit tests in src/application/Doctor.test.ts verifying that Linux-only launcher candidates are ignored on macOS (reporting missing analysis engine) and that renamed macOS bundles are preferred over Linux paths on macOS.

Verification

  • Targeted Vitest suite in src/application/Doctor.test.ts passed (2/2 green).
  • node scripts/run-turbo.mjs run typecheck lint passed cleanly with 0 errors.

Resolves morluto#6228 by scoping automatic Hopper candidate discovery by host
platform in findHopper. On macOS, Linux system launcher paths are excluded
so they do not displace eligible renamed macOS bundles or falsely report
Hopper as healthy when no macOS launcher is executable.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-22T16:43:19.432838Z
We couldn’t complete this review. Comment @codex review to try again.
b4401b9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change stays within Hopper discovery in the doctor report.

This PR appears safe to merge, with one non-blocking cleanup in the Linux candidate list.

Findings

  1. P2 Linux paths are listed twice ▶
Fix with agent prompt
### Issue 1
src/application/DoctorDiagnostics.ts:165-168
`linuxHopperLauncherCandidates()` already includes `systemLinuxHopperLauncherCandidates`. Appending that list again makes the helper's role unclear. `firstExecutable()` removes the duplicates, so launcher selection is unchanged. Use `linuxHopperLauncherCandidates(host.homeDirectory)` directly.

```suggestion
          ? linuxHopperLauncherCandidates(host.homeDirectory)
```

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR separates automatic Hopper discovery by platform.

  • macOS doctor checks Mac Hopper bundles, not Linux launcher paths.

No runtime checks were run during this review. Whether another PR supersedes this one could not be checked because GitHub authentication was unavailable.

Reviews (1) · Last reviewed commit: "fix(doctor): ignore Linux Hopper launche..." · Reviewed by Greptile

Comment on lines +165 to +168
? [
...linuxHopperLauncherCandidates(host.homeDirectory),
...systemLinuxHopperLauncherCandidates,
]

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.

P2 Linux paths are listed twice

linuxHopperLauncherCandidates() already includes systemLinuxHopperLauncherCandidates. Appending that list again makes the helper's role unclear. firstExecutable() removes the duplicates, so launcher selection is unchanged. Use linuxHopperLauncherCandidates(host.homeDirectory) directly.

Suggested change
? [
...linuxHopperLauncherCandidates(host.homeDirectory),
...systemLinuxHopperLauncherCandidates,
]
? linuxHopperLauncherCandidates(host.homeDirectory)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/DoctorDiagnostics.ts
Line: 165-168

Comment:
**Linux paths are listed twice**

`linuxHopperLauncherCandidates()` already includes `systemLinuxHopperLauncherCandidates`. Appending that list again makes the helper's role unclear. `firstExecutable()` removes the duplicates, so launcher selection is unchanged. Use `linuxHopperLauncherCandidates(host.homeDirectory)` directly.

```suggestion
          ? linuxHopperLauncherCandidates(host.homeDirectory)
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@baron baron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-assisted review confirms the wrong-platform launcher-selection problem, but this is an overlapping alternative to #6253 for the same issue. #6253 centralizes candidate interpretation for runtime and doctor, preserves lazy/asynchronous scanning, and has broader parity coverage; it is the reviewed integration candidate.

Please consolidate rather than merge both patches unchanged. This PR also lacks completed human readiness and has unexecuted policy-gated CI. No approval or redundant CI rerun is warranted merely to duplicate the already-reviewed fix. No real Hopper launch/install or local full test pass is claimed.

@morluto

morluto commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Source-derived closure: current main already filters automatic Hopper candidates by platform, matching runtime selection. src/application/HopperLauncherDiscovery.ts returns only macOS candidates for darwin, and DoctorDiagnostics.ts consumes that shared list. Main commit 8f91e6055842caa6e7c551d639963b45b708d238 also adds cross-platform doctor/runtime selection regressions in src/application/Doctor.test.ts, including macOS Linux-only candidates and renamed bundles. The linked issue #6228 is already closed. No real Hopper execution was performed or claimed.

@morluto morluto closed this Oct 25, 2026
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] macOS doctor reports Linux-only Hopper launcher paths as healthy

3 participants