Skip to content

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

Closed

Description

@cliffhall

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.

Activity

  1. added this to the v2.3.0 milestone on Oct 28, 2026
  2. added
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Oct 28, 2026
  3. self-assigned this
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions