Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#530 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
testing-qa

调研方向

从 src/scenarios/server/stateless.ts 的 947-952 行附近开始,检查 listenToStream 的超时处理,包括 abort 如何变为空 frame 结果。运行 conformance server --scenario server-stateless,以便在慢速代理下复现间歇性失败。当一个缓慢但正确的服务器不会被错误地报告为失败,并且相关 scenario 测试(如果存在)覆盖了该行为时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
127
派生
101
平均合并
4 天 7 小时
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/conformance 的其他 Issue

查看 modelcontextprotocol/conformance 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。