[PR #1105] [MERGED] fix(hopper): report launcher failures before bridge timeout #2653

Closed
opened 2026-10-17 21:08:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1105
Author: @N0zoM1z0
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/hopper-helper-startup-failures


📝 Commits (2)

  • 2e18f58 fix(hopper): report launcher failures before bridge timeout
  • d898981 fix(hopper): separate helper ownership from GUI lifetime

📊 Changes

11 files changed (+270 additions, -28 deletions)

View changed files

📝 src/domain/analysisErrorPresentation.ts (+5 -1)
📝 src/domain/analysisErrorProjection.ts (+7 -1)
📝 src/domain/hopperErrors.ts (+14 -0)
📝 src/hopper/BridgeLauncher.ts (+20 -7)
📝 src/hopper/HopperCleanup.test.ts (+1 -0)
📝 src/hopper/HopperClient.ts (+68 -15)
📝 tests/boundary/providers/hopper/hopperClient.cleanup.test.ts (+3 -0)
📝 tests/boundary/providers/hopper/hopperClient.fixture.ts (+1 -0)
📝 tests/boundary/providers/hopper/hopperClient.health.test.ts (+4 -1)
➕ tests/boundary/providers/hopper/hopperClient.helperFailure.test.ts (+136 -0)
📝 tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts (+11 -3)

📄 Description

A failed macOS Hopper launcher helper was ignored until the bridge readiness timeout, hiding the observed Spotlight discovery error behind a generic startup timeout. Stop waiting after an observed nonzero/signal helper exit, preserve its stdout/stderr, exit code and signal in details.launcher, and keep the GUI state unknown. A successful helper exit still hands off to the GUI normally. The native launcher keeps ownership of its helper process group for cleanup while declaring the external GUI lifetime separately; helper exit must not mark that GUI exited. An owned provider exit, including exit 0 before readiness, reports the observed process exit.

Launcher output drainage is bounded because descendants may inherit its pipes. Diagnostics report output closure/truncation and redact only the session transport credential, preserving caller evidence.

Validation: six new regressions fail before their respective fixes; 93 focused startup, protocol, health, cleanup, lease and error-projection tests pass. Build, static checks and generated-document checks pass.

The final installed package (d898981f, SHA-256 c3f0e1c757f56a368c60ff3b933d75d1f93cf52a740649b4fec670b3003d2b67) passes the unmodified real Linux Hopper 6.4.2 CLI/MCP verifiers, including target identity/switching, 1,205-item inventories, unrelated-process survival and clean shutdown. A native macOS official-demo probe uses identical production source and confirms exit 3 plus the original Spotlight error are returned promptly with GUI state unknown while the GUI remains running. Full macOS analysis is not qualified: the runner's official helper cannot find Hopper through Spotlight, and the initial demo dialog is still being initialized. No Hopper/Ghidra support expansion is claimed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1105 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/hopper-helper-startup-failures` --- ### 📝 Commits (2) - [`2e18f58`](https://github.com/morluto/rea/commit/2e18f581123ac6cf1659ae4ef8c18609ccc82398) fix(hopper): report launcher failures before bridge timeout - [`d898981`](https://github.com/morluto/rea/commit/d898981f9350f98b4bb5fd1322896926e73a0945) fix(hopper): separate helper ownership from GUI lifetime ### 📊 Changes **11 files changed** (+270 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/analysisErrorPresentation.ts` (+5 -1) 📝 `src/domain/analysisErrorProjection.ts` (+7 -1) 📝 `src/domain/hopperErrors.ts` (+14 -0) 📝 `src/hopper/BridgeLauncher.ts` (+20 -7) 📝 `src/hopper/HopperCleanup.test.ts` (+1 -0) 📝 `src/hopper/HopperClient.ts` (+68 -15) 📝 `tests/boundary/providers/hopper/hopperClient.cleanup.test.ts` (+3 -0) 📝 `tests/boundary/providers/hopper/hopperClient.fixture.ts` (+1 -0) 📝 `tests/boundary/providers/hopper/hopperClient.health.test.ts` (+4 -1) ➕ `tests/boundary/providers/hopper/hopperClient.helperFailure.test.ts` (+136 -0) 📝 `tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts` (+11 -3) </details> ### 📄 Description A failed macOS Hopper launcher helper was ignored until the bridge readiness timeout, hiding the observed Spotlight discovery error behind a generic startup timeout. Stop waiting after an observed nonzero/signal helper exit, preserve its stdout/stderr, exit code and signal in `details.launcher`, and keep the GUI state unknown. A successful helper exit still hands off to the GUI normally. The native launcher keeps ownership of its helper process group for cleanup while declaring the external GUI lifetime separately; helper exit must not mark that GUI exited. An owned provider exit, including exit 0 before readiness, reports the observed process exit. Launcher output drainage is bounded because descendants may inherit its pipes. Diagnostics report output closure/truncation and redact only the session transport credential, preserving caller evidence. Validation: six new regressions fail before their respective fixes; 93 focused startup, protocol, health, cleanup, lease and error-projection tests pass. Build, static checks and generated-document checks pass. The final installed package (`d898981f`, SHA-256 `c3f0e1c757f56a368c60ff3b933d75d1f93cf52a740649b4fec670b3003d2b67`) passes the unmodified real Linux Hopper 6.4.2 CLI/MCP verifiers, including target identity/switching, 1,205-item inventories, unrelated-process survival and clean shutdown. A [native macOS official-demo probe](https://github.com/morluto/rea/actions/runs/37817802837) uses identical production source and confirms exit 3 plus the original Spotlight error are returned promptly with GUI state unknown while the GUI remains running. Full macOS analysis is not qualified: the runner's official helper cannot find Hopper through Spotlight, and the initial demo dialog is still being initialized. No Hopper/Ghidra support expansion is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2653
No description provided.