Repository navigation
fix(hopper): treat a directory launcher path as missing - #1426
Merged
Merged
Conversation
`HOPPER_LAUNCHER_PATH` availability was decided by an `X_OK` access check alone, which a searchable directory also passes. Pointing it at the `Hopper Disassembler.app` bundle instead of its launcher made `rea providers` report Hopper as available and `rea doctor` report it healthy, while analysis then failed with an unrelated `version_unresolved` rejection. Require a regular file in both the provider availability probe and the doctor executable probe, matching the Ghidra launcher check. A directory now reports `executable_missing`, and doctor reports `config_drift` with its existing HOPPER_LAUNCHER_PATH remediation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
`HOPPER_LAUNCHER_PATH` availability was decided by an `X_OK` access check alone, which a searchable directory also passes. Pointing it at the `Hopper Disassembler.app` bundle instead of its launcher made `rea providers` report Hopper as available and `rea doctor` report it healthy, while analysis then failed with an unrelated `version_unresolved` rejection. Require a regular file in both the provider availability probe and the doctor executable probe, matching the Ghidra launcher check. A directory now reports `executable_missing`, and doctor reports `config_drift` with its existing HOPPER_LAUNCHER_PATH remediation.
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
If
HOPPER_LAUNCHER_PATHpoints at a directory, such as theHopper Disassembler.appbundle instead of the launcher inside it:rea providersreports Hopper as available.rea doctorreports it healthy.version_unresolvedrejection.Both probes now require a regular file, as the Ghidra launcher probe already does, so the misconfiguration is reported where the user can fix it. No issue is linked because this is a small, self-contained fix.
Problem and expected behavior
Trigger:
HOPPER_LAUNCHER_PATH="/Applications/Hopper Disassembler.app", an easy mistake on macOS. Any directory triggers it.Violated invariant: availability means there is a launchable executable.
HopperProvider.inspectAvailabilityand Doctor'sexecutableAvailablerelied only onaccess(path, X_OK), and a searchable directory passes that check. The Ghidra probe inGhidraInstallation.tsalready addsstatSync(path).isFile().Observed on macOS (arm64), with an empty
Hopper Disassembler.appdirectory:rea providers --json, Hopper availabilityavailableunavailable,executable_missing: "Hopper launcher is missing or not executable: …/Hopper Disassembler.app"rea doctor --json,hoppercheckok: true,healthyok: false,config_drift, remediation "Unset or update HOPPER_LAUNCHER_PATH to an executable Hopper launcher."rea analyze /bin/ls --provider hopper --json, Hopper rejectionversion_unresolved: "Provider version or analysis profile could not be resolved"executable_missing, with the configured pathChange and scope
src/hopper/HopperProvider.ts: after the existingX_OKcheck, requirestatSync(path).isFile(). A directory takes the existingexecutable_missingpath, with its existing reason and diagnostics.src/application/Doctor.ts:executableAvailablereturnsfalsefor a non-regular file before the Linuxlddprobe.Relative launcher paths, symlinks to a launcher (
statfollows links), Linux behavior for real launchers, and all other availability codes are unchanged.Contract and boundary impact
executable_missing/config_driftoutcomesEvidence and regression coverage
src/hopper/HopperProviderDiscovery.test.ts: a directory launcher (dirname(process.execPath)) reportsunavailable/executable_missingwith the existing reason and diagnostics.src/application/Doctor.systemHost.test.ts:systemDoctorHost(...).executable()returnsfalsefor a directory andtrueforprocess.execPath, without running any command.Validation performed
All commands ran on macOS (arm64) with Node 24.18.0 and npm 11.16.0:
npm run test:local -- src/hopper/HopperProviderDiscovery.test.ts: 3 passed (new case fails on base).npm run test:local -- src/application/Doctor.systemHost.test.ts: 6 passed (new case fails on base).npm run test:local -- src/application/Doctor.test.ts: 24 passed.npm run test:local -- src/hopper/HopperProvider.test.ts: 1 passed.npm run check: passed.npm run build:cached, thenrea providers,rea doctorandrea analyzeon the base and fixed revisions: output shown above.Compatibility, safety, and release
Review checklist
type(scope): outcome.🤖 Generated with Claude Code