Skip to content

Fix Windows compatibility in tier-check client conformance#168

Merged
pcarleton merged 4 commits intomodelcontextprotocol:mainfrom
jeffhandley:jeffhandley/windows-compat
Mar 25, 2026
Merged

Fix Windows compatibility in tier-check client conformance#168
pcarleton merged 4 commits intomodelcontextprotocol:mainfrom
jeffhandley:jeffhandley/windows-compat

Conversation

@jeffhandley
Copy link
Contributor

Motivation and Context

Two issues prevented client conformance tests from running on Windows:

  1. Single-quote quoting in execSync: The --command argument was wrapped in single quotes, which cmd.exe treats as literal characters rather than string delimiters. This caused the CLI to receive only the first word of the command. Switched to execFileSync with an args array to bypass shell quoting entirely.

  2. Backslash path separators in parseOutputDir: dirname() on Windows returns auth\scenario-name but reconcileWithExpected compares against auth/scenario-name, causing auth scenarios to be double-counted. Normalize backslashes to forward slashes in parsed scenario names.

How Has This Been Tested?

Re-running the assessment with these changes staged locally.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Encountered when running the assessment for the C# SDK.

Two issues prevented client conformance tests from running on Windows:

1. Single-quote quoting in execSync: The --command argument was wrapped in single quotes, which cmd.exe treats as literal characters rather than string delimiters. This caused the CLI to receive only the first word of the command. Switched to execFileSync with an args array to bypass shell quoting entirely.

2. Backslash path separators in parseOutputDir: dirname() on Windows returns auth\scenario-name but reconcileWithExpected compares against auth/scenario-name, causing auth scenarios to be double-counted. Normalize backslashes to forward slashes in parsed scenario names.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 10, 2026

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@168

commit: 9cd57e2

Combines the npx-compatibility fix from modelcontextprotocol#175 with this PR's execFileSync
approach. process.argv[1] resolves to the absolute path of the running CLI
regardless of working directory, so tier-check works when invoked via npx
or from any cwd.
…ompat

# Conflicts:
#	src/tier-check/checks/test-conformance-results.ts
@pcarleton
Copy link
Member

Merged in main (including #175) and swapped 'dist/index.js'process.argv[1] in both execFileSync calls, combining the two fixes:

The combined result uses process.execPath + process.argv[1] + array args — robust across cwd, OS, and invocation method.

@pcarleton pcarleton merged commit a2ec2d4 into modelcontextprotocol:main Mar 25, 2026
4 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.

2 participants