Skip to content

fix: Setup recognizes existing npm CLI installs#1131

Merged
hatayama merged 6 commits into
v3-betafrom
feature/hatayama/fix-npm-cli-detection
May 15, 2026
Merged

fix: Setup recognizes existing npm CLI installs#1131
hatayama merged 6 commits into
v3-betafrom
feature/hatayama/fix-npm-cli-detection

Conversation

@hatayama
Copy link
Copy Markdown
Owner

@hatayama hatayama commented May 15, 2026

Summary

  • Setup now recognizes an existing npm-installed uloop CLI instead of showing it as missing.
  • Older CLI versions are surfaced as update candidates, so new projects can guide users to upgrade accurately.

User Impact

  • Before this change, Unity projects launched from a GUI environment could show "Not installed" even when the user's terminal already had uloop-cli 2.1.x installed.
  • After this change, Setup runs CLI version detection through the user's login shell, matching the terminal environment where npm shims and node are available.

Changes

  • Resolve the user's login shell when Unity does not inherit SHELL.
  • Run shell command discovery and uloop -v in the same login shell for macOS/Linux CLI detection.
  • Treat version output as the installed-state signal while keeping the executable path as optional UI context.

Verification

  • go run ./cmd/uloop --project-path /Users/a12115/ghq/hatayama/unity-cli-loop-fix-npm-cli-detection compile
  • go run ./cmd/uloop --project-path /Users/a12115/ghq/hatayama/unity-cli-loop-fix-npm-cli-detection run-tests --test-mode EditMode --filter-type regex --filter-value '.(CliInstallationDetectorTests|NodeEnvironmentResolverTests).'
  • Verified in Unity dynamic code that SHELL=null still returns Installed=True, Version=2.1.1, and Path=/Users/a12115/.npm-global/bin/uloop

Review Change Stack

Summary

  • Setup now recognizes an existing npm-installed uloop CLI by running the user’s login shell (macOS/Linux) and using the CLI's version output as the installed-state signal; the executable path remains optional UI context.
  • Older CLI versions discovered via the shell are surfaced as update candidates so new projects can advise upgrades.
  • Detection resolves the login shell even when Unity does not inherit SHELL (including a macOS dscl lookup fallback) and executes discovery and uloop -v within the same login shell environment.

User impact

  • Fixes cases where Unity launched from a GUI incorrectly showed "Not installed" despite uloop-cli being available in the user’s terminal (e.g., npm global shims and terminal node).
  • After this change, Setup reports Installed/Version/Path consistent with the terminal environment.

Key changes

  • NodeEnvironmentResolver
    • Added macOS Directory Service (dscl) lookup to derive UserShell when $SHELL is missing/invalid.
    • New helpers: SelectUserShell and ExtractDirectoryServiceUserShell; GetUserShell now uses dscl fallback instead of unconditionally returning /bin/sh.
  • CliInstallationDetector
    • Introduces login-shell detection on non-Windows platforms: builds a quoted login-shell command that emits start/end markers and runs it with stdout/stderr capture, a 5s timeout, and guarded process-kill behavior on cancellation/timeouts.
    • Parses marker-delimited stdout to extract an optional executable path and the CLI version; selection logic now prefers shell detection when the shell-reported version is present even if the path is absent.
    • Added a short version flag constant and uses -v for shell commands.
    • Refactored process-kill handling to tolerate races where the child has already exited.
  • SetupWizardWindow
    • Added internal helpers to centralize skills-target UI visibility logic and updated UpdateSkillsStep to use them.
  • Package removal handling
    • New UnityCliLoopPackageRemovalSettingsResetter resets only setup-wizard related settings when the package is removed; wired into InfrastructureEditorStartup so removal clears wizard auto-show state while preserving other preferences.
  • Constants
    • Added CliConstants.SHORT_VERSION_FLAG = "-v".
    • Added UnityCliLoopConstants.PACKAGE_NAME = "io.github.hatayama.uloopmcp".

