[PR #6645] [CLOSED] fix(hopper): preserve POSIX path separators for macOS and Linux Hopper launchers #7387

Closed
opened 2026-11-01 21:47:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6645
Author: @keshavagr025
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: fix/hopper-launcher-posix-path-normalization


📝 Commits (2)

  • cf99797 fix(hopper): preserve POSIX path separators for macOS and Linux Hopper launchers
  • 2cc4cd7 fix(hopper): preserve literal backslashes in POSIX Hopper home paths

📊 Changes

4 files changed (+94 additions, -7 deletions)

View changed files

📝 src/application/LinuxHopper.test.ts (+24 -0)
📝 src/application/LinuxHopper.ts (+15 -2)
📝 src/application/MacHopperPaths.test.ts (+40 -2)
📝 src/application/MacHopperPaths.ts (+15 -3)

📄 Description

Summary

Fix cross-platform path separator handling in macOS and Linux Hopper launcher candidate discovery.

Problem and expected behavior

src/application/MacHopperPaths.ts and src/application/LinuxHopper.ts imported ambient join from "node:path". On non-POSIX/Windows hosts, join emitted Windows backslashes (\) for macOS bundle structures and Linux directories (e.g. \Applications\Hopper Disassembler.app\...), breaking candidate matching.

Expected behavior: macOS and Linux application paths represent Unix file system targets and must always use canonical POSIX forward slashes (/), regardless of the operating system hosting REA.

Change and scope

  • Replaced ambient join with posix.join in src/application/MacHopperPaths.ts and src/application/LinuxHopper.ts.
  • Normalized user home directory separators (toPosix) before path joining.
  • Updated src/application/MacHopperPaths.test.ts to assert against normalized POSIX paths.

Follow the contribution scope: not applicable (routine bug fix within existing provider discovery boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/application/MacHopperPaths.ts & src/application/LinuxHopper.ts (provider discovery).
  • Contribution scope fit and linked maintainer decision: Not applicable (routine bug fix).
  • CLI and MCP/tool-catalog contract: No contract changes.
  • Provider, bridge, target-format, or platform compatibility: Restores cross-platform compatibility for Hopper discovery diagnostics when executed on Windows/non-POSIX hosts.
  • Evidence, artifact, provenance, or reconstruction contract: No changes.
  • Target selection, authority, upstream behavior, and cleanup details: Not applicable.
  • Generated metadata impact: None.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: src/application/MacHopperPaths.test.ts (updated expectation assertion for cross-platform candidate verification).
  • Base reproduction or other evidence: On Windows, npm run test:local -- src/application/MacHopperPaths.test.ts previously failed 2 tests with AssertionError: expected ['/Applications/...'] to deeply equal ['\\Applications\\...']. npm run test:local -- src/application/Doctor.test.ts previously failed checks the canonical user install after the system launcher with AssertionError: expected undefined to be ....
  • User-visible CLI/MCP output: Not applicable.
  • Remaining proof gaps: None.

Validation performed

  • npm run test:local -- src/application/MacHopperPaths.test.ts — 3/3 tests passed.
  • npm run test:local -- src/application/Doctor.test.ts — 32/32 tests passed.
  • npm run check:fast — TypeScript typecheck and Oxlint passed with 0 errors.
  • npm run format:check — All 4,025 files verified clean.

Compatibility, safety, and release

  • Breaking changes or migration steps: None.
  • Real Hopper/Ghidra, browser, or OS coverage: Validated on Windows 11 x64; unit tests run across Node.js 22.19.0.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: Safe; no permission, network, or process execution changes.

Author readiness

Human owner: @keshavagr025

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/6645 **Author:** [@keshavagr025](https://github.com/keshavagr025) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/hopper-launcher-posix-path-normalization` --- ### 📝 Commits (2) - [`cf99797`](https://github.com/morluto/rea/commit/cf9979756af687cfb4ec9db36f3f0e9659546560) fix(hopper): preserve POSIX path separators for macOS and Linux Hopper launchers - [`2cc4cd7`](https://github.com/morluto/rea/commit/2cc4cd73e5b585c29acde0bdd449d2f76f8ce498) fix(hopper): preserve literal backslashes in POSIX Hopper home paths ### 📊 Changes **4 files changed** (+94 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/application/LinuxHopper.test.ts` (+24 -0) 📝 `src/application/LinuxHopper.ts` (+15 -2) 📝 `src/application/MacHopperPaths.test.ts` (+40 -2) 📝 `src/application/MacHopperPaths.ts` (+15 -3) </details> ### 📄 Description ## Summary Fix cross-platform path separator handling in macOS and Linux Hopper launcher candidate discovery. ## Problem and expected behavior `src/application/MacHopperPaths.ts` and `src/application/LinuxHopper.ts` imported ambient `join` from `"node:path"`. On non-POSIX/Windows hosts, `join` emitted Windows backslashes (`\`) for macOS bundle structures and Linux directories (e.g. `\Applications\Hopper Disassembler.app\...`), breaking candidate matching. Expected behavior: macOS and Linux application paths represent Unix file system targets and must always use canonical POSIX forward slashes (`/`), regardless of the operating system hosting REA. ## Change and scope - Replaced ambient `join` with `posix.join` in `src/application/MacHopperPaths.ts` and `src/application/LinuxHopper.ts`. - Normalized user home directory separators (`toPosix`) before path joining. - Updated `src/application/MacHopperPaths.test.ts` to assert against normalized POSIX paths. Follow the contribution scope: not applicable (routine bug fix within existing provider discovery boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/application/MacHopperPaths.ts` & `src/application/LinuxHopper.ts` (provider discovery). - Contribution scope fit and linked maintainer decision: Not applicable (routine bug fix). - CLI and MCP/tool-catalog contract: No contract changes. - Provider, bridge, target-format, or platform compatibility: Restores cross-platform compatibility for Hopper discovery diagnostics when executed on Windows/non-POSIX hosts. - Evidence, artifact, provenance, or reconstruction contract: No changes. - Target selection, authority, upstream behavior, and cleanup details: Not applicable. - Generated metadata impact: None. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: `src/application/MacHopperPaths.test.ts` (updated expectation assertion for cross-platform candidate verification). - Base reproduction or other evidence: On Windows, `npm run test:local -- src/application/MacHopperPaths.test.ts` previously failed 2 tests with `AssertionError: expected ['/Applications/...'] to deeply equal ['\\Applications\\...']`. `npm run test:local -- src/application/Doctor.test.ts` previously failed `checks the canonical user install after the system launcher` with `AssertionError: expected undefined to be ...`. - User-visible CLI/MCP output: Not applicable. - Remaining proof gaps: None. ## Validation performed - `npm run test:local -- src/application/MacHopperPaths.test.ts` — 3/3 tests passed. - `npm run test:local -- src/application/Doctor.test.ts` — 32/32 tests passed. - `npm run check:fast` — TypeScript typecheck and Oxlint passed with 0 errors. - `npm run format:check` — All 4,025 files verified clean. ## Compatibility, safety, and release - Breaking changes or migration steps: None. - Real Hopper/Ghidra, browser, or OS coverage: Validated on Windows 11 x64; unit tests run across Node.js 22.19.0. - Package or release metadata impact: None. - Security, privacy, process, or containment review: Safe; no permission, network, or process execution changes. ## Author readiness Human owner: @keshavagr025 - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:29 +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#7387
No description provided.