[PR #3558] fix(hopper): normalize cross-platform launcher paths #5821

Open
opened 2026-10-31 01:09:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3558
Author: @paulografica0-tech
Created: 10/14/2026
Status: 🔄 Open

Base: main ← Head: paulografica0-tech-hopper-path-normalization


📝 Commits (4)

  • 7cef103 fix(hopper): normalize cross-platform launcher paths
  • 86c927e fix(hopper): preserve POSIX path semantics
  • 0ab275e Merge remote-tracking branch 'origin/main' into sweep/3558
  • a718e5c Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

8 files changed (+58 additions, -15 deletions)

View changed files

📝 src/application/Doctor.ts (+5 -2)
📝 src/application/LinuxHopper.ts (+6 -2)
📝 src/application/MacHopper.ts (+2 -1)
📝 src/application/MacHopperPaths.test.ts (+16 -1)
📝 src/application/MacHopperPaths.ts (+9 -6)
➕ src/application/PosixPath.test.ts (+11 -0)
➕ src/application/PosixPath.ts (+4 -0)
📝 src/application/homebrew.ts (+5 -3)

📄 Description

Summary

Windows-hosted Hopper workflows could construct POSIX launcher and archive paths with backslashes, causing discovery and installation checks to miss valid paths. This change keeps Hopper's macOS/Linux path values portable when composed on Windows.

Problem and expected behavior

On Windows, node:path.join uses backslashes even when composing paths for macOS/Linux. The source tests reproduced this in Hopper doctor discovery, Linux package archive paths, and macOS installer launcher paths. Hopper candidate and package paths should use POSIX separators regardless of the host running the workflow.

Change and scope

Use POSIX path composition for Hopper logical paths in doctor discovery, Homebrew cask discovery, Linux installation and legacy launcher discovery, and macOS installer and bundle discovery. Native filesystem temp paths and filesystem operations remain host-native. Updated the filesystem-scan test to compare its expected logical path in POSIX form.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Application-level composition of Hopper filesystem and launcher paths.
  • Contribution scope fit and linked maintainer decision: Existing Hopper workflows; maintainer scope decision not applicable.
  • CLI and MCP/tool-catalog contract: None.
  • Provider, bridge, target-format, or platform compatibility: Fixes Windows-host path composition for existing macOS/Linux Hopper workflows; no change to provider behavior.
  • Evidence, artifact, provenance, or reconstruction contract: None.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): No change to target selection, authority, or cleanup.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): None.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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: Updated the renamed-bundle filesystem scan expectation to use POSIX logical-path composition; existing doctor, Linux Hopper, and macOS Hopper tests cover the other affected paths.
  • Base reproduction or other evidence: Before the fix, the Windows test run observed backslash paths for POSIX Hopper paths and doctor failed to discover the canonical user install.
  • User-visible CLI/MCP output (if applicable): N/A.
  • Remaining proof gaps: Real macOS and Linux hosts were not available; validation used unit tests on Windows.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm exec vitest run src/application/Doctor.test.ts src/application/LinuxHopper.test.ts src/application/MacHopper.test.ts src/application/MacHopperPaths.test.ts --reporter=dot — passed (4 files, 85 tests).
  • Pre-push hook: npm run check:fast — passed (typecheck and lint).

Compatibility, safety, and release

  • Breaking changes or migration steps: None.
  • Real Hopper/Ghidra, browser, or OS coverage: Real macOS/Linux Hopper workflows were not run; Windows unit coverage passed.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: No authority or external-effect changes; existing setup download/install behavior is unchanged.

Author readiness