Tests

  • Extensive new/updated NUnit tests:
    • CliInstallationDetectorTests: selection when shell version exists without path, short -v usage, parsing shell output (path+version and version-only), and guarded process-kill race test.
    • NodeEnvironmentResolverTests: dscl parsing and SelectUserShell behavior (env shell vs directory service vs deterministic POSIX fallback).
    • SetupWizardWindowTests: skills-target row/list visibility under first-time/setup conditions.
    • UnityCliLoopPackageRemovalSettingsResetterTests: package-name match, ShouldResetSetupWizardState behavior, and ResetSetupWizardState/ResetSetupWizardStateIfPackageRemoved persistence semantics.
    • General test hygiene: setup/teardown for editor settings file manipulation.

Verification

  • Provided go run/test runs demonstrating scenario where SHELL=null returns Installed=True, Version=2.1.1, Path=/Users/a12115/.npm-global/bin/uloop (shell-based detection succeeds even when Unity's environment lacked SHELL).

Files touched (high level)

  • Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs (+ tests)
  • Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs (+ tests)
  • Packages/src/Editor/Domain/CliConstants.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs (+ tests)
  • Packages/src/Editor/Settings/UnityCliLoopPackageRemovalSettingsResetter.cs (+ tests)
  • Packages/src/Editor/ToolContracts/UnityCliLoopConstants.cs
  • Assets/Tests/Editor/* (multiple new/updated tests)
  • InfrastructureEditorStartup wiring updated to register the package-removal resetter.

Review notes / risk

  • Subprocess invocation, shell-quoting, dscl invocation, and timeout/kill logic are platform-sensitive; review escaping, deterministic behavior across shells, cancellation/timeout handling, and macOS dscl invocation safety (username validation already added).
  • Ensure the short -v flag is appropriate across supported CLI versions and platforms.
  • Tests increase coverage for edge cases but review runtime impacts in editor contexts (timeouts, blocking behavior).

Review Change Stack

Review Change Stack

hatayama added 2 commits May 15, 2026 16:36
Use the macOS directory service shell when GUI-launched Unity does not inherit SHELL, so npm-installed legacy uloop commands remain visible as update candidates instead of looking absent.

Add focused coverage for shell selection and directory service output parsing.
Execute command discovery and `uloop -v` in the same login shell so npm shims resolve node exactly as they do from the user's terminal.

Keep path data as optional UI context, but treat version output as the installed-state signal.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@hatayama has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 4 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: daff0fda-9d15-4292-9cf0-e2bd738506bd

📥 Commits

Reviewing files that changed from the base of the PR and between cb1257d and e5dc873.

📒 Files selected for processing (2)
  • Assets/Tests/Editor/CliInstallationDetectorTests.cs
  • Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
📝 Walkthrough

Walkthrough

Adds login-shell CLI detection on non-Windows using marker-delimited stdout parsing and short "-v" version flag; improves user-shell selection with macOS dscl lookup and safety checks; centralizes setup-wizard skills-target visibility logic; and implements package-removal settings reset with tests.

Changes

Shell-Based CLI Detection and Resolution

Layer / File(s) Summary
User shell resolution via Directory Service
Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs, Assets/Tests/Editor/NodeEnvironmentResolverTests.cs
Adds dscl-based lookup and parsing for UserShell, username safety checks, SelectUserShell(...) validation, and tests for extraction, precedence, and POSIX fallback.
Shell-based CLI detection and output parsing
Packages/src/Editor/Domain/CliConstants.cs, Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs, Assets/Tests/Editor/CliInstallationDetectorTests.cs
Adds SHORT_VERSION_FLAG ("-v") and marker constants, builds quoted login-shell detection commands, executes shell subprocesses with timeout/cancellation, parses marker-delimited stdout into executable path and version (including first non-empty version line), updates SelectPreferredDetection to consider shell-reported version, and adds tests for command construction, parsing, selection, and process-kill race handling.

Setup Wizard Skills UI

Layer / File(s) Summary
Skills visibility helpers and integration
Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs, Assets/Tests/Editor/SetupWizardWindowTests.cs
Adds ShouldShowSkillsTargetRowForSetupWizard and ShouldShowSkillsTargetListForSetupWizard, refactors UpdateSkillsStep to use them, adjusts early-return/toggle enablement, and adds tests for visibility permutations.

Package-Removal Settings Reset

Layer / File(s) Summary
Resetter, startup registration, constant, and tests
Packages/src/Editor/Infrastructure/Settings/UnityCliLoopPackageRemovalSettingsResetter.cs, Packages/src/Editor/Infrastructure/InfrastructureEditorStartup.cs, Packages/src/Editor/ToolContracts/UnityCliLoopConstants.cs, Assets/Tests/Editor/UnityCliLoopPackageRemovalSettingsResetterTests.cs
Adds UnityCliLoopPackageRemovalSettingsResetter (detection and reset logic), registers it during infrastructure startup, exports PACKAGE_NAME, and adds tests verifying package-match detection and that only setup-wizard fields are cleared and persisted.

Sequence Diagram(s)

sequenceDiagram
  participant Detector as CliInstallationDetector
  participant Shell as Login Shell
  participant Process as Subprocess
  participant Parser as Output Parser

  Detector->>Detector: BuildShellCliDetectionCommand() (uses SHORT_VERSION_FLAG)
  Detector->>Process: ExecuteShellCommandBlocking(shell, command, timeout)
  Process->>Shell: launch login shell -c "command -v <cmd> && <cmd> -v"
  Shell->>Process: Emit path and version between markers
  Process-->>Detector: stdout (trimmed)
  Detector->>Parser: ParseShellCliInstallationOutput(stdout)
  Parser-->>Detector: CliInstallationDetection{ExecutablePath?, Version?}
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Setup recognizes existing npm CLI installs' directly aligns with the main change: enabling detection of npm-installed CLI through the user's login shell and reporting it as installed instead of missing.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hatayama/fix-npm-cli-detection

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs (2)

184-184: 💤 Low value

Duplicate /bin/sh literal across modules.

POSIX_FALLBACK_SHELL_PATH here duplicates CliConstants.POSIX_SHELL_EXECUTABLE_PATH in the Domain layer. Consider consolidating to a single source of truth so future changes to the fallback shell only need to land in one place. Skip if you want to keep Infrastructure free of Domain references.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs` at line
184, The constant POSIX_FALLBACK_SHELL_PATH in NodeEnvironmentResolver
duplicates CliConstants.POSIX_SHELL_EXECUTABLE_PATH from the Domain layer;
replace the literal with a single shared symbol by referencing
CliConstants.POSIX_SHELL_EXECUTABLE_PATH (or, if you must avoid a Domain
dependency, add a single shared constant in a common utilities library and use
that from NodeEnvironmentResolver and the Domain class) so the fallback shell
path is defined in one place only.

287-308: 💤 Low value

Consider handling multi-line dscl output format in ExtractDirectoryServiceUserShell.

The dscl command switches to multi-line output format when attribute values contain spaces, emitting the attribute key on one line followed by the value indented on the next. The current parser only matches the single-line UserShell: <value> format, so multi-line responses would return null and fall back to /bin/sh. While UserShell paths are typically simple and single-line (e.g., /bin/zsh), supporting both formats is straightforward—check whether the trimmed line equals the prefix alone, then look ahead to the next line for the value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs` around
lines 287 - 308, ExtractDirectoryServiceUserShell currently only handles
single-line "UserShell: <value>" outputs and misses the multi-line dscl format
where a line may equal DIRECTORY_SERVICE_USER_SHELL_PREFIX alone and the next
indented line contains the value; update ExtractDirectoryServiceUserShell to,
when a trimmed line exactly equals DIRECTORY_SERVICE_USER_SHELL_PREFIX, peek at
the next raw line (if any), trim it and treat that as the shell value (falling
back to existing empty-check behavior), otherwise keep the existing substring
logic for same-line matches; reference DIRECTORY_SERVICE_USER_SHELL_PREFIX and
the ExtractDirectoryServiceUserShell method when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs`:
- Around line 197-236: The ExecuteAndGetOutput method has two unguarded
Process.Kill() calls that can throw if the process already exited; update the
cancellation registration callback and the timeout Kill to mirror
DetectCliInstallationAtExecutablePath by wrapping process.Kill() in a try/catch
that swallows System.InvalidOperationException (or the specific exception thrown
on already-exited processes) and leaves other exceptions unchanged, i.e., change
the ct.Register(() => process.Kill()) callback to a try { process.Kill(); }
catch (InvalidOperationException) { } and similarly wrap the bare process.Kill()
after WaitForExit(PROCESS_TIMEOUT_MS) in the same try/catch to prevent the
TOCTOU race from crashing ExecuteAndGetOutput.

---

Nitpick comments:
In `@Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs`:
- Line 184: The constant POSIX_FALLBACK_SHELL_PATH in NodeEnvironmentResolver
duplicates CliConstants.POSIX_SHELL_EXECUTABLE_PATH from the Domain layer;
replace the literal with a single shared symbol by referencing
CliConstants.POSIX_SHELL_EXECUTABLE_PATH (or, if you must avoid a Domain
dependency, add a single shared constant in a common utilities library and use
that from NodeEnvironmentResolver and the Domain class) so the fallback shell
path is defined in one place only.
- Around line 287-308: ExtractDirectoryServiceUserShell currently only handles
single-line "UserShell: <value>" outputs and misses the multi-line dscl format
where a line may equal DIRECTORY_SERVICE_USER_SHELL_PREFIX alone and the next
indented line contains the value; update ExtractDirectoryServiceUserShell to,
when a trimmed line exactly equals DIRECTORY_SERVICE_USER_SHELL_PREFIX, peek at
the next raw line (if any), trim it and treat that as the shell value (falling
back to existing empty-check behavior), otherwise keep the existing substring
logic for same-line matches; reference DIRECTORY_SERVICE_USER_SHELL_PREFIX and
the ExtractDirectoryServiceUserShell method when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 777c6346-7dbc-4234-9d2b-c2c86edf8d35

📥 Commits

Reviewing files that changed from the base of the PR and between 141e888 and 432ea3a.

📒 Files selected for processing (5)
  • Assets/Tests/Editor/CliInstallationDetectorTests.cs
  • Assets/Tests/Editor/NodeEnvironmentResolverTests.cs
  • Packages/src/Editor/Domain/CliConstants.cs
  • Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
  • Packages/src/Editor/Infrastructure/Utils/NodeEnvironmentResolver.cs

Comment thread Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs">

<violation number="1" location="Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs:229">
P2: Wrap timeout `process.Kill()` with `InvalidOperationException` handling to avoid race-condition crashes when the process exits just before kill.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs Outdated
The setup wizard should let first-time users choose a skill target before the CLI is installed. Split the target-row visibility from CLI skill management so the dropdown remains visible while status rows still wait for CLI inspection.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Assets/Tests/Editor/SetupWizardWindowTests.cs (1)

338-358: ⚡ Quick win

Consider adding test cases for shouldUseFirstInstallSkillsUi = true.

The test coverage for ShouldShowSkillsTargetListForSetupWizard is incomplete. The current tests verify behavior when shouldUseFirstInstallSkillsUi = false, but miss the cases when it's true. Given the implementation logic (canManageSkills && !shouldUseFirstInstallSkillsUi), both missing combinations should return false:

  • canManageSkills = false, shouldUseFirstInstallSkillsUi = truefalse
  • canManageSkills = true, shouldUseFirstInstallSkillsUi = truefalse

Adding these cases ensures complete coverage of the helper's truth table.

📋 Suggested test cases
+        [Test]
+        public void ShouldShowSkillsTargetList_WhenFirstInstallAndCliMissing_ReturnsFalse()
+        {
+            // Verifies that first-time setup hides the multi-target list even when CLI is missing.
+            bool shouldShow = SetupWizardWindow.ShouldShowSkillsTargetListForSetupWizard(
+                canManageSkills: false,
+                shouldUseFirstInstallSkillsUi: true);
+
+            Assert.That(shouldShow, Is.False);
+        }
+
+        [Test]
+        public void ShouldShowSkillsTargetList_WhenFirstInstallAndCliInstalled_ReturnsFalse()
+        {
+            // Verifies that first-time setup uses the compact target row instead of the multi-target list.
+            bool shouldShow = SetupWizardWindow.ShouldShowSkillsTargetListForSetupWizard(
+                canManageSkills: true,
+                shouldUseFirstInstallSkillsUi: true);
+
+            Assert.That(shouldShow, Is.False);
+        }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Tests/Editor/SetupWizardWindowTests.cs` around lines 338 - 358, Add
two unit tests for SetupWizardWindow.ShouldShowSkillsTargetListForSetupWizard
covering the missing cases where shouldUseFirstInstallSkillsUi is true: one with
canManageSkills = false and one with canManageSkills = true; both should assert
the result is false. Place them alongside the existing tests in
SetupWizardWindowTests (e.g., names like
ShouldHideSkillsTargetList_WhenFirstInstallAndCliMissing_ReturnsFalse and
ShouldHideSkillsTargetList_WhenFirstInstallAndCliInstalled_ReturnsFalse) to
complete the truth-table coverage for that helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@Assets/Tests/Editor/SetupWizardWindowTests.cs`:
- Around line 338-358: Add two unit tests for
SetupWizardWindow.ShouldShowSkillsTargetListForSetupWizard covering the missing
cases where shouldUseFirstInstallSkillsUi is true: one with canManageSkills =
false and one with canManageSkills = true; both should assert the result is
false. Place them alongside the existing tests in SetupWizardWindowTests (e.g.,
names like ShouldHideSkillsTargetList_WhenFirstInstallAndCliMissing_ReturnsFalse
and ShouldHideSkillsTargetList_WhenFirstInstallAndCliInstalled_ReturnsFalse) to
complete the truth-table coverage for that helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cc20aa34-c0b1-445d-80cb-b6c583226fca

📥 Commits

Reviewing files that changed from the base of the PR and between 432ea3a and d7ac715.

📒 Files selected for processing (2)
  • Assets/Tests/Editor/SetupWizardWindowTests.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs

hatayama added 2 commits May 15, 2026 19:34
When users remove and reinstall the Unity package, the persisted setup wizard version could prevent first-install setup from appearing again. Subscribe to package removal events and clear only wizard auto-show state while keeping other editor preferences intact.
The shell CLI detection path could kill a process after it had already exited during cancellation or timeout handling. Reuse a guarded process kill helper so only the already-exited race is ignored while preserving the detection flow.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Assets/Tests/Editor/CliInstallationDetectorTests.cs`:
- Around line 160-164: The test in CliInstallationDetectorTests constructs a
ProcessStartInfo that hardcodes "/bin/sh", which breaks on Windows; update the
test to select the command by platform (use
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) to detect Windows) and set
ProcessStartInfo.FileName to "cmd.exe" with Arguments "/c exit 0" on Windows,
otherwise use "/bin/sh" with Arguments "-c \"exit 0\""; keep UseShellExecute =
false and other existing settings so the race test behavior is unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e3e978cb-8f16-43fc-b1ca-51aca8229dd8

📥 Commits

Reviewing files that changed from the base of the PR and between d7ac715 and cb1257d.

⛔ Files ignored due to path filters (2)
  • Assets/Tests/Editor/UnityCliLoopPackageRemovalSettingsResetterTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/Settings/UnityCliLoopPackageRemovalSettingsResetter.cs.meta is excluded by none and included by none
📒 Files selected for processing (6)
  • Assets/Tests/Editor/CliInstallationDetectorTests.cs
  • Assets/Tests/Editor/UnityCliLoopPackageRemovalSettingsResetterTests.cs
  • Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
  • Packages/src/Editor/Infrastructure/InfrastructureEditorStartup.cs
  • Packages/src/Editor/Infrastructure/Settings/UnityCliLoopPackageRemovalSettingsResetter.cs
  • Packages/src/Editor/ToolContracts/UnityCliLoopConstants.cs

Comment thread Assets/Tests/Editor/CliInstallationDetectorTests.cs Outdated
Record the shell-resolved uloop -v exit status before parsing stdout so a broken PATH command cannot be treated as an installed version. Also make the process cleanup race test choose a platform-specific immediate-exit command for Windows Editor runs.
@hatayama hatayama merged commit 7fbb0d8 into v3-beta May 15, 2026
7 checks passed
@hatayama hatayama deleted the feature/hatayama/fix-npm-cli-detection branch May 15, 2026 12:20
@github-actions github-actions Bot mentioned this pull request May 15, 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