Repository navigation
fix: make local:gate pass on Windows, verified by a new Windows CI job (#2748) - #2906
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The npm and container publication jobs do not depend on the new Windows job, allowing releases to proceed even when Windows checks fail.
1 open issue
What changed in this PR
This PR addresses #2748 by fixing Windows-specific failures in Inspector’s local quality gate and adding Windows CI coverage for the three affected stages.
Changes:
- Adds portable script entry-point detection and preserves empty Windows shell arguments.
- Adapts test fixtures and assertions for Windows, with documented skips for POSIX-only cases.
- Adds a Windows CI job and documents platform-specific coverage enforcement.
| File | Description |
|---|---|
scripts/verify-dep-lockstep.main.test.mjs |
Resolves fixture paths using native realpath. |
scripts/skill-eval.test.mjs |
Makes argument and PATH assertions platform-aware. |
scripts/sdk-watch.mjs |
Uses the portable entry guard. |
scripts/release-tag.mjs |
Uses the portable entry guard. |
scripts/release-notes.mjs |
Uses the portable entry guard. |
scripts/pr-upload-screenshot.mjs |
Uses the portable entry guard. |
scripts/pr-review-wait.mjs |
Uses the portable entry guard. |
scripts/pr-review-request.mjs |
Uses the portable entry guard. |
scripts/pr-review-fetch.mjs |
Uses the portable entry guard. |
scripts/pr-link-issue.mjs |
Uses the portable entry guard. |
scripts/lib/win-shell-args.test.mjs |
Tests preservation of empty arguments. |
scripts/lib/win-shell-args.mjs |
Quotes empty Windows shell arguments. |
scripts/lib/main-module.test.mjs |
Tests entry detection across platform path formats. |
scripts/lib/main-module.mjs |
Adds shared URL-based entry detection. |
scripts/install-clients.test.mjs |
Aligns the npm probe environment with the test. |
scripts/gate-lease.test.mjs |
Adapts failure assertions and skips POSIX signal cases. |
scripts/dependency-refresh.mjs |
Uses the portable entry guard. |
scripts/dependabot-alerts.mjs |
Uses the portable entry guard. |
scripts/dco-check.mjs |
Uses the portable entry guard. |
scripts/board-sweep.mjs |
Uses the portable entry guard. |
scripts/board-snapshot.test.mjs |
Limits permission-bit assertions to POSIX. |
scripts/board-snapshot.mjs |
Uses the portable entry guard. |
scripts/board-recover.test.mjs |
Limits permission-bit assertions to POSIX. |
scripts/board-recover.mjs |
Uses the portable entry guard. |
scripts/board-draft-find.mjs |
Uses the portable entry guard. |
scripts/board-card-status.mjs |
Uses the portable entry guard. |
scripts/board-card-delete.mjs |
Uses the portable entry guard. |
scripts/board-card-add.mjs |
Uses the portable entry guard. |
scripts/board-audit.mjs |
Uses the portable entry guard. |
scripts/advisory-fork.mjs |
Uses the portable entry guard. |
scripts/action-pin-resolve.mjs |
Uses the portable entry guard. |
docs/quality-gate.md |
Documents Windows CI coverage, skips, and timeout. |
clients/web/src/test/integration/storage/oauth-secret-split.test.ts |
Skips chmod-dependent rollback cases on Windows. |
clients/web/src/test/integration/mcp/remote/servers-route.test.ts |
Skips chmod-dependent disk-failure cases on Windows. |
clients/web/src/test/integration/auth/node/secret-store-selection.test.ts |
Skips POSIX-dependent mount and descriptor cases. |
clients/web/src/test/integration/auth/node/file-secret-store.test.ts |
Uses directory blockers and skips POSIX mode assertions. |
clients/web/src/test/core/client/node-persistence.test.ts |
Skips chmod-dependent rollback cases on Windows. |
clients/mcpdo/vitest.config.ts |
Disables coverage thresholds on Windows only. |
clients/mcpdo/__tests__/skills-budget-hint.test.ts |
Skips daemon-dependent tests on Windows. |
clients/mcpdo/__tests__/resolve-command.test.ts |
Skips POSIX executable-resolution cases on Windows. |
clients/mcpdo/__tests__/rate-limit-envelope.test.ts |
Skips daemon-dependent tests on Windows. |
clients/mcpdo/__tests__/mcp-elicitation.test.ts |
Skips daemon-dependent elicitation tests on Windows. |
clients/mcpdo/__tests__/mcp-coverage.test.ts |
Adjusts skips, teardown state, and escaped-path assertions. |
clients/mcpdo/__tests__/mcp-connection.test.ts |
Skips daemon-dependent connection tests on Windows. |
clients/mcpdo/__tests__/load.test.ts |
Skips the daemon-backed load suite on Windows. |
clients/mcpdo/__tests__/helpers/platform.ts |
Centralizes the Windows skip condition and rationale. |
clients/mcpdo/__tests__/elicitation-client.test.ts |
Skips socket-dependent elicitation tests on Windows. |
clients/mcpdo/__tests__/directory-read.test.ts |
Skips daemon-dependent directory tests on Windows. |
clients/mcpdo/__tests__/daemon-stream.test.ts |
Skips socket-dependent streaming tests on Windows. |
clients/mcpdo/__tests__/daemon-private.test.ts |
Accepts Windows separators and skips daemon integration cases. |
clients/mcpdo/__tests__/daemon-paths.test.ts |
Skips Unix-path and POSIX-permission cases on Windows. |
clients/mcpdo/__tests__/daemon-coverage.test.ts |
Skips daemon-dependent suites on Windows. |
clients/mcpdo/__tests__/agent-help.test.ts |
Makes skill-path assertions separator-independent. |
.github/workflows/main.yml |
Adds Windows script, web coverage, and mcpdo coverage checks. |
Review effort: Balanced
Member
Author
|
Copilot round 1, one finding:
Round 2 requested. |
Member
Author
|
Copilot review loop closed: round 2 was clean (no inline comments, nothing suppressed, headline "No open issues"), and the loop stops on the first clean round. 2 rounds in total; the single round-1 finding is fixed in 2d53644. |
…:mcpdo (#2748) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
- scripts/lib/main-module.mjs: isMainModule() compares import.meta.url
against pathToFileURL(argv[1]), replacing the file://${argv[1]} guard
that never matched on Windows in 21 scripts (diagnosis and helper shape
from the issue's commenter).
- win-shell-args: quote an empty argument instead of dropping it, so
node -e "" survives cmd.exe.
- gate-lease tests: skip the ENOENT and POSIX process-group signal cases
on win32 by name; match the synchronous spawn failure as a TypeError.
- board-snapshot/board-recover tests: assert 0600 only off Windows.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
test:scripts - install-clients: probe npm under the env the premise runs it under. - skill-eval: pin the platform where the arg list is the subject; look PATH up case-insensitively. - verify-dep-lockstep main: realpathSync.native for the fixture, so 8.3 short names agree with TypeScript's realpath. coverage:web - file-secret-store: a directory at the secrets path (EISDIR) instead of a path under a file, which is ENOENT on Windows. - Skip on win32 by name: chmod-unwritable rollback cases, POSIX mode-bit assertions, and isOnMountPoint's Linux-container cases. coverage:mcpdo - Skip the daemon / Unix-socket suites on win32 (helpers/platform.ts), plus POSIX-only path, 0700 and exec-bit cases. - Separator- and JSON-escape-agnostic assertions; stop mcp-coverage's teardown cascading a failed rmSync into later tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
…the job (#2748) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
Copilot: package and publish-github-container-registry needed only build and coverage, so a release could publish with the Windows job red. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
cliffhall
force-pushed
the
v2/fix/2748-windows-gate
branch
from
November 5, 2026 08:09
2d53644 to
f6400ba
Compare
This was referenced Nov 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Closes #2748
Summary
The local gate could not pass on Windows. This PR fixes or skips the failing cases, fixes the scripts' entry guard, and adds a Windows CI job so the result is checked on a real Windows runner, not just asserted from macOS.
How this was verified on Windows
The work was done on macOS, so all Windows verification comes from the new
windowsjob inmain.yml. It runstest:scripts,coverage:webandcoverage:mcpdoonwindows-latest. Green run on this branch: https://github.com/modelcontextprotocol/inspector/actions/runs/41986616591 (job time 12m03s).test:scriptscoverage:webcoverage:mcpdonpm run local:gateon macOS is green, so nothing regressed on POSIX. Every skip iswin32-only, so POSIX runs keep every case and the coverage it carries.Entry guard
scripts/lib/main-module.mjsaddsisMainModule(). It comparesimport.meta.urlwithpathToFileURL(argv[1]).href, replacing thefile://${argv[1]}guard in all 21 scripts. That guard never matched on Windows, sonpm run board:addand similar commands exited 0 having printed nothing. The platform is injectable, so the siblingmain-module.test.mjspins a Windowsargv[1](and a path with a space) on every host. Credit to @laoyyu, whose comment on the issue diagnosed this and supplied the helper shape and the cases.Fixed (not skipped)
win-shell-args: an empty argument was dropped bycmd.exe, sonode -e ""becamenode -e, which exits 9. This was behind 6gate-leasefailures and is a real bug in the helper. It is now quoted as"".board-snapshot/board-recover:438 !== 384turned out to be file modes (0o666 vs 0o600), not LF byte counts. Only the 0600 assertion is POSIX-gated; the rest of each test runs on Windows.install-clients: the npm-version probe now runs under the same environment as the premise it gates. On Windows thenpm.cmdshim picks its CLI fromnpm_config_*-steered state that the stripped env deletes, so the probe and the run could resolve different npms.skill-eval: the arg-list tests pin the platform (quoting has its own suite), and the env test looksPATHup case-insensitively (Windows spells itPath).verify-dep-lockstepmain tests: the fixture now usesrealpathSync.native. The JSrealpathSynckeeps 8.3 short names (RUNNER~1) while TypeScript expands them, so every installed file read as out-of-repo.file-secret-store: the read-failure cases now put a directory at the secrets path (EISDIR on every platform). The old path-under-a-file setup was ENOTDIR on POSIX but ENOENT ("no file yet") on Windows.agent-help,daemon-privateandmcp-coverage.mcp-coverage's teardown no longer passes one failedrmSyncon to every later test.Skipped on win32, by name, with the reason at the site
test:scripts(3):gate-lease's ENOENT case (withshell: truea missing command is cmd's exit 1), and the SIGTERM/SIGQUIT tree-stop cases. The latter rely on POSIX process groups; on Windowskill()left the grandchildren holding the stderr pipe, which is what hung the whole run.coverage:web(30):chmod 0o555unwritable-directory rollback cases (node-persistence7,oauth-secret-split4,servers-route3), POSIX mode-bit assertions (file-secret-store3), and insecret-store-selection(13) theisOnMountPointLinux-container cases plus the descriptor cases whose caveat sits behind mode bits.coverage:mcpdo(127): the suites that need a live daemon or a Unix socket file, plus the POSIX-only path, 0700 and exec-bit cases. The reason is stated once inclients/mcpdo/__tests__/helpers/platform.ts, and each site points to it.mcpdo coverage thresholds on Windows
With the daemon suites skipped, the daemon modules fall below 90 on Windows. That reflects the skip, not the code.
clients/mcpdo/vitest.config.tstherefore drops the thresholds onwin32only: coverage is still collected there, the Linuxcoveragejob stays the authoritative per-file gate, and every POSIXlocal:gatestill enforces it. Web's thresholds hold on Windows and stay enforced there.CI job
windowsis an ordinary job (no credentials, so moving major tags). Each stage runs even if the one before it failed, so every stage gets its own verdict.timeout-minutes: 45is marked provisional until there are observed runs to size it from. It is documented indocs/quality-gate.md. Noverify:*guard needed changes:workflow-gateonly forbidslocal:*and non-Chromium engine passes, andverify:action-pinsonly checks credentialed jobs.🤖 Generated with Claude Code