Skip to content

test(workerd): reproduce stacked content-encoding decode gap - #2986

Draft
james-elicx wants to merge 1 commit into
mainfrom
codex/workerd-stacked-content-encoding-repro
Draft

test(workerd): reproduce stacked content-encoding decode gap#2986
james-elicx wants to merge 1 commit into
mainfrom
codex/workerd-stacked-content-encoding-repro

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • add a framework-free Workerd reproduction with a deterministic local Node origin
  • compare a single gzip control with a genuinely double-gzipped gzip, gzip response
  • include encodeResponseBody: "manual" and Node native Fetch as behavioral controls
  • document observed versus expected output and the suspected Workerd source seam

Observed

With Wrangler 4.124.0, the single-gzip response decodes to JSON. The default stacked response remains encoded, begins with gzip magic bytes (1f8b), and fails JSON parsing exactly like explicit manual mode. Node native Fetch decodes both responses successfully.

Validation

  • node --check origin.mjs worker.js node-baseline.mjs
  • local origin + wrangler dev + curl reproduction
  • node node-baseline.mjs
  • npx --yes wrangler@4.124.0 deploy --dry-run

Draft handoff for the Workerd runtime team; no vinext, Next.js, OpenNext, cache backend, account, or deployment is involved.

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2986
npm i https://pkg.pr.new/create-vinext-app@2986
npm i https://pkg.pr.new/@vinext/types@2986
npm i https://pkg.pr.new/vinext@2986

commit: 83051d3

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 83051d3 against base b663d4b using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 140.3 KB 140.3 KB ⚫ 0.0%
Client entry size (gzip) vinext 127.7 KB 127.7 KB ⚫ 0.0%
Dev server cold start vinext 3.21 s 3.22 s ⚫ +0.3%
Production build time vinext 3.63 s 3.61 s ⚫ -0.5%
RSC entry closure size (gzip) vinext 115.5 KB 115.5 KB ⚫ -0.0%
Server bundle size (gzip) vinext 196.7 KB 196.7 KB ⚫ -0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

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