Skip to content

test: run pnpm directly in the pnpm workspace state e2e steps - #839

Merged
wan9chi merged 3 commits into
mainfrom
claude/pnpm-direct-steps
Oct 12, 2026
Merged

wan9chi merged 3 commits into
mainfrom
claude/pnpm-direct-steps

Conversation

@wan9chi

@wan9chi wan9chi commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Motivation

The pnpm_workspace_state e2e test ran pnpm install and the dependency recheck through vt run --no-cache tasks rather than as plain steps, because running pnpm directly from the harness didn't work on Windows, for two reasons:

  • The harness spawns steps through portable-pty, whose PATH search on Windows checks the exact program name in each directory before trying PATHEXT extensions. pnpm's node_modules/.bin has an extensionless shell shim named pnpm next to pnpm.cmd, so the harness picked the shell script, which Windows can't execute.
  • The harness canonicalizes its temp directory, which gives verbatim (\\?\D:\...) paths on Windows. cmd.exe, which runs .cmd shims, rejects those as a working directory with "UNC paths are not supported".

Changes

  • The harness resolves step programs other than vt and vtt with which::which_in, the same way vp resolves task programs. On Windows, which skips files that aren't Windows binaries and tries the PATHEXT extensions, finding pnpm.cmd. On Unix it finds the same file as before.
  • Those programs start in the step's directory simplified with dunce::simplified, which drops the verbatim prefix when the path means the same without it. dunce is a new dev-dependency of vt_bin. vt and vtt keep the working directory they had before.
  • The fixture's install and recheck steps now run pnpm directly, and its pnpm-install task is removed.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +4.78%  [-16.20% .. +27.56%]  overhead   +64.80%
dynamic/access             change  -0.50%  [ -8.67% .. +13.74%]  overhead   +11.28%
dynamic/access-relative    change  -0.07%  [ -6.92% ..  +9.84%]  overhead   +44.69%
dynamic/access-contended   change  +2.11%  [ -9.71% .. +17.00%]  overhead    +9.69%
static/launch              change  -1.72%  [-22.09% .. +24.47%]  overhead  +186.57%
static/access              change  -6.54%  [-31.11% .. +10.60%]  overhead  +921.07%
static/access-relative     change  +0.52%  [-16.92% .. +20.26%]  overhead +1490.19%
static/access-contended    change  -2.16%  [-17.05% .. +18.49%]  overhead +2561.69%

macos

dynamic/launch             change  -0.40%  [ -5.83% ..  +4.47%]  overhead  +237.25%
dynamic/access             change  +0.36%  [-39.61% ..  +8.77%]  overhead    +3.54%
dynamic/access-relative    change  +0.20%  [ -3.54% ..  +3.49%]  overhead  +255.22%
dynamic/access-contended   change  -2.29%  [-87.41% ..  +9.00%]  overhead    +6.63%

windows

dynamic/launch             change  -0.40%  [ -2.87% ..  +2.92%]  overhead   +24.69%
dynamic/access             change  +0.00%  [ -0.78% ..  +0.59%]  overhead    +0.99%
dynamic/access-relative    change  +0.00%  [ -0.75% ..  +0.73%]  overhead    +0.97%
dynamic/access-contended   change  +0.00%  [ -0.73% ..  +0.72%]  overhead    +1.30%

@socket-security

socket-security Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​dunce@​1.0.510010093100100

View full report

wan9chi and others added 3 commits October 12, 2026 15:01
The install and recheck steps ran pnpm through `vt run --no-cache` tasks.
Running it directly failed on Windows: portable-pty's PATH search takes
an exact name before trying `PATHEXT` extensions, so it picked pnpm's
extensionless shell shim in `node_modules/.bin` over `pnpm.cmd`, which
Windows can't execute. The harness now resolves programs other than `vt`
and `vtt` with `which::which_in`, as `vp` resolves task programs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harness canonicalizes its temp directory, which gives verbatim
(`\\?\D:\...`) paths on Windows. `cmd.exe`, which runs npm-style `.cmd`
shims such as pnpm's, rejects those as a working directory, so the
direct `pnpm` steps failed with "UNC paths are not supported". Programs
other than `vt` and `vtt` now start in the same directory without the
verbatim prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`dunce::simplified` drops the verbatim prefix only when the path means
the same without it, for example not past the legacy `MAX_PATH` limit
or with reserved names, and is a no-op off Windows. It replaces the
hand-written prefix stripping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wan9chi
wan9chi force-pushed the claude/pnpm-direct-steps branch from 68855ec to 587b0ec Compare October 12, 2026 07:01
@wan9chi
wan9chi added this pull request to stack #842 October 12, 2026 07:06
@wan9chi
wan9chi merged commit 55d0cc1 into main Oct 12, 2026
20 checks passed
@wan9chi
wan9chi deleted the claude/pnpm-direct-steps branch October 12, 2026 07:24
wan9chi added a commit that referenced this pull request Oct 12, 2026
## Motivation

The `remote_cache` and `remote_cache_backend` e2e tests were skipped on
Windows because the e2e harness couldn't launch `remote-cache-server`, a
pnpm command shim in `vite-task-tools`. #839 makes the harness resolve
`.cmd` shims the way `vp` does and start them outside the verbatim temp
path, so these tests can run on Windows too.

## Changes

- Remove `cfg = "not(windows)"` from the `remote_cache` and
`remote_cache_backend` cases, along with the comments that explained the
skip.
- `remote-cache-server` starts its command with `cross-spawn` instead of
Node's `spawn`, which can't run pnpm's `.cmd` shims on Windows (`spawn
cbor-http ENOENT`). `cross-spawn` and `@types/cross-spawn` are added to
`vite-task-tools` through the catalog.
- `pending_uploads` and `hide_pending_uploads` stay skipped on Windows,
now for a different, documented reason. A milestone there is the console
title, and ConPTY sends only the latest title when it next renders. In
`pending_uploads`, the proxy's `stalled` milestone for the second upload
can replace `uploads-pending`. In `hide_pending_uploads`, nothing is
printed after it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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