Repository navigation
fix(deps): bump undici to 8.11.2 so native fetch decodes responses again - #2514
Merged
Merged
Conversation
undici 8.11.0 (#2504) broke Node's built-in fetch in any process that loads it: over HTTP/2, the legacy dispatcher bridge dropped response headers, so Content-Encoding went missing and gzip bodies reached JSON.parse undecoded, and redirects stopped being followed (nodejs/undici#5865, #5858). The daemon and relay import undici at startup, so every native fetch they make was affected; the daemon's formal code reviews failed to publish with "Unexpected token '\x1f' ... is not valid JSON". 8.11.1 reverts the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zfy0701
enabled auto-merge (squash)
September 25, 2026 22:09
zfy0701
disabled auto-merge
September 25, 2026 22:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
undici 8.11.0, which #2504 brought in, breaks Node's built-in
fetchin any process that loads it. When HTTP/2 is negotiated, the legacy dispatcher bridge Node'sfetchgoes through drops the response headers, which causes two failures:Content-Encodinggoes missing, so gzip bodies reachJSON.parsewithout being decoded.Upstream tracks this as nodejs/undici#5865 and nodejs/undici#5858. It is fixed in 8.11.1, which reverts nodejs/undici#5811 in nodejs/undici#5860.
The daemon and the relay both import
undiciat startup (Slack's proxy-aware fetch), so every nativefetchthey make was affected. On the test environment, every formal code review since the daemons upgraded failed to publish: the daemon's GitHub review client threwUnexpected token '\x1f', "\x1f\x8b\b..." is not valid JSONon GitHub's gzip responses. Those runs are recorded asambiguous_writeorgithub_rejected, with a red review check. In some of them GitHub had in fact accepted the review.Changes
packages/daemonandpackages/relay:undici^8.11.0becomes^8.11.2. The lockfile moves them, and@slack/bolt/@slack/socket-mode, which peer on undici, to 8.11.2.undici@8.11.0stays in the lockfile only for@apidevtools/json-schema-ref-parserunder the root dev dependencypromptfoo. The eval tool uses it; no shipped package loads it.Tests
import "undici"at 8.11.0 alone is enough. Afterwards a nativefetchofhttps://api.github.com/repos/…/pulls/…/reviewsreturnscontent-encoding: nulland a body starting with\x1f\x8b\b. With 8.10.2 the same request returnscontent-encoding: gzipand JSON.packages/daemonand frompackages/relaywith the resolved 8.11.2:fetchreturnscontent-encoding: gzipand decoded JSON;HEADto a GitHub archive URL reportsredirected: trueand status 200.pnpm --filter @agentconnect.md/daemon --filter @agentconnect.md/relay typecheck: clean.connection.test.ts,slack-streaming.test.ts,slack-upload-file.test.tsanddaemon-permission-autoallow.test.ts, run with--maxWorkers=2. Vitest ran 33 files: 890 tests passed.http-ingest,http-ingressandingress-plugin, run with--maxWorkers=2: 3 files, 66 tests passed.🤖 Generated with Claude Code . Opus 5.5