Skip to content

fix(nix): preserve native fetch decoding after importing Undici - #422

Merged
iainlane merged 1 commit into
mainfrom
codex/fix-undici-native-fetch
Sep 27, 2026
Merged

iainlane merged 1 commit into
mainfrom
codex/fix-undici-native-fetch

Conversation

@iainlane

@iainlane iainlane commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Cache publication fails while parsing /token responses after the dependency update in #418. Importing @cupboard/nix loads Undici 8.11.0, whose compatibility dispatcher loses HTTP/2 response headers. Node's native fetch then passes compressed bytes to the JSON parser.

Require Undici 8.11.2, which includes the upstream repair, and regenerate the Nix dependency hash.

A local TLS reproduction fails with 8.11.0 and decodes the compressed JSON response successfully with 8.11.2. The full pnpm check passed under Nix Node 24.19.0 and pnpm 12.6.0, and nix build .#cupboard --no-link passed. Both dependency-hash fetches agreed.

The shared cache publisher uses the reusable workflow and CLI from main. The publication job on #418 therefore exercised the older CLI before merge; this PR's publication job also uses the current, unfixed CLI. After merge, verify publication from current main. Any affected open PR needs a complete workflow rerun to resolve the updated publisher; rerunning only failed jobs reuses the original workflow revision.

Upstream: dispatcher header repair and native fetch compression regression.

Undici 8.11.0 changes the global dispatcher when the Nix package is
imported. Its compatibility wrapper loses response headers over HTTP/2,
so Node's native fetch passes compressed token responses to the JSON
parser. Cache publication then fails before authentication completes.

Require Undici 8.11.2, which includes the upstream dispatcher repair. A
local TLS reproduction fails with 8.11.0 and decodes the compressed JSON
response successfully with 8.11.2.
@iainlane
iainlane force-pushed the codex/fix-undici-native-fetch branch from d055b83 to 4807ff6 Compare September 27, 2026 16:27
@iainlane
iainlane enabled auto-merge September 27, 2026 16:42
@iainlane
iainlane added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 31dc7ec Sep 27, 2026
18 of 19 checks passed
@iainlane
iainlane deleted the codex/fix-undici-native-fetch branch September 27, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant