Skip to content

fix(signals): a halt from a computed's error rethrows the user's error, not the status wrapper - #4423

Merged
ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-halt-rethrow-unwrap
Oct 29, 2026
Merged

ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-halt-rethrow-unwrap

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Before: when a memo's error reaches a render effect that no Errored covers, the system halts and rethrows. The rethrown value was Solid's internal StatusError wrapper, not the error the user threw. The wrapper's own source property is the reactive node. A flush in a microtask turns the rethrow into an unhandled rejection, so unhandledrejection / window.onerror and any error reporter got the wrapper, and serializing it walks the whole reactive graph. Vitest ran out of memory on the #4406 review repro (an Errored E1 replaced by a held E2, the #4410 shape) on next and on rc.19. In a plain node run the same scenario computes once, halts, and stays at about 6 MB.

After: the halt rethrows the user's error, which is the same value the REACTIVITY_HALTED message already reports. The repro now fails only on its [E E2] expectation, which the #4410 ruling says is correct.

How

escalate() in effect.ts halted with the unwrapped cause but took a separate value to rethrow, and the compute-error call site passed the wrapper there. Every caller now rethrows the cause it halts with, so the parameter is gone. That makes the floors 6 B smaller minified: the compiled floor measures 27,271 vs 27,277 B on next locally.

How did you test this change?

🤖 Generated with Claude Code

https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2

…r, not the status wrapper

escalate() halted with the unwrapped cause but rethrew the StatusError,
whose own `source` is the reactive node. A flush in a microtask turned
that into an unhandled rejection, and a reporter serializing it walked
the whole graph (vitest ran out of memory on the #4406 review repro).
Rethrow the user's error, as the halt message already reports it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 859106c

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

This PR includes changesets to release 15 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch
board-example Patch
canvas-example Patch
server-dbmon-example Patch
todos-server-example 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 Oct 29, 2026 •

Copy link
Copy Markdown

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.42 KB −2 B (−0.0%) −6 B +1 B 7.43 KB ✅
signals: + createStore 14.88 KB −51 B (−0.3%) −6 B +1 B 14.96 KB ✅
signals: + isPending/latest 11.03 KB −13 B (−0.1%) −6 B +1 B 11.05 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.04 KB −11 B (−0.1%) −6 B +1 B 8.06 KB ✅
app: render + one signal (the simple-app floor) 9.77 KB −2 B (−0.0%) −6 B +1 B 9.79 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.71 KB −36 B (−0.2%) −6 B +1 B 18.72 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.41 KB −25 B (−0.1%) −6 B +1 B 32.42 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.42 KB −9 B (−0.1%) −6 B +1 B 13.43 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.19 KB +49 B (+0.3%) −6 B +1 B 15.20 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.73 KB −52 B (−0.2%) −6 B +1 B 29.79 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.96 KB +1 B (+0.0%) −6 B +1 B 9.98 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.26 KB −39 B (−0.1%) −6 B +1 B 26.31 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.46 KB +16 B (+0.0%) −6 B +1 B 32.46 KB ⚠️ over by 3 B, 19 B minified headroom stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.75 KB 0 B 0 B 0 B 11.77 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 33.66 KB −48 B (−0.1%) −6 B +1 B 33.68 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 38.70 KB +22 B (+0.1%) −6 B +1 B 38.75 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 35.66 KB +13 B (+0.0%) −6 B +1 B 35.72 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 8.99 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 42.65 KB +20 B (+0.0%) −6 B +1 B 42.65 KB ⚠️ over by 4 B, 19 B minified headroom eager (counted): web.js 22.77 KB; assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.07 KB, sc-comments.js 0.19 KB, trace.js 9.07 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.17 KB −32 B (−0.1%) −6 B +1 B 41.16 KB ⚠️ over by 7 B, 19 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, server.js 1.03 KB, serverForms.js 3.57 KB, trace.js 9.02 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.31 KB +5 B (+0.0%) −6 B +1 B 48.31 KB ✅ eager (counted): client.js 27.89 KB; assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.03 KB, serverForms.js 3.30 KB, trace.js 9.00 KB, wire.js 3.49 KB
server: floor (getRequestEvent + isServer) 1.27 KB 0 B 0 B 0 B 1.29 KB ✅
server: renderToString (the server-render floor) 22.79 KB 0 B 0 B 0 B 22.80 KB ✅

⚠️ Over the brotli cap within the minified allowance (passes)

  • app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable): over brotli cap by 3 B; minified 100,730 B vs 100,729 B recorded with the cap (+1 B) — 19 B of the 20 B minified allowance left; −6 B minified over this PR's base
  • page: compiled live server components (the compiled base page + live/GET + action + isPending/latest): over brotli cap by 4 B; minified 125,267 B vs 125,266 B recorded with the cap (+1 B) — 19 B of the 20 B minified allowance left; −6 B minified over this PR's base
  • page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate): over brotli cap by 7 B; minified 125,417 B vs 125,416 B recorded with the cap (+1 B) — 19 B of the 20 B minified allowance left; −6 B minified over this PR's base

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

Every call site now rethrows the cause it halts with, so the parameter
goes: -6 B minified on the floors instead of +5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@coveralls

coveralls commented Oct 29, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 40926542469

Coverage remained the same at 78.259%

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: 1359
Covered Lines: 1125
Line Coverage: 82.78%
Relevant Branches: 1088
Covered Branches: 790
Branch Coverage: 72.61%
Branches in Coverage %: Yes
Coverage Strength: 29.75 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 200 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing claude/project-thread-x1ore2-halt-rethrow-unwrap (859106c) with next (4e1a83a)

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

@ryansolid
ryansolid merged commit e82efb0 into next Oct 29, 2026
9 checks passed
@ryansolid
ryansolid deleted the claude/project-thread-x1ore2-halt-rethrow-unwrap branch November 5, 2026 17:34
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.

3 participants