Skip to content

chore: Remove obsolete native CLI uninstall polling - #1624

Merged
hatayama merged 2 commits into
v3-betafrom
refactor/hatayama/remove-legacy-uninstall-path-polling
Jul 8, 2026
Merged

hatayama merged 2 commits into
v3-betafrom
refactor/hatayama/remove-legacy-uninstall-path-polling

Conversation

@hatayama

@hatayama hatayama commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove legacy native CLI uninstall branches that became test-only after package-local launchers were retired.
  • Keep uninstall completion focused on waiting for the installed launcher to remove itself.

User Impact

Changes

  • Simplify WaitForUninstallCompletionAsync to wait only for the target executable to disappear.
  • Preserve the existing evaluation order: file check, success, cancellation, timeout, then delay.
  • Preserve the production timeout message byte-for-byte.
  • Delete the test-only standalone waiter, false-gated User PATH branch, timeout message variants, and their four obsolete tests.
  • Delete the now-unreferenced User PATH resolver chain.
  • Retain timeout and success coverage as two focused uninstall completion tests, along with the 30-second deferred Windows cleanup contract.

Verification

  • Ran the C# dead-code scanner before deletion; it reported no keep reason or external public candidate for the removed chain.
  • Confirmed by repository-wide search that the removed methods and User PATH branch had no remaining production or non-C# callers.
  • Verified commit 93b0176a / PR fix: Unity package no longer includes development CLI binaries #1250 intentionally changed production to requireUserPathRemoval: false when package-local development launchers were removed.
  • dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)" (0 errors, 0 warnings)
  • NativeCliInstallerTests (29 passed)
  • The target-timeout test preserves the existing 250 ms / 100 ms polling contract by asserting exactly three delay slices.
  • StaticFacadeStateGuardTests (20 passed)
  • No wire format, protocol version, or release input changes.

Delete the test-only uninstall branches left behind after package-local CLI
launchers were removed. Keep production waiting focused on installed launcher
self-removal while preserving cancellation order, timeout timing, and error
text.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes Windows user PATH containment checks from the native CLI uninstall flow. NativeCliUninstallCompletionWaiter.WaitForUninstallCompletionAsync now only polls for target executable removal, NativeCliInstallPathResolver drops its PATH-matching helpers, NativeCliInstaller updates its call site, and tests are replaced accordingly.

Changes

Uninstall Completion Simplification

Layer / File(s) Summary
Remove PATH containment helpers
Packages/src/Editor/Infrastructure/CLI/NativeCliInstallPathResolver.cs
Removed DoesUserPathContainInstallDirectory and its private DoesPathContainInstallDirectory matcher.
Simplify waiter to target-only polling
Packages/src/Editor/Infrastructure/CLI/NativeCliUninstallCompletionWaiter.cs
WaitForUninstallCompletionAsync signature reduced, polling loop now only checks fileExists(targetPath), and timeout message simplified.
Update caller and tests
Packages/src/Editor/Infrastructure/CLI/NativeCliInstaller.cs, Assets/Tests/Editor/NativeCliInstallerTests.cs
UninstallAsync call site drops extra arguments; tests replaced with two target-presence-based WaitForUninstallCompletionAsync tests.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#1154: Both PRs modify the uninstall wait/cleanup flow in NativeCliInstaller/NativeCliUninstallCompletionWaiter and related tests around target-removal waiting.
  • hatayama/unity-cli-loop#1169: Both PRs touch WaitForUninstallCompletionAsync and Windows user PATH cleanup logic, with this PR removing what the earlier PR added.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: removing obsolete native CLI uninstall polling.
Description check ✅ Passed The description is directly aligned with the code changes and explains the uninstall polling simplification.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/hatayama/remove-legacy-uninstall-path-polling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

You’re at about 91% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Re-trigger cubic

Assert the existing timeout and poll interval still produce three delay slices after removing the duplicate legacy waiter tests.
@hatayama
hatayama merged commit 829e84f into v3-beta Jul 8, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/hatayama/remove-legacy-uninstall-path-polling branch July 8, 2026 15:48
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant