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

release:notes: a gh reply over 1 MiB aborts the run with spawnSync ENOBUFS

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, node.js, typescript
领域
cli, release

调研方向

从 scripts/release-notes.mjs 中的 run() 开始,检查它的 spawnSync 选项;然后查看 scripts/lib/sweep.mjs 中的 gh() 辅助函数,issue 也指出了它。添加覆盖,证明超过 1 MiB 的回复能够成功处理,并且真实的 spawn 错误会被重新抛出。当发行说明命令能够处理报告中的回复大小,且测试覆盖这两种情况时,工作即告完成。

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

描述

chore v2

Problem

npm run release:notes aborts with release-notes: spawnSync gh ENOBUFS when any gh reply is larger than 1 MiB. run() in scripts/release-notes.mjs calls spawnSync with no maxBuffer, so Node's default of 1 MiB applies, and an overflow throws before any notes are produced. The preview and --draft both fail.

It first happened on the v2.2.0 release (#5330). The GraphQL query that lists the tree under src/ at the merge commit (expr=<merge-sha>:src) returned 1,087,532 bytes for 60200eb7. v2.1.0's tree was under the limit. The tree only grows, so every later release fails the same way.

Reproduce

npm run --silent release:notes -- --milestone v2.2.0 \
  --merge-sha 60200eb73634fd2c611f60ea5bc5801d19325c89 \
  --merge-branch v2/chore/5330-release-v2.2.0 --ledger-url https://example.invalid
# release notes: v2.1.0 → v2.2.0
# release-notes: spawnSync gh ENOBUFS

Expected

The run completes. run() passes a maxBuffer large enough for any reply the script reads, for example 256 MiB. A test should show that a reply over 1 MiB gets through, and that a genuine spawn error is still rethrown.

Notes

  • For v2.2.0, the maintainer authorized drafting through a driver that calls the script's own main() with a spawn that retries an overflowing call with a larger buffer, so this fix was not required for that release.
  • scripts/lib/sweep.mjs's gh() helper, used by the sweeps, also calls spawnSync with no maxBuffer. Check whether any of its calls can grow past 1 MiB.
主要语言
TypeScript
星标
91.6k
派生
11.9k
平均合并
4 小时 38 分钟
30 天内合并 PR
241

环境准备

从这里开始

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

modelcontextprotocol/servers 的其他 Issue

查看 modelcontextprotocol/servers 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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