Skip to content

fix(setup): detect existing Hopper install on Linux before reinstalling (#2270) - #2995

Closed
hussnainahmedd wants to merge 10 commits into
morluto:mainfrom
hussnainahmedd:fix/2270-hopper-linux-detect
Closed

hussnainahmedd wants to merge 10 commits into
morluto:mainfrom
hussnainahmedd:fix/2270-hopper-linux-detect

Conversation

@hussnainahmedd

Copy link
Copy Markdown
Contributor

Fixes #2270.

Problem

rea setup on Linux proposed (and with --yes --install-hopper, performed) a Hopper reinstall even when the user already had a working Hopper and had explicitly pointed REA at it via HOPPER_LAUNCHER_PATH.

Root cause: in discoverSetupState (src/application/SetupPlan.ts), linuxHopperRepairNeeded was true whenever the hopper-demo-runtime check failed or the hopper-version check failed at /opt/hopper/bin/Hopper. Both checks fail for legitimate existing installs that REA did not install itself:

  • hopper-version only accepts the pinned 6.4.2 demo-build SHA-256 digests, so a licensed build or a newer build (e.g. 6.5.0) fails the probe;
  • hopper-demo-runtime fails when the Xvfb private-display dependencies are absent, which is also true for licensed (non-demo) builds.

So a functioning, explicitly configured launcher still triggered the install_hopper plan.

Fix (setup/detection code only)

  • SetupInitialState gains hopperLauncherConfigured, set from HOPPER_LAUNCHER_PATH in systemSetupHost.initialSetupState (plumbed through runSetupWorkflow into discoverSetupState).
  • discoverSetupState no longer treats a failing version/demo-runtime probe as repair-needed when the launcher was explicitly configured: a configured, functioning launcher is the user's chosen provider and is treated as satisfied. rea doctor still reports the failing checks with their remediations.
  • The repair-install path is preserved for the REA-managed system install (/opt/hopper/bin/Hopper) when no launcher is configured.
  • Doctor discovery now also probes two more standard Linux launcher locations, /opt/hopper-v4/bin/hopper and /usr/bin/hopper, so installs there count as detected instead of prompting an install.

No sudo escalation behavior was added (REA deliberately avoids ambient sudo); the install plan still requires the existing user approval before any mutation.

Verification

  • New tests in src/application/Setup.configuration.test.ts (Hopper launcher detection (#2270)): configured launcher + failing demo-runtime check → no install_hopper action, 0 installs; configured launcher + failing version probe → no install_hopper action, 0 installs; unconfigured + failing version probe at /opt/hopper/bin/Hopper → repair install_hopper still proposed (regression guard).
  • New tests in src/application/Doctor.test.ts: /opt/hopper-v4/bin/hopper and /usr/bin/hopper are detected as the Hopper launcher.
  • Ran the touched-area suites (compiled with tsc, executed under plain node with a minimal vitest-compatible harness because this sandbox's rolldown native binding crashes on load, so vitest itself cannot run here):
    • Setup.configuration.test 21 passed, Doctor.test 30 passed, Setup.planning.test 15 passed, Setup.recovery.test 12 passed, Setup.initialSnapshot.test 1 passed, config.test 41 passed, HopperProviderDiscovery.test 3 passed, SetupInstallFailure.test 2 passed, cliLogging.test 6 passed, setupEnvironment.test 5 passed — 136 passed, 0 failed.
  • tsc --noEmit on the repo tsconfig: 0 errors in any touched file (38 pre-existing errors elsewhere, all in src/browser/* playwright typings and one darwin boundary test, present on base and unrelated to this change; they stem from running the older pure-JS TS 5.9 here instead of the repo's pinned native TS 7.0.2).
  • npm run verify:module-boundaries: passed (1758 source files checked).
  • npm run verify:test-discovery: could not execute in this sandbox (it shells out to vitest, which SIGBUS-crashes on the broken rolldown native binding); no new test files were added — tests were added to two existing discovered files, so discovery output is unchanged.
  • oxlint on the 8 touched files: 0 errors, only the 4 warnings that already exist on base.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

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 ✅ Completed 2026-10-14T00:26:17.314680Z a464677 New commits
ℹ️ 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.

…ng (#2270)

Honor HOPPER_LAUNCHER_PATH: when the user explicitly configures a Hopper
launcher, setup treats it as the chosen provider and no longer proposes a
repair reinstall just because the pinned demo-build digest or the demo
runtime probe fails. Repair installs are still proposed for the REA-managed
system install at /opt/hopper/bin/Hopper when nothing is configured.

Also probe two more standard Linux launcher locations during doctor
discovery (/opt/hopper-v4/bin/hopper, /usr/bin/hopper) so existing installs
there count as detected instead of triggering an install prompt.
@hussnainahmedd
hussnainahmedd force-pushed the fix/2270-hopper-linux-detect branch from 42c4f63 to d6e3d3e Compare October 13, 2026 19:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcf53522fa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/application/Setup.ts
forceHopperInstall: options.installHopper,
proposeHopper:
options.proposeHopper ?? (confirm !== undefined && !options.structured),
hopperLauncherConfigured: initialState.hopperLauncherConfigured,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor the configured-launcher flag in discovery

When an executable explicitly selected through HOPPER_LAUNCHER_PATH fails the demo-runtime check (or the version check at /opt/hopper/bin/Hopper), this newly forwarded value has no effect: discoverSetupState still does not declare/read it, and linuxHopperRepairNeeded in SetupPlan.ts remains based only on those failed diagnostics. The interactive plan therefore still includes install_hopper, and accepting it reinstalls over the caller-selected Hopper build; add the flag to the discovery input and use it to suppress only the automatic repair path.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable defects were found.

Summary

Setup now preserves explicitly configured Hopper launchers when Linux version or demo-runtime checks fail.

  • Linux setup leaves a configured Hopper launcher out of repair installs.
  • Linux Hopper discovery finds standard launchers and selects only ready paths.

All four supplied earlier threads are addressed by the current code. None has a supplied comment number.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Find Hopper launcher] --> B{Launcher explicitly configured?}
  B -->|Yes| C[Keep chosen launcher]
  B -->|No| D[Search shared Linux candidates]
  D --> E{Managed system path selected?}
  E -->|Yes| F{Version or demo-runtime check fails?}
  F -->|Yes| G[Offer approved repair]
  F -->|No| H[Keep existing launcher]
  E -->|No| H
Loading

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile

Comment thread src/application/SetupPlan.ts Resolved
Comment thread src/application/DoctorDiagnostics.ts Resolved
@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Noting that #2270 was just closed by the reporter (a fresh terminal session picked up the exported HOPPER_LAUNCHER_PATH on their end, so it turned out to be an environment quirk rather than a code bug).

This PR's changes still stand on their own as hardening: a configured, working launcher is treated as satisfied instead of proposing a reinstall, and the doctor probes a couple of extra standard install paths. Happy to keep it open if that's useful, or close it if you'd rather not take the extra behavior — just say the word.

@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews — addressed in a4b25eb:

Honor the configured-launcher flag in discovery (Codex) — this one was already covered in the PR head: hopperLauncherConfigured is plumbed from HOPPER_LAUNCHER_PATH through initialSetupState into discoverSetupState, which suppresses the repair reinstall for configured launchers (covered by the two "does not reinstall Hopper for a configured launcher" tests). The review ran against the pre-fix commit.

Setup still replaces existing launchers (greptile) — fixed: the automatic repair reinstall is now restricted to the REA-managed install (/opt/hopper/bin/Hopper). A discovered third-party launcher (/usr/bin/hopper, /opt/hopper-v4/bin/hopper) with a failing demo runtime check no longer gets an install_hopper plan; it keeps doctor's own remediation. Added a setup test for both newly discovered paths, and kept the existing "still proposes repair for the REA-managed install" test green. (SetupPlan.ts, Setup.configuration.test.ts)

Runtime ignores newly discovered launchers (greptile) — fixed: the ordered Linux launcher candidate list is now shared between doctor discovery and runtime configuration via the new systemLinuxHopperLauncherCandidates in LinuxHopper.ts (REA-managed path stays first). defaultHopperLauncherPath in parseConfig.ts searches the same candidates, so discovery and execution select the same launcher. Also consolidated the REA-managed path into one exported constant. Tests: new defaultHopperLauncherPath cases in config.test.ts (each new path selected when present, managed-path preference, user-local/managed fallbacks); the doctor discovery tests for the new paths still pass.

Validation: tsc clean, npm run lint clean, module boundaries clean, src/application suite 865 tests pass, hopper suite 90 pass, config.test.ts 44 pass.

Also updated the branch — now current with main. Per AGENTS.md, install_hopper remains a planned action requiring approval; this change only affects when it is proposed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45d475dd64

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/parseConfig.ts Outdated
Comment on lines +36 to +39
const system = systemLinuxHopperLauncherCandidates.find((candidate) =>
executable(candidate),
);
if (system !== undefined) return system;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate new system launchers before preferring them

On Linux hosts where a newly added system path such as /opt/hopper-v4/bin/hopper passes X_OK but is a directory or has unresolved shared libraries, while ~/.local/share/rea/hopper/bin/Hopper is usable, this find selects the bad path and never reaches the user-local fallback. Doctor.ts's executableAvailable instead requires a regular file and a successful ldd, so rea doctor can select the usable fallback while normal runtime configuration feeds Hopper a different, unusable launcher; reuse the same readiness decision for both resolutions rather than treating execute access as readiness.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Mirror doctor discovery's readiness decision in the default launcher
probe: execute access alone is not readiness. Require a regular file and,
on Linux, resolvable shared libraries under ldd, so runtime config and
rea doctor select the same launcher.
@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Addressed the Codex P2 finding in src/config/parseConfig.ts — verified valid: the default executableAvailable probe only checked X_OK, while doctor discovery (Doctor.ts) requires a regular file plus a successful ldd on Linux, so the two could select different launchers.

The default probe now mirrors doctor discovery's readiness decision: X_OK access, statSync(...).isFile(), and on Linux a successful ldd with resolvable shared libraries (reusing the existing linuxSharedLibrariesAvailable interpreter). It fails closed — any probe error means the candidate is skipped and resolution falls through to the user-local launcher, exactly like rea doctor. Added Linux-gated regression tests in src/config.test.ts (directory rejected, script with failing ldd rejected, healthy binary accepted, missing path rejected). src/config.test.ts 57/57 green; tsc --noEmit, oxlint, oxfmt, and module-boundary checks clean.

Comment thread src/config/parseConfig.ts Resolved
Comment thread src/config/parseConfig.ts Resolved
@greptile-apps

greptile-apps Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 887100a0b4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/application/DoctorDiagnostics.ts Outdated
Comment on lines 154 to 155
...systemLinuxHopperLauncherCandidates,
linuxHopperLauncherPath(host.homeDirectory),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Continue discovery past unsupported Hopper builds

When a new system candidate is executable/linkable but has a digest outside the pinned supported set, while the legacy user-local launcher is supported, this ordering makes firstExecutable stop at the unusable system binary before checking the working fallback. Fresh evidence beyond the earlier launcher-validation review is that the final ldd fix still leaves the digest probe in optionalHopperVersionCheck after selection, while scripts/hopper-demo-x11.py rejects unsupported digests and the runtime mirrors this candidate order; make the owning discovery result include full build readiness and continue on failure.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Comment thread src/config/parseConfig.ts
Comment on lines +33 to +36
const linked = execFileSync("ldd", [path], {
encoding: "utf8",
stdio: ["ignore", "pipe", "ignore"],
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run linker probes under the selected environment

When createCli, createDirectAnalysis, or MCP run is constructed with a caller-selected environment that differs from ambient process.env, this ldd child inherits the ambient PATH and LD_LIBRARY_PATH because no env is passed. A Hopper candidate can therefore be rejected even though its libraries resolve in the selected environment, or accepted and then fail when Hopper is launched with that selected environment; thread the parsed environment into this probe instead of inheriting ambient state.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Comment thread src/config.test.ts Outdated
writeFileSync(brokenScript, "#!/bin/sh\nexit 0\n", { mode: 0o755 });

const healthyBinary = join(fixtureRoot, "hopper-ok");
copyFileSync("/bin/true", healthyBinary);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Create Linux fixtures only after the suite is selected

On a Windows test run where /bin/true is absent, Vitest still invokes the factory of a describe.runIf(false) suite during collection so that it can register the skipped tests, and this unconditional copy throws before the suite can be skipped. Guard fixture creation itself or move it into a Linux-only lifecycle hook/test so cross-platform collection and cleanup remain reliable.

AGENTS.md reference: AGENTS.md:L77-L77

Useful? React with 👍 / 👎.

…ler environment

Order the Linux Hopper launcher candidates once — REA-managed install,
legacy user-local install, then the newly discovered system-wide installs —
and use that order in both doctor discovery and runtime configuration, so a
working user-local demo is no longer skipped in favor of an arbitrary system
build the adapter may reject as an unsupported digest.

Thread the caller-selected environment into the ldd readiness probe so
discovery and execution agree on linker resolution instead of probing under
the ambient process environment.

Move the Linux-only probe fixtures into beforeAll: Vitest runs the describe
factory during collection even for skipped suites, so the unconditional
/bin/true copy threw on platforms without it. Add a regression test proving
the linker probe inherits the caller-selected environment.
@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews — verified each finding with probe tests:

  • v4 launcher preferred over the user-local demo (P1): valid. The Linux candidates are now ordered once — REA-managed install, legacy user-local install, then the system-wide installs — and shared by doctor discovery and runtime config, so the working demo outranks /opt/hopper-v4/bin/hopper.
  • ldd probe ignoring the caller env (P1): valid. The linker probe now runs under the caller-selected environment, so discovery and execution agree.
  • Ambient PATH/LD_LIBRARY_PATH in the probe (P2): valid — same fix as above.
  • Linux fixtures built during collection (P2): valid. Fixture creation moved into beforeAll; the /bin/true copy no longer throws on Windows during collection.
  • Discovery stopping at an unsupported-digest build (P2): not applied — discovery intentionally reports the first executable launcher, and the dedicated hopper-version check already flags unsupported digests with remediation. Skipping them would turn that precise signal into a misleading "hopper missing".

src/config.test.ts + Doctor.test.ts (91 tests) green, tsc/oxlint/oxfmt clean, branch updated to latest main.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45927ffc82

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/parseConfig.ts
Comment on lines +37 to +41
const linked = execFileSync("ldd", [path], {
encoding: "utf8",
stdio: ["ignore", "pipe", "ignore"],
env: environment,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bound the synchronous linker probe

When a Linux candidate is executable and the ldd selected from the caller's PATH stalls, this execFileSync has no timeout or abort path, so parseConfig blocks the process indefinitely; that path runs during MCP startup and before each direct-analysis command, making those entry points hang. Run the probe with the repository's process supervision and a hard deadline instead of an unbounded synchronous child.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working labels Oct 13, 2026
@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Thanks — fixed in a464677.

The ldd probe was unbounded, so a stalled PATH-selected ldd could hang parseConfig (MCP startup / every direct-analysis command). It now carries a hard 10s deadline (LDD_PROBE_TIMEOUT_MS): on expiry the child is killed (SIGKILL — a PATH wrapper can't trap it) and the candidate fails closed like any other probe error.

I kept the probe synchronous deliberately: parseConfig is the sync composition root and the repo's async supervision (src/process/ExecFileOutput) can't serve a sync caller, so the bound lives on the child itself.

Added a regression test with a never-answering fake ldd (fails closed in ~1s instead of hanging). src/config.test.ts 62/62 green, typecheck + lint + format clean.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a464677d8a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (options.signal?.aborted)
throw new BrowserObservationError(OPERATION, "cancelled");
const launchOptions: Parameters<typeof electron.launch>[0] = {
application = await this.launch({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Contain rejections from failed Electron launches

When executable_path is runnable but exits before Playwright sees an inspector endpoint (for example /bin/true), this direct launch restores the Playwright behavior in which its internal wait promises reject after the awaited launch has failed. Those orphaned rejections are unhandled and Node terminates the CLI or long-lived MCP server instead of returning the provider error, so keep the scoped rejection containment around this.launch.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

readonly basis: ConcreteMatchBasis;
readonly key: (item: Keyed<Item>) => string | null;
}[] = [
{ basis: exactBasis, key: ({ exactKey }) => exactKey },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pair managed members by declared identity before remapping

When two declared types contain methods with identical signatures and CIL, this name-free exact round runs before the later signature key that contains type/name. In a self-comparison both sides form a multi-item group and are consumed as ambiguous, while an asymmetric inventory can pair the wrong types, so restore declared-identity rounds before using name-free keys as remaps.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Comment thread src/cli/coreBinaryCommands.ts Outdated
}),
options: overviewOptions.extend({
integrityPolicy: laneIntegrityPolicy,
integrityPolicy: javascriptApplicationOptions.shape.integrityPolicy,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject integrity policies on the binary lane

When rea analyze is given a binary plus an explicit --integrity-policy, this schema accepts/defaults the option but the binary branch forwards {}, so the policy is silently ignored. The documented contract limits the flag to the two JavaScript routes (docs/mcp-contracts.md:611-615); preserve whether it was supplied and reject it on the binary lane rather than reporting analysis without the requested constraint.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

}
return installationCheck({
name: "native_decompiler",
passed: path !== null && compatibility?.status !== "incompatible",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Validate the decompiler directory selected by the JVM

When host and JDK architectures differ (for example arm64 macOS with an x86_64 JDK under Rosetta), this predicate validates only the decompiler for the host architecture after the JVM os.arch/os.name probe and mismatch checks are removed. Doctor can report healthy although Ghidra selects os/mac_x86_64 and every analysis fails; keep the JVM properties in inspection and fail closed on a mismatch or unknown value.

AGENTS.md reference: AGENTS.md:L21-L21

Useful? React with 👍 / 👎.

The ldd readiness probe in executableAvailable used an unbounded
execFileSync, so a stalled PATH-selected ldd could hang parseConfig —
which runs during MCP startup and before each direct-analysis command.
Give the child a 10s deadline (LDD_PROBE_TIMEOUT_MS) and SIGKILL on
expiry: execFileSync throws, and the candidate fails closed like any
other probe error. The repository's async process supervision cannot
serve the synchronous composition root, so the bound lives on the child
itself. Add a regression test with a never-answering fake ldd.
@hussnainahmedd
hussnainahmedd force-pushed the fix/2270-hopper-linux-detect branch from a464677 to 45a68dd Compare October 14, 2026 00:55
@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.

@hussnainahmedd

Copy link
Copy Markdown
Contributor Author

Synced the branch with upstream main — the merge conflict is resolved.

What was kept from both sides:

  • This PR's fix: the Linux ldd readiness probe in executableAvailable now has a 10s deadline (LDD_PROBE_TIMEOUT_MS) with SIGKILL on expiry, failing closed like any other probe error, plus the regression test with a never-answering fake ldd.
  • Upstream's changes: everything from main merged in cleanly.

One cleanup note: the previous sync commit had accidentally dropped a large number of unrelated files (CI scripts, docs, tests); I repaired the branch history so the branch now contains exactly this PR's changes on top of current main. Verified: src/config.test.ts 62/62 green, tsc clean, oxlint clean.

morluto added a commit that referenced this pull request Oct 14, 2026
Keep layered environment choices, current byte-exact recovery snapshots, and package-manager failure details. Report pinned package drift without claiming runner resolution. Retain failed Linux installer cleanup for host-owned retry while preserving the install outcome.

Reviewed fixes include #2632, #2769, #2783, #2959, #2979, #2983, #2995, #3009, and #2559.

Validation: 98 focused setup/registration tests passed; 45 Linux installer tests passed. Real Linux package installation remains unverified.
@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Superseded by the delivered change on main: ec56c1da0. Configured Linux Hopper launchers prevent false repair/reinstallation, and standard launcher paths are detected. Closing this earlier proposal. Current main qualification passed: https://github.com/morluto/rea/actions/runs/38690953281.

@morluto morluto closed this Oct 15, 2026
@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

@hussnainahmedd, thanks for identifying an existing Linux Hopper launcher being treated as a missing installation. Main reuses the discovered launcher.

@morluto morluto added the provider: hopper Analysis provider / engine: hopper label 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] Hopper not detected on Linux during setup

3 participants