Skip to content

fix(web): send live and broadcast requests with cache: "no-store" (#5335) - #5340

Open
ryansolid wants to merge 22 commits into
mainfrom
claude/project-thread-pa6tia
Open

ryansolid wants to merge 22 commits into
mainfrom
claude/project-thread-pa6tia

Conversation

@ryansolid

@ryansolid ryansolid commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Requested by Ryan · project thread

Fixes #5335.

Summary

In Firefox, a second tab's live/broadcast connection sat on Loading… for about 20 seconds while another tab had the same connection open. As the issue's investigation shows, Firefox holds a second GET to the same URL behind a first response that never ends, unless the request is sent with cache: "no-store". The response's own Cache-Control: no-store header doesn't prevent this. Live requests are GETs to a fixed address (/_server/live/<id>, plus ?args=) and were sent with no cache option.

The live loop now sends every live request with cache: "no-store" by default (set in its wire options, so only pages that use live pay for it). A live answer is never cacheable, so this changes nothing in browsers that didn't hold the request. A caller's own cache option and prepareRequest still win. Plain GET reads keep the default cache mode, because their url is their cache identity (#3406).

Size

+17 B minified on the three live pages, nothing on other pages. The gate counts minified growth against each cap's recorded size, and the live pages were already +19 B over from fixes merged since #5320, so this PR raises the three caps and their recorded minified to CI's measurement (check job 145669773133): live server components 41.82 -> 41.84 KB (a frozen floor), compiled live 45.99 -> 46.03 KB, live + router 51.74 -> 51.78 KB.

Size-Exception: #5335 bug fix, +17 B minified on live pages only; caps re-recorded to CI's measurement including growth merged since #5320.

How did you test this change?

  • test/server-functions-live-loop.spec.tsx: the live connect test now also asserts init.cache === "no-store" (19 passed).
  • packages/web client suite: 2060 passed. The server suite fails only on the known server-functions-adapter-request test, which also fails on main.
  • I couldn't run Firefox here. The issue author confirmed the same option fixes the stall through prepareRequest.

Generated by Claude Code

claude added 20 commits December 2, 2026 09:20
The lazy create under the component's owner was there for the
patch-mode list driver (#3079), which no longer exists. Without it, the
closure and the hydrating-only eager branch (#3161) have no purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
A running computation that creates a node on one of its own ancestors
through runWithOwner is reported in dev: the node outlives the code that
made it and takes the ancestor's next child slot at the moment of the
read, which shifts hydration ids (#5280). Nodes their creator places
(an id option, transparent) are exempt, which covers the runtime's own
re-entries. Docs, skill entry, catalog, and a parity-harness scenario
with the up-front-scope fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
…how mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
documentSiteId cached a site per owner. Production createComponent makes no
owner, so sibling mounts and <For> rows all reused the first mount's
data-fid and the client could adopt only the first. Key the cache by the
hydration position instead (owner, scope slot, child count): a retry at the
same position still reuses its site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
The render's wind-down ends a frame stream's writable with end() on success
and failure alike, so a rejection with no server boundary answered a bare
:complete. renderToStream now tells a custom sink about the failure
(sink.failed) before it winds down, and the frame stream answers it with
the same :error record a synchronous throw does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
serverComponentResponse built its Response right after the sync pass, so a
failure before the shell (async read at the root with no <Loading>) could
not reach the head and a cacheable response kept its cache headers. It now
resolves at the shell, as createSSRResponse does for a document: a failure
before it answers no-store with the :error record. After the shell
everything streams as before.

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

The client keys a call's content, binding and version by its frame address,
but the argument digest's text was ambiguous (1 and "1", ["a,b"] and
["a","b"], every URL/URLSearchParams as {}) and folded with h*31+c, so
two calls could share an address and one mount showed the other's markup.
Strings and keys are quoted, class instances carry their string form, and
the fold is FNV-1a. Harness artifacts re-recorded for the new addresses.

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

Accepted by the maintainer 2026-12-04. Numbers from CI size head job
144913328286; recorded minified = measured, caps at measured + 10 B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
…server outcome (#5223)

A <Loading> failing after the shell with no server <Errored> answering at
its position used to swap in an empty template, blanking the fallback until
the client hydrated (and forever without JS). The document sink now swaps
nothing in and only drops the pl-* markers; the fallback stays until the
client renders the failure over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
…ws on a keyed optimistic store (#5326)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
…settle seam (#5327)

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

changeset-bot Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ada8304

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

@ryansolid ryansolid self-assigned this Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 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.53 KB 0 B 0 B −124 B 7.56 KB ✅
signals: + createStore 14.55 KB 0 B 0 B −2718 B 15.16 KB ✅
signals: + isPending/latest 13.41 KB 0 B 0 B +20 B 13.43 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.26 KB 0 B 0 B +7 B 8.27 KB ✅
app: render + one signal (the simple-app floor) 9.79 KB 0 B 0 B −426 B 9.85 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 19.23 KB 0 B 0 B 0 B 19.25 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 34.08 KB 0 B 0 B −6130 B 35.45 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.77 KB 0 B 0 B −217 B 13.86 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.51 KB 0 B 0 B −221 B 15.59 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 30.08 KB 0 B 0 B −300 B 30.22 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.97 KB 0 B 0 B −498 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 −2736 B 26.80 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.58 KB 0 B 0 B −2497 B 33.10 KB ✅ stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.81 KB 0 B 0 B 0 B 11.82 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 34.41 KB 0 B 0 B 0 B 34.42 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.61 KB, wire.js 3.48 KB
page: live server components (base + live/GET + action + isPending/latest) 41.82 KB +21 B (+0.1%) +17 B +36 B 41.82 KB ❌ over by 1 B assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 8.61 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.27 KB 0 B 0 B 0 B 36.29 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.66 KB, wire.js 3.48 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 46.01 KB +41 B (+0.1%) +17 B +36 B 45.99 KB ❌ over by 22 B eager (counted): web.js 24.43 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.66 KB, wire.js 3.48 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.89 KB 0 B 0 B 0 B 41.91 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.77 KB +34 B (+0.1%) +17 B +36 B 51.74 KB ❌ over by 25 B eager (counted): client.js 29.76 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.64 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.77 KB 0 B 0 B −8 B 23.81 KB ✅

❌ Fails the gate

  • page: live server components (base + live/GET + action + isPending/latest): over brotli cap by 1 B; minified 125,786 B vs 125,750 B recorded with the cap (+36 B) — 16 B past the 20 B minified allowance; +17 B minified over this PR's base. real growth: reduce it, or raise the cap and its recorded minified in this PR with a reason (frozen floors need Size-Exception:)
  • page: compiled live server components (the compiled base page + live/GET + action + isPending/latest): over brotli cap by 22 B; minified 134,219 B vs 134,183 B recorded with the cap (+36 B) — 16 B past the 20 B minified allowance; +17 B minified over this PR's base. real growth: reduce it, or raise the cap and its recorded minified in this PR with a reason (frozen floors need Size-Exception:)
  • page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate): over brotli cap by 25 B; minified 151,841 B vs 151,805 B recorded with the cap (+36 B) — 16 B past the 20 B minified allowance; +17 B minified over this PR's base. real growth: reduce it, or raise the cap and its recorded minified in this PR with a reason (frozen floors need Size-Exception:)

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).

@codspeed

codspeed Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 15.01%

2 warnings

⚠️ 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 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 1 improved benchmark
✅ 19 untouched benchmarks
⏩ 190 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ arrow in template 12 ms 10.4 ms +15.01%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-pa6tia (123afcf) with main (e3bee61)

Open in CodSpeed

Footnotes

  1. 190 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. ↩

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 47516908384

Coverage remained the same at 79.703%

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: 1380
Covered Lines: 1160
Line Coverage: 84.06%
Relevant Branches: 1108
Covered Branches: 823
Branch Coverage: 74.28%
Branches in Coverage %: Yes
Coverage Strength: 31.45 hits per line

💛 - Coveralls

Moves #5335's cache: "no-store" from createRequest (in every server
functions page) to the live loop's wire options, so only live pages pay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLP5ZgG1wSyxASVwK
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.

[2.0.4] Firefox: second tab's live/broadcast connection stalls ~20s (live requests are GETs sent without cache: "no-store")

3 participants