| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…g on stale ports The server conformance script started the test server with 'npx tsx ... &' and killed $SERVER_PID on exit — but that PID is the npx wrapper, not the server. The actual node process survived every run, kept listening on port 3000, and poisoned subsequent runs: a healthy orphan made the readiness check pass against stale code (the replacement server died on an unhandled EADDRINUSE), and an unresponsive one made the readiness loop hang forever because curl had no timeout (the 30-retry cap only counts completed curl attempts). With no per-scenario timeout in the runner, a wedged stale listener turns the suite into sequential 60s request timeouts — tens of minutes for a run that normally takes seconds. CI is exposed too: the server and server:draft steps run back to back in one job, so the draft pass was silently exercising the leaked server from the previous step (the runner logs 'Terminate orphan process' after the job). - run-server-conformance.sh: refuse to start when something already listens on the port; spawn the server with 'node --import tsx' so the recorded PID is the server itself and the cleanup kill works; bound each readiness curl with --max-time and fail fast if the server process died - package.json: use 'node --import tsx' for all spawned commands (no wrapper process between us and the child); declare the tsx dependency this relies on; add '--suite core' to test:conformance:client, which conformance 0.2.0-alpha.1 made mandatory (the script errored out immediately without it; core matches the previous default 'active' set) - everythingServer.ts / authTestServer.ts: handle the listen 'error' event so EADDRINUSE prints a one-line hint about a stale server instead of an uncaught stack trace - README: document that the server script refuses to run while the port is taken Verified: runs leave the port free (back-to-back runs green, 42 passed), a squatted port now fails in milliseconds with a clear message instead of hanging, EADDRINUSE prints the hint, and the plain client script runs the core suite again. Lint and typecheck clean.
🦋 Changeset detectedLatest commit: 42ac574 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
|
@modelcontextprotocol/client
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/codemod@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server-legacy@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/fastify@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@2276
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@2276 commit: 42ac574 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Running conformance locally could take "forever" or silently test stale code. Root cause: every pnpm test:conformance:server run leaks the test server, which then poisons later runs.
Motivation and Context
run-server-conformance.sh starts the server with npx tsx ./src/everythingServer.ts & and kills $SERVER_PID on exit — but that PID is the npx wrapper. The actual node server survives every run and keeps listening on port 3000. That single leak produces three failure modes:
Separately, the plain test:conformance:client script has been broken since the 0.2.0-alpha.1 pin (#2227): the CLI now requires --scenario or --suite in client mode, so the script exits immediately with a usage error. CI never noticed because it only runs :client:all.
What changed
How Has This Been Tested?
All on Linux, current main:
Breaking Changes
None for CI. Two local behavior changes: test:conformance:server now refuses to start while the port is taken (previously it silently tested whatever was listening), and the spawn commands require Node ≥ 20.6 for --import (engines says ≥ 20; test/e2e already uses node --import tsx).
Types of changes
Checklist
Additional context
A deeper fix would be binding an ephemeral port (PORT=0) and passing the discovered URL to the runner, eliminating the fixed-port collision class entirely — left as a follow-up since it changes the documented debugging workflow. The missing per-scenario timeout in the runner itself is a conformance-repo issue, not addressable from this repo.