Repository navigation
fix(doctor): ignore Linux Hopper launcher candidates on macOS - #6355
dezzy-music wants to merge 1 commit into
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[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
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.SummaryThis PR separates automatic Hopper discovery by platform.
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 |
| ? [ | ||
| ...linuxHopperLauncherCandidates(host.homeDirectory), | ||
| ...systemLinuxHopperLauncherCandidates, | ||
| ] |
There was a problem hiding this comment.
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.
| ? [ | |
| ...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
left a comment
There was a problem hiding this comment.
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.
|
Source-derived closure: current main already filters automatic Hopper candidates by platform, matching runtime selection. |
Summary
Resolves #6228.
On macOS with no explicit launcher override (
HOPPER_LAUNCHER_PATHunset),rea doctor --provider hopperpreviously 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
src/application/DoctorDiagnostics.ts, scoped automatic Hopper candidate discovery infindHopperstrictly by host platform: ondarwin, only macOS canonical candidates and renamed bundles are probed; onlinux, Linux home and system candidates are probed.src/application/Doctor.test.tsverifying 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
src/application/Doctor.test.tspassed (2/2 green).node scripts/run-turbo.mjs run typecheck lintpassed cleanly with 0 errors.