You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c66130d
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(web): remove the X-Server-Function-Instance header from the wire protocol (#3421)
Since #3094 the header decided nothing: the answer shape is the address
(/data/ for the scripted transport, bare for plain HTTP), no-JS gating is
the address plus a form post, and #3416 had already dropped it from GET
reads so a <link rel="preload"> could match them. What remained was a
per-call id the handler copied into `context.instance` for the
transformResult / transformFlightResult hooks, which no consumer reads —
not the router (@solidjs/router@next), not frames, not the invocation or
trace channels. Cross-wire correlation is the trace context's job (#3402).
The header is gone from shared.ts, no longer sent by the client or read by
the server, and no longer exported from either entry; `context.instance`
leaves the hook contexts. The prepareRequest validation (#3174) uses the
transport's method as its sentinel on every call shape — the one field
every call carries — so a hook returning a fresh `{ headers }` is still
refused before dispatch. Client-side call observers keep their local
`instance` id.
Tests: 29 spec files stop emulating the header in hand-built requests. The
#3094 pins that sent the header to prove it was inert go with it — the
code path they pinned left in #3102, and there is nothing left to be inert
to; "shape by url alone" keeps its data-vs-bare comparison. The #3406
addressing test asserts the full header set per call shape.
Co-authored-by: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
Remove the `X-Server-Function-Instance` header from the server-function wire protocol. Since #3094 it decided nothing: the answer shape is the address (`/data/` for the scripted transport, bare for plain HTTP), no-JS gating is the address plus a form post, and #3416 had already dropped it from GET reads so preloads could match. What remained was a per-call id the handler copied into `context.instance` for `transformResult` / `transformFlightResult`, which nothing consumed; cross-wire correlation is the trace context's job (`traceparent`, #3402). Breaking, nominally: `context.instance` is gone from the hook contexts, and `INSTANCE_HEADER` is no longer exported from `@solidjs/web/server-functions/{client,server}`. A legacy header on an incoming request is ignored, as it already was. The `prepareRequest` validation (#3174) now uses the transport's method as its sentinel on every call shape, so a hook returning a fresh `{ headers }` instead of spreading is still refused before dispatch. Client-side `observeServerFunctionCalls` events keep their local `instance` id for pairing a request with its response.
0 commit comments