chore: Simplify native CLI setup internals

Merged
HA
3mo ago
+269-230

Summary

  • Keep native CLI setup behavior unchanged while separating process execution from setup orchestration.
  • Reduce the installer facade to orchestration and current-process environment updates.

User Impact

  • Native CLI install, uninstall, timeout, cancellation, and error-reporting behavior remain unchanged.
  • This internal separation makes future setup maintenance easier to review without changing the wire protocol or release inputs.

Changes

  • Move install and uninstall process execution into NativeCliSetupCommandRunner.
  • Route production callers and the three existing command-execution tests directly through the extracted owner.
  • Move INSTALL_PROCESS_WAIT_SLICE_MS with the execution logic; its private to internal visibility change is required by the uninstall completion caller.
  • Remove the now-unused System.Diagnostics and System.Text imports from NativeCliInstaller.
  • Preserve the existing process-race exception handling and out bool canceled contract as-is.

Verification

  • dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)" (0 errors, 0 warnings)
  • NativeCliInstallerTests (33 passed)
  • StaticFacadeStateGuardTests (20 passed)
  • Mechanically compared the moved method bodies before and after extraction after normalizing the required constant visibility change; no logic, string, or branch changes were found.
  • Confirmed that the runner has no reverse dependency on the installer, command builder, or uninstall completion waiter.