Human owner:

  • 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/3558 **Author:** [@paulografica0-tech](https://github.com/paulografica0-tech) **Created:** 10/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `paulografica0-tech-hopper-path-normalization` --- ### 📝 Commits (4) - [`7cef103`](https://github.com/morluto/rea/commit/7cef1039d484358d4246093e145b970110c8a343) fix(hopper): normalize cross-platform launcher paths - [`86c927e`](https://github.com/morluto/rea/commit/86c927e41863b4c13b65850b5eedba24625db98b) fix(hopper): preserve POSIX path semantics - [`0ab275e`](https://github.com/morluto/rea/commit/0ab275e32cae9030d59989e696823d18d6afc5d1) Merge remote-tracking branch 'origin/main' into sweep/3558 - [`a718e5c`](https://github.com/morluto/rea/commit/a718e5c822f84873441bb131ff28e24f12a07735) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **8 files changed** (+58 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/application/Doctor.ts` (+5 -2) 📝 `src/application/LinuxHopper.ts` (+6 -2) 📝 `src/application/MacHopper.ts` (+2 -1) 📝 `src/application/MacHopperPaths.test.ts` (+16 -1) 📝 `src/application/MacHopperPaths.ts` (+9 -6) ➕ `src/application/PosixPath.test.ts` (+11 -0) ➕ `src/application/PosixPath.ts` (+4 -0) 📝 `src/application/homebrew.ts` (+5 -3) </details> ### 📄 Description ## Summary Windows-hosted Hopper workflows could construct POSIX launcher and archive paths with backslashes, causing discovery and installation checks to miss valid paths. This change keeps Hopper's macOS/Linux path values portable when composed on Windows. ## Problem and expected behavior On Windows, `node:path.join` uses backslashes even when composing paths for macOS/Linux. The source tests reproduced this in Hopper doctor discovery, Linux package archive paths, and macOS installer launcher paths. Hopper candidate and package paths should use POSIX separators regardless of the host running the workflow. ## Change and scope Use POSIX path composition for Hopper logical paths in doctor discovery, Homebrew cask discovery, Linux installation and legacy launcher discovery, and macOS installer and bundle discovery. Native filesystem temp paths and filesystem operations remain host-native. Updated the filesystem-scan test to compare its expected logical path in POSIX form. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). Unresolved scope, authority, side effects, or required verification block integration. Link the required maintainer scope decision for new providers or capabilities involving target execution, injection, mutation, or protection recovery; ordinary fixes within existing boundaries may state "not applicable". Draft PRs may leave the scope decision pending and the readiness and merge checklists unchecked. Maintainers can help resolve open questions. ## Contract and boundary impact - Semantic owner and earliest changed stage: Application-level composition of Hopper filesystem and launcher paths. - Contribution scope fit and linked maintainer decision: Existing Hopper workflows; maintainer scope decision not applicable. - CLI and MCP/tool-catalog contract: None. - Provider, bridge, target-format, or platform compatibility: Fixes Windows-host path composition for existing macOS/Linux Hopper workflows; no change to provider behavior. - Evidence, artifact, provenance, or reconstruction contract: None. - Target selection, authority, upstream behavior, and cleanup details (if applicable): No change to target selection, authority, or cleanup. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): None. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] 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: Updated the renamed-bundle filesystem scan expectation to use POSIX logical-path composition; existing doctor, Linux Hopper, and macOS Hopper tests cover the other affected paths. - Base reproduction or other evidence: Before the fix, the Windows test run observed backslash paths for POSIX Hopper paths and doctor failed to discover the canonical user install. - User-visible CLI/MCP output (if applicable): N/A. - Remaining proof gaps: Real macOS and Linux hosts were not available; validation used unit tests on Windows. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [ ] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm exec vitest run src/application/Doctor.test.ts src/application/LinuxHopper.test.ts src/application/MacHopper.test.ts src/application/MacHopperPaths.test.ts --reporter=dot` — passed (4 files, 85 tests). - Pre-push hook: `npm run check:fast` — passed (typecheck and lint). ## Compatibility, safety, and release - Breaking changes or migration steps: None. - Real Hopper/Ghidra, browser, or OS coverage: Real macOS/Linux Hopper workflows were not run; Windows unit coverage passed. - Package or release metadata impact: None. - Security, privacy, process, or containment review: No authority or external-effect changes; existing setup download/install behavior is unchanged. ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: <!-- @GitHub-handle --> - [ ] 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 <!-- Draft PRs may leave pending items unchecked. Resolve material scope and authority questions before integration. --> - [ ] 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>
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#5821
No description provided.