Skip to content

fix(linux): start Hopper demo sessions headlessly - #110

Merged
morluto merged 4 commits into
mainfrom
fix/linux-hopper-demo
Jul 13, 2026
Merged

morluto merged 4 commits into
mainfrom
fix/linux-hopper-demo

Conversation

@morluto

@morluto morluto commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Description

Linux Hopper 6.4.2 presents Try the Demo on every cold process and blocks the REA Python bridge before CLI or MCP analysis can start. This change makes that startup path work without a desktop session or a persistent Hopper process.

REA now launches each Linux Hopper session on an authenticated private Xvfb display, validates the exact supported Hopper binary and dialog rectangle, selects only the expected demo action, waits for the authenticated bridge handshake, and tears down Hopper and Xvfb with the session. Licensed installations continue when the bridge appears without a demo dialog. Any binary, dialog, process, or startup mismatch fails closed with a caller-safe error.

Setup now installs the direct Xvfb, xauth, Python, X11, and XTEST runtime packages, pins the official Hopper 6.4.2 Linux artifacts, and reports unsupported configured launchers instead of repeatedly reinstalling the system package. Doctor checks the same runtime and binary contracts. Fresh macOS installs still require first-run activation.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test via npm run check)
  • Real Hopper verification performed (npm run verify:hopper): macOS was not available
  • Linux real Hopper verification performed (npm run verify:hopper:linux)
  • Package verification performed (npm run verify:package)

Additional proof:

  • HOPPER_TARGET_PATH=/usr/bin/true HOPPER_SECOND_TARGET_PATH=/usr/bin/false npm run verify:hopper:linux passed with 68 tools, target switching, and clean shutdown.
  • The same Linux verifier passed while the parent environment advertised Wayland, proving the helper forced Hopper onto its private X11 display.
  • npm pack --dry-run --json included scripts/hopper-demo-x11.py.
  • npm run knip, npm run jscpd, and npm run scan:todos completed; jscpd reported 1.49% duplicated lines.
  • Final structured autoreview reported no accepted or actionable findings.

Real runtime verification used Ubuntu 24.04 and Hopper 6.4.2. Fedora and Arch package commands are covered by tests but were not exercised on real hosts. Supporting another Hopper version requires validating its real dialog layout and adding its binary and package digests.

Tool Contract Impact

None. The 68-tool inventory and MCP schemas are unchanged. CLI and MCP share the same Hopper launch boundary.

Suggested Review Order

  1. scripts/hopper-demo-x11.py and src/hopper/BridgeLauncher.ts
  2. src/application/LinuxHopper.ts, src/application/Doctor.ts, and src/application/Setup.ts
  3. src/hopper/HopperClient.ts and src/domain/errors.ts
  4. Tests and package/real-Hopper verifiers

Related Issues

No directly related issue or PR was found.

Disclosure

This change was developed with AI assistance. The implementation was exercised against real Hopper on Linux, audited through the repository review gates, and the final diff passed structured review.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto force-pushed the fix/linux-hopper-demo branch from ecac22f to 75818d1 Compare July 13, 2026 20:58
@morluto
morluto merged commit 32c5080 into main Jul 13, 2026
11 checks passed
@morluto
morluto deleted the fix/linux-hopper-demo branch July 28, 2026 17:39
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
fix(linux): start Hopper demo sessions headlessly
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
DrAbdulmalek pushed a commit to DrAbdulmalek/rea that referenced this pull request Oct 26, 2026
Rebase of useful morluto#105 content onto main after morluto#104.
Keep uv/ZIP security in UV-AND-DOWNLOAD-SECURITY.md; do not close morluto#51.
@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: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant