René's URL Explorer Experiment


Title: design-code-proxy: the streaming half of PR #685's Content-Length fix has no regression test — the stub never sets Content-Length on SSE responses · Issue #688 · developing-today/code · GitHub

Open Graph Title: design-code-proxy: the streaming half of PR #685's Content-Length fix has no regression test — the stub never sets Content-Length on SSE responses · Issue #688 · developing-today/code

X Title: design-code-proxy: the streaming half of PR #685's Content-Length fix has no regression test — the stub never sets Content-Length on SSE responses · Issue #688 · developing-today/code

Description: Finding PR #685 fixed design-code-proxy forwarding the backend's Content-Length for bodies it re-serializes or rewrites — but only the non-stream half of that fix has a regression test. The streaming half is untested: no test in the suit...

Open Graph Description: Finding PR #685 fixed design-code-proxy forwarding the backend's Content-Length for bodies it re-serializes or rewrites — but only the non-stream half of that fix has a regression test. The streami...

X Description: Finding PR #685 fixed design-code-proxy forwarding the backend's Content-Length for bodies it re-serializes or rewrites — but only the non-stream half of that fix has a regression test. The str...

Opengraph URL: https://github.com/developing-today/code/issues/688

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"design-code-proxy: the streaming half of PR #685's Content-Length fix has no regression test — the stub never sets Content-Length on SSE responses","articleBody":"## Finding\n\nPR #685 fixed `design-code-proxy` forwarding the backend's `Content-Length` for bodies it re-serializes or rewrites — but only the non-stream half of that fix has a regression test. The streaming half is untested: no test in the suite can fail if the streaming path starts forwarding the stale length again.\n\n## Evidence\n\n- PR: https://github.com/developing-today/code/pull/685 (merged, merge commit `0a405c64a908d14c68280959f49342a22ce11d0c`, fixes #684)\n- The fix has two halves in `bin/design-code-proxy.mjs` on current main `4f905d75`:\n  - Non-stream: `writeHead(sentBody)` advertises the re-serialized body's real length (`bin/design-code-proxy.mjs:239-240`, call sites `:287` and `:290`).\n  - Streaming: `writeHead()` is called with no body at `:249`, which deletes the backend's `content-length` at `:241-243` so Node chunks the model-rewritten SSE stream.\n- The new regression test (`bin/design-code-proxy.test.mjs`, \"backend Content-Length does not truncate the re-serialized success body (#684)\") only posts a non-stream request. Its stub mode `ok-length` is explicitly gated to non-stream requests: `stub.mode === 'ok-length' && !bodyText.includes('\"stream\":true')` (`bin/design-code-proxy.test.mjs:51`).\n- The only streaming test, \"streaming success is unchanged\" (`bin/design-code-proxy.test.mjs:196-204`), uses the stub's streaming branch at `:58-66`, which answers `res.writeHead(200, { 'Content-Type': 'text/event-stream' })` — it never sets a `Content-Length`, so the pre-fix and post-fix proxies behave identically for it.\n- PR #685's own ablation confirms the gap: with only `bin/design-code-proxy.mjs` reverted, \"exactly the new test fails; the other 5 design tests still pass\" — i.e. reverting the streaming half of `writeHead` fails nothing.\n\nVerified this run (pr-diff-review): design suite passes 6/6 on current main, and the diff/stub/test lines above were cross-checked via `gh pr diff 685`, `gh api pulls/685/files`, and the local clone at `origin/main`.\n\n## Why it matters\n\nThe streaming path rewrites every SSE chunk's `model` field (`bin/design-code-proxy.mjs:255-267`), so a forwarded backend `Content-Length` is wrong for streamed responses in exactly the same way #684 documented for buffered ones: the client would stop reading at the backend's byte count, truncating the stream (and corrupting keep-alive framing for whatever follows). Today the code is correct; what is missing is the pin that keeps it correct. The sibling non-stream case shows this bug class has already shipped once in this file.\n\nSingle-repo: `design-code-proxy` exists only in this repo (per PR #685's git-grep check across the other three repos, re-confirmed by this job's sibling-proxy grep — no other proxy in `bin/` spreads backend response headers).\n\n## Acceptance criteria\n\n- [ ] The stub backend gains a streaming mode that sets an explicit `Content-Length` on its SSE response (computed over the chunks it sends, whose `model` the proxy will rewrite to a different-length value).\n- [ ] A regression test posts `{ stream: true }` against that stub and asserts the client receives the complete stream (all chunks plus `data: [DONE]`) and that any advertised `Content-Length` equals the byte count actually received.\n- [ ] Ablation: with the streaming `delete headers['content-length']` behaviour reverted (stale length forwarded), the new test fails; with the fix in place, the full design-code-proxy suite passes.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T20:22:57Z","url":"https://github.com/developing-today/code/issues/688"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9ccad3db-9374-20a9-2987-cf126eb303c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE70C:1619FB:8FE0AA:BFEB06:6B0638A9
html-safe-noncef20748b3209edd4e9d3577d101e4b8fb3964277c591ad8a2f9f81a4f8508b6b7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzBDOjE2MTlGQjo4RkUwQUE6QkZFQjA2OjZCMDYzOEE5IiwidmlzaXRvcl9pZCI6IjQyMTAzNzEzMTEyNDExNDg1ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac64003ca5416c0ec46b70fbb409d3cf981bb74f220cdd97c5ba9c907ab65ba891
hovercard-subject-tagissue:6004884783
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/688/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cd7edb76c805b6c728bb9bb43abf621f35ca46f7d9323e9b3aa418c99eae8d0a/developing-today/code/issues/688
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cd7edb76c805b6c728bb9bb43abf621f35ca46f7d9323e9b3aa418c99eae8d0a/developing-today/code/issues/688
og:image:altFinding PR #685 fixed design-code-proxy forwarding the backend's Content-Length for bodies it re-serializes or rewrites — but only the non-stream half of that fix has a regression test. The streami...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
Nonedcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0f38f5735226749ec5e08a8649dce4cb2613d9ad
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/688#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F688
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F688
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/688
Reloadhttps://github.com/developing-today/code/issues/688
Reloadhttps://github.com/developing-today/code/issues/688
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests158 (158)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/688
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/688
#1074https://github.com/developing-today/code/pull/1074
design-code-proxy: the streaming half of PR #685's Content-Length fix has no regression test — the stub never sets Content-Length on SSE responseshttps://github.com/developing-today/code/issues/688#top
#1074https://github.com/developing-today/code/pull/1074
https://github.com/dezren39
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/testhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Ftest%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 23, 2026https://github.com/developing-today/code/issues/688#issue-6004884783
#685https://github.com/developing-today/code/pull/685
fix(design-code-proxy): don't forward the backend's Content-Length for re-serialized bodies (#684) #685https://github.com/developing-today/code/pull/685
design-code-proxy: forwarded Content-Length truncates the re-serialized success body (PR #682) #684https://github.com/developing-today/code/issues/684
design-code-proxy: forwarded Content-Length truncates the re-serialized success body (PR #682) #684https://github.com/developing-today/code/issues/684
fix(design-code-proxy): don't forward the backend's Content-Length for re-serialized bodies (#684) #685https://github.com/developing-today/code/pull/685
#684https://github.com/developing-today/code/issues/684
#685https://github.com/developing-today/code/pull/685
Nexthttps://github.com/developing-today/code/issues/688?timeline_page=1
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 23, 2026https://github.com/developing-today/code/issues/688#event-34088844265
dezren39https://github.com/dezren39
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Oct 25, 2026https://github.com/developing-today/code/issues/688#event-34207248827
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 26, 2026https://github.com/developing-today/code/issues/688#issuecomment-6412589628
#685https://github.com/developing-today/code/pull/685
#685https://github.com/developing-today/code/pull/685
#684https://github.com/developing-today/code/issues/684
#692https://github.com/developing-today/code/issues/692
#694https://github.com/developing-today/code/issues/694
dezren39https://github.com/dezren39
kind/testhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Ftest%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Oct 26, 2026https://github.com/developing-today/code/issues/688#event-34242898588
dezren39https://github.com/dezren39
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34325365876
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 27, 2026https://github.com/developing-today/code/issues/688#issuecomment-6432735879
developing-todayhttps://github.com/apps/developing-today
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34326590976
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#1074https://github.com/developing-today/code/pull/1074
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34326776423
dezren39https://github.com/dezren39
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34326776770
Merge pull request #1074 from developing-today/queue/1228-688-streami…https://github.com/developing-today/code/commit/e793b32b5c938f5cdb676fd347b038a8121b5a24
#1074https://github.com/developing-today/code/pull/1074
e793b32https://github.com/developing-today/code/commit/e793b32b5c938f5cdb676fd347b038a8121b5a24
developing-todayhttps://github.com/apps/developing-today
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34326779983
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Oct 27, 2026https://github.com/developing-today/code/issues/688#event-34326789729
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 27, 2026https://github.com/developing-today/code/issues/688#issuecomment-6432804327
#1074https://github.com/developing-today/code/pull/1074
e793b32https://github.com/developing-today/code/commit/e793b32b5c938f5cdb676fd347b038a8121b5a24
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/688
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/688
dezren39https://github.com/dezren39
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/testhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Ftest%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.