Uh oh!
There was an error while loading. Please reload this page.
fix: preload modules for data-addressed server function calls - #335
Conversation
Scripted calls now go to <endpoint>/data/<id> (solidjs/solid#3094). The dev middleware's module-preload step assumed exactly one path segment after the mount, so a cold function only client code references would never be evaluated in the SSR environment for a data-addressed call — a 404 under vite dev. Dispatch was unaffected (mount matching is prefix-based); the id now parses from behind the literal data segment too. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 1e0c5ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
solidjs/solid#3109) Co-authored-by: Cursor <cursoragent@cursor.com>
The RC is already breaking addresses (the data-address split), so the transitional X-Server-Function-Id header and ?id= addressing leave with the runtime's own shims — path-only addressing is the protocol (solidjs/solid#3094). Co-authored-by: Cursor <cursoragent@cursor.com>
ryansolid
commented
Aug 31, 2026
Root-caused the middleware-mode failure ("Unknown server function: 9832c6f0-4-whoAmI") — it is not a regression in this PR, it's version skew:
This goes green once the repo bumps to the rc.5 compiler (which carries #3109). Blocked on the solid rc.5 release, nothing to fix here. |
rc.5's argument parser treats a present body that decodes to nothing as malformed (400) where rc.4 ignored it, and the dev middlewares' node bridge attached `Readable.toWeb(req)` to every non-GET/HEAD request — so bodyless POSTs (zero-argument scripted calls, synthetic dispatches) started failing across dev and any prod host with the same conversion. Presence now follows the protocol signals: Content-Length or Transfer-Encoding on HTTP/1 (RFC 9112 §6), `stream.endAfterHeaders` on the h2 compat API. The start-ssr example's production server.js mirrors the same fix. Co-authored-by: Cursor <cursoragent@cursor.com>
rc.5 publishes the data-address split this branch routes (solidjs/solid#3094): the client transport computes `<endpoint>/data/<id>` for scripted calls while form actions and plain HTTP keep the bare `<endpoint>/<id>`, and ids are identity-keyed `<name>-<hash>[-<ordinal>]` (solidjs/solid#3109) — identical across dev and prod, so the suites' prod-id derivations collapse to the dev id. The workspace catalog moves to ^2.0.0-rc.5 (minimumReleaseAgeExclude extended per the existing pattern), the harness id extraction matches the name-first shape, and the CSRF rejection probes a registered id: rc.5 answers unknown ids 404 before the same-origin check runs. Full gate green against published rc.5 (no linking): ssr 12/12 + boundary 8/8, css-matrix 82/82 + bridge 19/19, start-ssr 366/366 + http-bridge 10/10, start-client 45/45, start-env 47/47, vite-8 vitest 1/1, cypress e2e 1/1. Co-authored-by: Cursor <cursoragent@cursor.com>
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
<endpoint>/data/<id>, leaving the bare<endpoint>/<id>to plain HTTP (form actions, direct callers) — A cacheable raw Response is shaped by a request header nothing keys on solid#3094 (landed onnextas solidjs/solid@95229453). The two caller kinds get differently shaped answers, and shared caches key on the URL, so the split keeps one caller kind's cached answer from ever being replayed to the other.vite dev. The id now parses from behind the literaldatasegment too. A function id spelleddatastill parses at the bare address, since an id occupies exactly one segment.Draft until a @solidjs/web carrying the data address ships (next release after 2.0.0-rc.4); safe to land early — the parsing change is additive.
Test plan
pnpm build(clean)vite devagainst a client-only-referenced server function (cold SSR module) resolves at/_server/data/<id>Made with Cursor