[codex] Fix wrangler dev suspense streaming#879
Draft
southpolesteve wants to merge 1 commit intomainfrom
Draft
Conversation
Collaborator
Author
|
This might be a sufficient workaround for the reported The buffering reproduces with a plain |
commit: |
|
|
Ref #874 |
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
Content-Encoding: identityfor streamed loopback App Router responses without explicit body headers.Root Cause
wrangler dev/Miniflare buffers streamed non-SSE responses unless compression is explicitly avoided. The behavior reproduces with a plainReadableStreamroute, outside React and vinext rendering. SettingContent-Encoding: identityrestores chunk delivery locally.This aligns with upstream Cloudflare workers-sdk issue #8004, which describes Miniflare aggressively buffering responses and lists
Content-Encoding: identityas the workaround.Validation
npx vp test run tests/app-ssr-stream.test.ts tests/rsc-streaming.test.ts tests/deploy.test.ts -t "applyLocalDevStreamingHeaders|host timers|createFlightHintFixTransform"npx vp check packages/vinext/src/server/worker-utils.ts packages/vinext/src/server/app-router-entry.ts packages/vinext/src/server/app-ssr-stream.ts packages/vinext/src/server/flight-hints.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-ssr-stream.test.ts tests/rsc-streaming.test.ts tests/deploy.test.tsnpx vp run vinext#build/streamingbuffered until ~830ms; after the workaround the fallback arrived at ~47ms and resolved content at ~834ms.