Skip to content

Fix Windows CI: skip POSIX shell-stub Claude parallel tests#49

Merged
NagyVikt merged 1 commit into
mainfrom
fix/windows-ci-skip-posix-claude-stub
Jun 30, 2026
Merged

Fix Windows CI: skip POSIX shell-stub Claude parallel tests#49
NagyVikt merged 1 commit into
mainfrom
fix/windows-ci-skip-posix-claude-stub

Conversation

@NagyVikt

Copy link
Copy Markdown
Collaborator

Problem

CI / test (windows-latest, node-{18,20,22}) fails on 4 subtests in json-parity.test.ts:

  • parallel --login can reject duplicate Claude accounts
  • parallel --run isolates live Claude sessions and syncs changed login credentials
  • parallel --run preserves session auth when sync lock is busy
  • parallel --run preserves session auth when another session already changed the profile

All fail with `claude` (CLI) was not found in PATH.

Root cause

These tests install a fake claude on PATH as a #!/bin/sh script (chmod 0o755) and rely on the CLI spawning it. On Windows that stub is unreachable:

  • commandExists() only resolves PATHEXT extensions (.EXE/.CMD/.BAT/.COM), so the extensionless claude stub is invisible.
  • chmod is a no-op on Windows.
  • cmd cannot execute a POSIX shell script.

The parallel feature itself ships #!/bin/sh / fish wrappers and is POSIX-only.

Fix

Guard the 4 stub-driven cases with node:test { skip } on win32. No production behavior change; Linux/macOS still run all cases (verified locally: 19 pass, 0 skipped).

🤖 Generated with Claude Code

The four `parallel --login`/`--run` tests install a fake `claude` on PATH
as a `#!/bin/sh` script and rely on the CLI spawning it. On windows-latest
those cases fail: `commandExists` only resolves PATHEXT extensions
(.EXE/.CMD/.BAT/.COM), so the extensionless stub is invisible; `chmod` is a
no-op; and cmd cannot execute a POSIX shell script. The parallel feature
ships sh/fish wrappers and is POSIX-only, so guard these stub-driven cases
with `{ skip }` on win32. No production behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@NagyVikt NagyVikt merged commit 24e8c81 into main Jun 30, 2026
12 checks passed
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