Skip to content

scripts: fix client-conformance.sh on Windows and with a relative --result_dir - #1366

Open
Shreyasg13 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Shreyasg13:fix/client-conformance-windows-exe
Open

Shreyasg13 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Shreyasg13:fix/client-conformance-windows-exe

Conversation

@Shreyasg13

Copy link
Copy Markdown

scripts/client-conformance.sh fails every client check in two cases.

Windows. The script builds the client as conformance-client, with no extension. The conformance runner starts --command through cmd.exe, which can't run a file without .exe, so all 42 checks fail with:

'C:/Users/.../Temp/tmp.hSoDTWUFKq/conformance-client' is not recognized as an internal or external command,

The script now builds conformance-client$(go env GOEXE). GOEXE is .exe on Windows and empty elsewhere.

Relative --result_dir (any OS). With the example from CONTRIBUTING.md, --result_dir ./conformance-results, the script cds into that directory and then passes the same relative path in --command, so the client isn't found:

/bin/sh: 1: ./r-main/conformance-client: not found

The script now resolves --result_dir to an absolute path first. That also puts results in the directory you asked for, not in a nested copy of it.

CI is unaffected: its client job runs the runner directly with go run ./conformance/everything-client.

Testing (core suite, @modelcontextprotocol/conformance 0.1.16):

main this PR
Windows 11, Git Bash, go1.27.2, default temp dir 0 passed, 42 failed 239 passed
Windows, relative --result_dir not run 239 passed
Windows, absolute --result_dir not run 239 passed
ubuntu-latest, default temp dir 239 passed 239 passed
ubuntu-latest, relative --result_dir not found 239 passed

The Linux rows ran on GitHub Actions in my fork. bash -n is clean.

AI disclosure: this change was written with Claude Code (Claude Opus 5.5); I reviewed it and the test results.

…esult_dir

client-conformance.sh fails every client check in two cases.

On Windows, it builds the client as `conformance-client` with no
extension. The conformance runner starts `--command` through cmd.exe,
which can't run a file without `.exe`, so all 42 checks fail with
"'.../conformance-client' is not recognized as an internal or external
command". The script now appends `go env GOEXE`, which is ".exe" on
Windows and empty elsewhere.

With a relative --result_dir, such as `./conformance-results` from
CONTRIBUTING.md, the script cds into that directory and then passes the
same relative path in `--command`, so the client is not found on any OS.
The script now resolves --result_dir to an absolute path first.

CI is unaffected: its client job runs the runner directly with
`go run ./conformance/everything-client`.

AI disclosure: this change was written with Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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