Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

server-stateless: 500 ms whole-request deadline in no-log-without-loglevel reports slow servers as failures

Đang mở Phù hợp với người mới
#530 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu tại src/scenarios/server/stateless.ts, quanh các dòng 947-952, và kiểm tra cách xử lý timeout của listenToStream, bao gồm việc một lần abort trở thành kết quả frame rỗng như thế nào. Chạy conformance server --scenario server-stateless để tái hiện lỗi không liên tục dưới một proxy chậm. Hoàn thành khi một server chậm nhưng đúng không bị báo cáo sai là thất bại, với hành vi này được các bài kiểm thử scenario liên quan bao phủ nếu có.

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

Mô tả

sep-2575-server-no-log-without-loglevel gives listenToStream a 500 ms budget for the whole request (stateless.ts#L947-L952). The AbortController covers connecting, the server's handler, and reading the frames. When the deadline passes, the helper swallows the abort and returns []. The check then reports the FAILURE Logging target endpoint context dropped or failed to yield frame structures, so a slow but correct server looks broken.

Other listenToStream calls in this scenario allow 800 to 1500 ms, and the helper defaults to 1000 ms. The CLI has no option to raise the budget.

What we see. We run conformance server --scenario server-stateless in our local test gate. The target is a Cloudflare Workers dev server reached through a loopback proxy. At a load average of about 60, the proxy timed 58 scenario requests to response headers: median 137 ms, p90 278 ms, max 512 ms. The test_logging_tool call took 105 ms that run. With more CPU contention (several test runs sharing a laptop), that call sometimes takes over 500 ms. The check then fails, and the same server passes on a rerun.

Suggested fix (any of these):

  • Use the helper's 1000 ms default here, as the neighboring checks do, or
  • report an aborted request as inconclusive, e.g. untestable, and not as a server failure, or
  • expose a CLI option such as --timeout <ms> for stream waits.

Version: @modelcontextprotocol/[email protected]. The same code is on main at 7169291.

Ngôn ngữ chính
TypeScript
Star
127
Fork
101
Merge trung bình
4 ngày 7 giờ
Pull request đã merge (30 ngày)
6

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/conformance

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

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.