Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 19, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* fix: resolve Windows CLI spawn ENOENT error in Agent Manager

Replace shell command-based CLI detection with filesystem-based
executable resolution using PATHEXT environment variable.

* fix: address PR review comments

- Use error.code instead of error.message for EACCES detection
- Rename fileExistsAsFile to pathExistsAsFile
- Remove redundant isSymbolicLink check (stat follows symlinks)
- Add clarifying comment about symlink behavior

* chore: restore slackbot.md to match main

* fix: add missing getPlatformDiagnostics mock in AgentManagerProvider tests

* fix: use platform-appropriate paths in Windows tests

* fix: separate Windows simulation tests from native Windows tests

- Skip platform-switching tests when already on target platform
- Add dedicated native Windows tests that run only on Windows CI
- Add proper lstat mock to fs mocks (code uses both stat and lstat)
- Use proper error codes in mock rejections

* fix: remove platform simulation tests, keep only native platform tests

Platform simulation (mocking process.platform) is fragile and doesn't
truly test platform-specific behavior. Instead:
- Windows tests run only on Windows CI (skipped elsewhere)
- Non-Windows tests run only on non-Windows (skipped on Windows)
- Let actual CI environments test their native platform behavior

* fix: simplify tests by removing fragile Windows integration test

The Windows .cmd shell:true behavior is already tested in CliProcessHandler.
The PATHEXT resolution is tested in CliPathResolver.spec.ts.
Production code works on Windows (confirmed), so remove complex integration test.

* fix: skip Unix path tests on Windows

Unix-style paths like /usr/bin/kilocode are not absolute on Windows
(Windows requires drive letters like C:\). Skip these tests on Windows
since the Windows-specific behavior is already tested by the PATHEXT tests.

* fix: mock CliInstaller in tests to work on Windows

On Windows, login shell is skipped and findExecutable uses fs.promises.stat
instead of execSync. The tests were relying on execSync returning MOCK_CLI_PATH,
which doesn't work on Windows.

Fix: Mock getLocalCliPath() to return MOCK_CLI_PATH and make fileExistsAtPath
return true for that path. This ensures findKilocodeCli finds the CLI via the
local path check on all platforms.
@pull pull bot locked and limited conversation to collaborators Dec 19, 2025
@pull pull bot added the ⤵️ pull label Dec 19, 2025
@pull pull bot merged commit 52d42da into jasonkneen:main Dec 19, 2025
10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant