Area
apps/server
Steps to reproduce
- On Windows, with a real
claude CLI installed and authenticated.
- Check out unmodified
main at 41a430a8.
- Run
vp test run apps/server/src/textGeneration/ClaudeTextGeneration.test.ts.
Expected behavior
All 5 tests pass against the stub claude script the fixture writes into a temp bin directory. No network calls, and the run finishes in a couple of seconds.
Actual behavior
All 5 tests fail. The stub is never invoked — the real installed Claude CLI runs instead, so assertions compare fixture strings against live model output. The run takes ~134s because every case makes a real API request.
FAIL apps/server/src/textGeneration/ClaudeTextGeneration.test.ts
> falls back when Claude thread title normalization becomes whitespace-only
Expected: "New thread"
Received: "Name Coding Thread Conversation"
Test Files 1 failed (1)
Tests 5 failed (5)
Duration 134.28s
Depending on auth state the failures surface either as live model prose replacing the expected fixture (above), or as live 429 / Not logged in errors.
Cause
Two POSIX-only assumptions in the fixture:
-
PATH separator. ClaudeTextGeneration.test.ts:99 builds the search path with a literal ::
process.env.PATH = `${binDir}:${previousPath ?? ""}`;
Windows uses ;, so binDir never becomes its own PATH entry. path.delimiter would cover both.
-
Extension-less executable. :27 writes the stub as bin/claude with no extension, and :66 sets 0o755 via fs.chmod, which is a no-op on Windows. Windows resolves executables through PATHEXT, so an extension-less file is skipped even when its directory is on PATH. A claude.cmd shim on Windows would fix this half.
Both need fixing — either alone still leaves the real CLI being picked up.
Side effect
:292 creates .claude-work-test/ under process.cwd() and leaves it behind after the run, so the repo is dirty afterwards.
Impact
Minor bug or occasional failure
Scoped to Windows contributors running this one file, but worth flagging because it fails open rather than closed: instead of erroring on a missing stub, it silently calls the real API and consumes live quota.
Version or commit
main @ 41a430a
Environment
Windows 11, pnpm workspace, Claude Code 2.1.220 installed and authenticated.
Area
apps/server
Steps to reproduce
claudeCLI installed and authenticated.mainat41a430a8.vp test run apps/server/src/textGeneration/ClaudeTextGeneration.test.ts.Expected behavior
All 5 tests pass against the stub
claudescript the fixture writes into a tempbindirectory. No network calls, and the run finishes in a couple of seconds.Actual behavior
All 5 tests fail. The stub is never invoked — the real installed Claude CLI runs instead, so assertions compare fixture strings against live model output. The run takes ~134s because every case makes a real API request.
Depending on auth state the failures surface either as live model prose replacing the expected fixture (above), or as live
429/Not logged inerrors.Cause
Two POSIX-only assumptions in the fixture:
PATH separator.
ClaudeTextGeneration.test.ts:99builds the search path with a literal::Windows uses
;, sobinDirnever becomes its own PATH entry.path.delimiterwould cover both.Extension-less executable.
:27writes the stub asbin/claudewith no extension, and:66sets0o755viafs.chmod, which is a no-op on Windows. Windows resolves executables throughPATHEXT, so an extension-less file is skipped even when its directory is on PATH. Aclaude.cmdshim on Windows would fix this half.Both need fixing — either alone still leaves the real CLI being picked up.
Side effect
:292creates.claude-work-test/underprocess.cwd()and leaves it behind after the run, so the repo is dirty afterwards.Impact
Minor bug or occasional failure
Scoped to Windows contributors running this one file, but worth flagging because it fails open rather than closed: instead of erroring on a missing stub, it silently calls the real API and consumes live quota.
Version or commit
main @ 41a430a
Environment
Windows 11, pnpm workspace, Claude Code 2.1.220 installed and authenticated.