Repository navigation
SWF(refactor): build the Worker's post response only once - #813
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
blog | 171d76b | Commit Preview URL Branch Preview URL |
Nov 20 2026, 03:40 AM |
Contributor
Author
This branch has not been deployed
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
The Worker now builds each post response once instead of re-wrapping it per header tweak; served output is byte-for-byte unchanged.
Before, a negotiated Markdown request copied the headers and created a new
Responsetwice (addVaryAccept(addMarkdownCharset(response))). NowaddMarkdownCharset/addVaryAcceptedit one sharedHeaders, andfetchmakes a single finalResponse:Only
src/worker.tschanges (+25/−27). Tests are unchanged.Evidence
Real
wrangler dev(realwrangler.toml+ builtdist), same probe run againstmainand against this branch.diff before.txt after.txtshows no difference (headers and body SHA-1 match):Results on this branch:
pnpm run test:workerpassed 73/73.pnpm run test:integration(Wrangler test harness) passed 7/7.pnpm run lintshowed 0 errors.Try it:
pnpm run build:ci && pnpm wrangler devthencurl -sI -H 'Accept: text/markdown' localhost:8787/posts/audio-interface-under-the-deskUntested: there is no UI change, so no screenshots. I did not check this on a production deploy.
Implemented in session Build Worker markdown Response only once
Review with Devin · Open in Devin Desktop