Skip to content

fix(hopper): complete owned Linux shutdown - #116

Merged
morluto merged 2 commits into
mainfrom
fix/hopper-owned-shutdown
Jul 13, 2026
Merged

morluto merged 2 commits into
mainfrom
fix/hopper-owned-shutdown

Conversation

@morluto

@morluto morluto commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Description

Linux real-Hopper verification completed analysis but hung for 30 seconds in waitForBackgroundProcessToEnd() during shutdown. The timeout produced an error diagnostic even though REA owns the Linux demo Hopper process group and can close it through the existing run-token-verified cleanup path.

This change distinguishes two shutdown paths:

  • owned Linux demo sessions acknowledge that process cleanup is required, then keep the bridge socket available while the client performs verified process-group cleanup;
  • non-owned sessions retain Hopper's document stop, wait, and close sequence.

If owned cleanup fails, the client requests a bounded document-shutdown fallback and retries cleanup. Cleanup still fails closed when process identity cannot be proven.

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): 67 files, 479 tests
  • 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_LAUNCHER_PATH=/opt/hopper/bin/Hopper HOPPER_TARGET_PATH=/bin/true HOPPER_SECOND_TARGET_PATH=/bin/ls npm run verify:hopper:linux passed with 68 tools, two distinct target hashes, semantic decompilation and dossier checks, target switching, and cleanShutdown: true.
  • HOPPER_LAUNCHER_PATH=/opt/hopper/bin/Hopper node scripts/rea.mjs analyze --format md /bin/true returned a binary_overview Evidence record instead of calling an unknown bridge method.
  • npm run verify:package passed the packaged CLI, setup, 68-tool MCP server, six prompts, and target lifecycle.
  • npm pack --dry-run listed 179 package files.
  • Final structured autoreview reported no accepted or actionable findings.

Tool Contract Impact

None. The 68-tool inventory and public CLI/MCP schemas are unchanged. The new shutdown messages are private to REA's authenticated Hopper bridge.

Suggested Review Order

  1. bridge/hopper_bridge.py
  2. src/hopper/HopperClient.ts and src/hopper/BridgeLauncher.ts
  3. tests/bridgeTruthfulness.test.ts

Related Issues

Closes #16.
Closes #56.

@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 merged commit fb51874 into main Jul 13, 2026
11 checks passed
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
* fix(hopper): avoid blocking owned Linux shutdown

* fix(hopper): complete owned shutdown cleanup
@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
@morluto
morluto deleted the fix/hopper-owned-shutdown branch October 25, 2026 08:57
DrAbdulmalek pushed a commit to DrAbdulmalek/rea that referenced this pull request Oct 26, 2026
@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.

Replace temporal Hopper cleanup with explicit process ownership Fix false-positive paths in real-Hopper verification

1 participant