mcpdo: run the daemon test suites on Windows by porting the harness to named pipes

Đang mở
#2,922 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
53/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, node.js, typescript
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Start with clients/mcpdo/src/daemon/paths.ts, clients/mcpdo/__tests__/helpers/platform.ts, and the daemon test suites gated by unixDaemonOnly; trace how they construct endpoints and wait during teardown. Run the tests on the Windows CI job and identify cases that depend on POSIX behavior. Done means the daemon suites run on Windows, only explicitly justified POSIX cases remain skipped, and the Windows coverage carve-out is removed from clients/mcpdo/vitest.config.ts.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

chore v2
Problem

mcpdo's Windows daemon path has never been run by a test. Production code already uses a named pipe on win32 (getDaemonSocketPath in clients/mcpdo/src/daemon/paths.ts returns \\.\pipe\mcp-conn-<hash>, and clients/mcpdo/src/daemon/client.ts handles the pipe path when locating the token file). But the daemon test harness was written for a Unix domain socket:

  • suites bind or poll <dir>/mcpdod.sock directly. Windows refuses that with EACCES, and the tests then time out waiting on the daemon.
  • teardown waits for the socket file to vanish. A pipe never appears there, so a live daemon keeps the temp dir open and rmSync fails with EBUSY.
  • some assertions assume POSIX premises (0700 directories, the sun_path limit).

#2748 (PR #2906) therefore skips 127 mcpdo tests on win32 (unixDaemonOnly in clients/mcpdo/__tests__/helpers/platform.ts). It also turns off mcpdo's per-file 90% coverage threshold on Windows only (clients/mcpdo/vitest.config.ts), because the daemon modules fall below it there. The new windows CI job is green, but it doesn't show that the daemon works on Windows.

Expected
  • The daemon test helpers derive the endpoint from getDaemonSocketPath instead of a hard-coded .sock file, and tear down a named-pipe daemon cleanly on Windows.
  • The suites gated by unixDaemonOnly run on the windows CI job. Only cases that assert genuinely POSIX-only behaviour stay skipped, each with its reason at the site.
  • mcpdo's per-file 90% threshold is enforced on Windows again, and the win32 carve-out in clients/mcpdo/vitest.config.ts is removed.

Verification has to come from the windows CI job; maintainers develop on macOS.

Ngôn ngữ chính
TypeScript
Star
11.2k
Fork
1.6k
Merge trung bình
3 giờ 36 phút
Pull request đã merge (30 ngày)
154

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/inspector

Tất cả issue của modelcontextprotocol/inspector

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.