Skip to content

refactor(hopper): give the launcher the provider's host platform - #11166

Merged
morluto merged 1 commit into
refactor/host-platform-apktoolfrom
refactor/host-platform-hopper
Nov 15, 2026
Merged

morluto merged 1 commit into
refactor/host-platform-apktoolfrom
refactor/host-platform-hopper

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

W8 HostPlatform migration, src/hopper slice (stacked on #11164). HopperProvider already took the host platform (defaulting to process.platform), but the HopperApplicationLauncher it builds read process.platform again for its own macOS/Linux decisions. The provider now passes its platform to the launcher, the launcher resolves it once, and the defaults read HOST_PLATFORM.

Problem and expected behavior

src/hopper read process.platform in six places: four dependencies.platform ?? process.platform checks in BridgeLauncher, HopperProvider's constructor default, and HopperClient's session-root choice. With a provider platform injected (tests do "linux"), launch mode followed the provider while the launcher's checks followed the running host. Production behaviour is unchanged because both were the running host there.

Change and scope

  • HopperApplicationLauncher resolves dependencies.platform ?? HOST_PLATFORM.platform once in its constructor (#platform) and uses it for all four decisions.
  • HopperProvider passes { platform: this.platform } as the launcher's dependencies; its default is HOST_PLATFORM.platform.
  • HopperClient's private runtime root (/tmp on macOS for short socket paths) is a host filesystem choice and reads HOST_PLATFORM.platform.
  • Baseline: ambient-host-platform -6 (src/hopper now has none). No test stubs in this folder.
  • Not included: composition/binary.ts still constructs the provider without a platform (composition slice).

Contract and boundary impact

  • Semantic owner and earliest changed stage: HopperProvider owns the host for Hopper; the launcher receives it.
  • Contribution scope fit and linked maintainer decision: not applicable (internal refactor).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: unchanged on real hosts.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged; IDA/Hopper read-only rules untouched.
  • Generated metadata, package, or installation impact: none.

Evidence and regression coverage

  • Tests added or updated: none; existing provider tests that inject "linux" now also drive the launcher's Linux decisions and still pass.
  • Base reproduction or other evidence: source-derived.
  • User-visible CLI/MCP output (if applicable): none.
  • Remaining proof gaps: no real Hopper run; not run on Linux.

Validation performed

  • npm run test:focused -- src/hopper/*.test.ts (16 files) src/cliHostInputs.test.ts (macOS, Node 24.22.1) — 17 files passed; 216 passed, 1 skipped.
  • npm run test:focused -- tests/boundary/providers/hopper/{bridgeLauncher,bridgeBootstrapCleanup,hopperClient.helperFailure,hopperMacLaunchArguments,hopperRelativeLauncher,hopperFileOffsetClose}.test.ts — 6 files passed; 43 passed, 5 skipped.
  • node scripts/verify/architecture-guards.mjs — passed.
  • npm run check:fast — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none (macOS unit/boundary tests only).
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change to launch, ownership or cleanup.

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.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T13:33:15.073813Z
We couldn’t complete this review. Comment @codex review to try again.
350e42c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge, with no actionable issues found.

Summary

HopperProvider now passes its selected platform to HopperApplicationLauncher, which resolves it once for all four host checks.

  • Hopper launch choices now follow the provider's host platform.

Reviews (1) · Last reviewed commit: "refactor(hopper): give the launcher the ..." · Reviewed by Greptile

@morluto
morluto merged commit b7de809 into refactor/host-platform-apktool Nov 15, 2026
1 check passed
@morluto
morluto deleted the refactor/host-platform-hopper branch November 15, 2026 13:36
@morluto morluto added area: providers Provider and capability discovery, including provider proposal triage provider: hopper Analysis provider / engine: hopper labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Provider and capability discovery, including provider proposal triage provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant