Skip to content

fix(web): refuse file arguments in a GET server function and send its long-argument encoding once (carries #5177) - #5288

Merged
ryansolid merged 56 commits into
mainfrom
claude/project-thread-vnjtow
Dec 2, 2026
Merged

ryansolid merged 56 commits into
mainfrom
claude/project-thread-vnjtow

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Carries #5177 by @Marve10s unchanged, merged over main @ 9f7d51d. The only conflicts were in the size ledger, because #5287 re-recorded the same scenarios first.

Summary

Two bugs in a GET server function's client send:

  • With enableRichArguments(), a file among the arguments made serializeArguments return a FormData, which went into the url as ?args=%5Bobject%20FormData%5D and got a 400. The call now throws A GET server function cannot send files: use POST before sending.
  • When codec arguments were too long for a url, the POST fallback encoded them a second time, so a one-shot argument such as an async iterator arrived with no chunks. The fallback now sends the encoding it already made.

Size

+106 B minified on every server-function page. Re-recorded over main @ 9f7d51d with the CI gate locally: base and live server components (frozen floors in floor-caps.json), compiled base and compiled live server components, base + router, and live + router. Cap at measured + 10 B, recorded minified = measured, one ledger line each. Accepted by the maintainer as is (2026-12-02); trimming the server-function client's prod error messages is a separate follow-up.

Size-Exception: a GET server function with a file among its codec arguments sent a 400-bound request instead of failing clearly, and its long-argument POST fallback dropped one-shot arguments; the clear error and the single encoding cost 106 B minified on server-function pages.

How did you test this change?

  • vitest run --config vite.config.server.mjs on server-functions-body-formats.spec.tsx and server-functions-uploads.spec.tsx: 23 of 23 pass on the merged tree.
  • pnpm build, then scripts/size measure and gate: every scenario passes.

Closes #5177 when merged.


Generated by Claude Code

claude and others added 30 commits November 18, 2026 11:07
Since #4985, h, html and element version on their own, so a core release
leaves them at a version already on npm. verify-release-artifacts.mjs
dry-run-published every public package, and npm refuses even a dry run over
a published version, so the 2.0.1 release failed before publishing anything.
It now skips a published version the same way release.mjs does, with
packageIsPublished shared from release-packages.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…ding on it

retryReaches counted a dep that is the source itself as a path even after
that source settled, so settleFamily and the re-park sweep in recompute
kept a settled derive node in a reader's pending sources. With an
optimistic store over one async memo and a slower sibling memo whose
re-ask answers unchanged, the reader stayed pending and the action's
transaction never landed. A direct link now counts only while the source
is pending.

Claude-Session: https://claude.ai/code/session_01CP9T3j2CTCEPyTS2bcKsBu
# Conflicts:
#	packages/signals/docs/RULES-INDEX.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
…tream

The top-level abort wrapper for streamed results matched any async
iterable, so a decoded ReadableStream (which is one in Node and Chrome)
was replaced by a plain iterable and lost getReader/pipeTo/tee. Leave a
ReadableStream out of that check; it passes through as it already does
when nested. Test shape from #5175.

Co-authored-by: Marve10s <igrimanigroman@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
The instanceof check with its typeof guard cost +59 B minified on every
server-function page and put three page scenarios over their caps. A
decoded ReadableStream is told apart from an async generator's result by
its getReader method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
Send `,` in one header write when the joined keys are only whitespace,
and digest `X-Revalidate` with empty keys filtered, so an empty
declaration reads as `[]` on the outcome instead of `[""]` or
`["", ""]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…hing it

The 2.0.4 publish stopped at `gh run watch`: `gh workflow run` printed
the new run's URL, and watching it one second later returned 404 because
the run was not readable yet. Poll `gh run view` until it resolves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
The 2.0.4 re-run got past the run lookup, then `gh run watch` failed on
the run's jobs (HTTP 404) before GitHub had created them. Poll
`gh run view --json status,conclusion` until the run completes, retrying
failed reads, and check the conclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…e loading

The re-park prune in recompute kept any carried source still flagged
STATUS_PENDING, on the assumption that its own settle walk is still to
come. A source disposed while loading keeps that flag but never lands, so
no walk comes. When a reader parked on an async memo whose owner then
re-ran in the same hold, disposing it and creating a replacement that
failed, the reader stayed pending on the disposed memo: the hold never
landed and its staged error never reached the boundary. A disposed source
is now dropped whatever its status, as retryReaches and holdsOn already
treat a disposed node as holding nothing (F-3).
After the 11-24 fix batch and 2.0.4, six scenarios sat over their brotli
caps with 9-14 B of minified allowance left (warnings on main, but the
next ~10 B client fix would fail the gate). Caps move to CI's measure on
5420b4a + 10 B and recorded minified resets to the measure. No floors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Same flag as the web server lane (#5157). In #5141's fork runs it took
the signals lane from one benchmark varying by more than 5% across
fresh runners to none, and #4906's omit ownKeys -63% reads 226k vs 235k
instructions pinned (673k vs 237k unpinned). Benchmark mode only: the
test suite runs in worker threads, which reject V8 flags in execArgv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
After #4906, #5209 and #5218, until/refresh, base server components and
live server components sat 5-15 B brotli over their caps, so the size gate
failed on every PR. Caps move to CI's measure on main @ 50a4bfd + 10 B and
recorded minified resets to the measure. The two page scenarios are frozen
floors (floor-caps.json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
claude and others added 23 commits November 27, 2026 04:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
After #5221, #5225, #5228, #5235 and #5236, until/refresh, compiled base
server components, base + router and live + router sat 6-92 B brotli over
their caps. Caps move to CI's measure on main @ f7b6b9c + 10 B and recorded
minified resets to the measure. No floors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…#5230)

Server only: +511 B minified, +195 B brotli measured locally over main @ 8fa0476.
Client eager chunks are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
… to POST

Narrowed per review. A GET server function whose codec arguments encode to
multipart form data (a file among them) now throws "A GET server function
cannot send files: use POST" before sending, instead of putting
`[object FormData]` in the url. Without the codec, a GET call with a file
still throws the existing enableRichArguments error.

The long-argument POST fallback keeps the encoding it already made: GET
passes it as the options body and the codec branch of initializeResponse
sends it, so a one-shot argument such as an async iterator arrives with all
its chunks.

Size: +106 B minified on every server-function page. Caps raised at
measured + 10 B over main @ 5420b4a for compiled base, compiled live and
live + router, and for the frozen live page floor, which needs a
Size-Exception line in the PR body.
…-argument error

+106 B minified on every server-function page, measured locally with the
native compiler over main @ caba92a. Two frozen floors (base and live
server components) move and need a Size-Exception line in the PR body.
+57 B minified on pages with error boundaries (the parent walk in keeps()).
Accepted by the maintainer; three trims measured, none smaller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Carries #5177 (Marve10s) over main @ 9f7d51d. The conflicts were the
size ledger only: main's #5287 re-record is kept and #5177's growth
(+106 B minified on every server-function page) is re-measured on top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4b3a047

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@solidjs/web Patch
@solidjs/diagnostics Patch
@solidjs/signals Patch
solid-js Patch
@solidjs/universal Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Size (brotli, eager entry chunk)

scenario head vs base minified vs base minified vs recorded cap lazy chunks (not counted)
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.54 KB 0 B 0 B −131 B 7.56 KB ✅
signals: + createStore 14.54 KB 0 B 0 B −2769 B 15.16 KB ✅
signals: + isPending/latest 13.41 KB 0 B 0 B −6 B 13.43 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.26 KB 0 B 0 B 0 B 8.27 KB ✅
app: render + one signal (the simple-app floor) 9.78 KB 0 B 0 B −433 B 9.85 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 19.20 KB 0 B 0 B 0 B 19.22 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 33.96 KB 0 B 0 B −6356 B 35.45 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.80 KB 0 B 0 B −163 B 13.86 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.55 KB 0 B 0 B −163 B 15.59 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 30.09 KB 0 B 0 B −241 B 30.22 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.96 KB 0 B 0 B −505 B 10.03 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.29 KB 0 B 0 B −2746 B 26.80 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.49 KB 0 B 0 B −2760 B 33.10 KB ✅ stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.78 KB 0 B 0 B +20 B 11.80 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 34.30 KB +56 B (+0.2%) +106 B 0 B 34.31 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 8.60 KB, wire.js 3.48 KB
page: live server components (base + live/GET + action + isPending/latest) 41.78 KB +132 B (+0.3%) +106 B 0 B 41.79 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 8.60 KB, wire.js 3.48 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 36.26 KB +41 B (+0.1%) +106 B 0 B 36.27 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 8.64 KB, wire.js 3.48 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 45.95 KB +55 B (+0.1%) +106 B 0 B 45.96 KB ✅ eager (counted): web.js 24.40 KB; assets.js 0.78 KB, decode.js 7.41 KB, regions.js 1.08 KB, sc-comments.js 0.19 KB, trace.js 8.65 KB, wire.js 3.48 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.82 KB +38 B (+0.1%) +106 B 0 B 41.84 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.05 KB, serverForms.js 3.59 KB, trace.js 8.66 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 51.67 KB +45 B (+0.1%) +106 B 0 B 51.69 KB ✅ eager (counted): client.js 29.66 KB; assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.05 KB, serverForms.js 3.31 KB, trace.js 8.63 KB, wire.js 3.50 KB
server: floor (getRequestEvent + isServer) 1.31 KB 0 B 0 B 0 B 1.33 KB ✅
server: renderToString (the server-render floor) 23.79 KB 0 B 0 B 0 B 23.81 KB ✅

Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in scripts/size/scenarios.js; the floor and page caps in floor-caps.json are frozen (lower only, or Size-Exception: in the PR body). npm run ratchet lowers caps per RC; it never raises one (scripts/size/README.md).

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 46828982140

Coverage remained the same at 79.831%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1379
Covered Lines: 1163
Line Coverage: 84.34%
Relevant Branches: 1110
Covered Branches: 824
Branch Coverage: 74.23%
Branches in Coverage %: Yes
Coverage Strength: 31.25 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Dec 2, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.24%

1 warning

⚠️ Upgrade your CodSpeed plugin for Node.js 24

@codspeed/* 5.4.0 is only tested on Node.js 18, 20, and 22, so your Node.js 24 measurements may be inaccurate. Upgrade your @codspeed/* packages to 6.0.0 or later.

See affected benchmarks

❌ 1 regressed benchmark
✅ 204 untouched benchmarks
⏩ 5 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ projection derive: write one NESTED field (reference) 792.7 µs 863.8 µs -8.24%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-vnjtow (4b3a047) with main (9f7d51d)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Copy link
Copy Markdown
Member Author

The CodSpeed regression (projection derive: write one NESTED field (reference), −8%) isn't this PR's. The diff doesn't touch packages/signals, and that bench is on the known-noise list: it flips by up to ±15% with module byte size alone, depending on where a V8 lazy GC sweep lands in its single measured run.

— Claude via Claude Code


Generated by Claude Code

@ryansolid
ryansolid merged commit cbc14c8 into main Dec 2, 2026
13 of 14 checks passed
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.

7 participants