You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reorganizes core/host and core/auth modules and moves remaining common command files while updating all corresponding import paths, mock module paths, and documentation references.
✅ 3 resolved✅ Bug: Stale mock.module path breaks isWindows mocking in update test
📄 tests/unit/commands/update/update-version.test.ts:59📄 tests/unit/commands/update/update-version.test.ts:61
The import at line 59 was updated to @/core/host/environment/platform-detector.ts, but the mock.module(...) call at line 61 still targets the old @/core/host/platform-detector.js path, which no longer exists after this PR moved the file. Because the mocked specifier no longer resolves to the module actually imported by update-check.ts, the isWindowsMock override no longer takes effect — tests that call isWindowsMock.mockReturnValue(true) to exercise the Windows branch will silently fall through to the real isWindows() (false on Linux CI), giving false confidence or failing. Update the mock.module path to @/core/host/environment/platform-detector.ts to match the import (see the correctly-updated tool-detector.test.ts).
✅ Quality: CLAUDE.md/AGENTS.md still reference moved commands/_common paths
📄 CLAUDE.md
This PR moved sonar-command.ts out of src/commands/_common/ (into src/commands/) and agent-prompt-hint.ts into src/core/ui/components/, and CLAUDE.md was partially updated (signatures path) — but CLAUDE.md and AGENTS.md still instruct declaring commands using src/commands/_common/sonar-command.ts, and stale comments reference src/commands/_common/*. The project's documentation requirement is to update CLAUDE.md/AGENTS.md when moving files. Update these references to the new paths to avoid pointing contributors at nonexistent files.
✅ Bug: Stale mock.module path in secrets-install.test.ts
📄 tests/unit/commands/analyze/secrets-install.test.ts:41-44
Line 41 imports the real module from the new path @/core/host/install/sonarsource-releases.ts, but line 42 still registers mock.module() against the OLD path @/core/host/sonarsource-releases.ts, which no longer exists after this move. The intent (make the module a mutable object so spyOn can patch downloadBinary/verifyBinarySignature per test) no longer applies to the module actually consumed by install/secrets.ts, so the per-test spies won't intercept the real code path (or spyOn will fail on the frozen ES namespace). Update the mock.module argument to @/core/host/install/sonarsource-releases.ts to match the import.
Options
Auto-apply is off → Gitar will not commit updates to this branch. Display: compact → Showing less information.
Comment with these commands to change the behavior for this request:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Gitar
core/hostandcore/authmodulesThis will update automatically on new commits.