Skip to content

fix(signals): a lane reveals whole beside its parent's landing (#4677) - #4687

Open
ryansolid wants to merge 3 commits into
nextfrom
tembo/fix-4677-lane-split
Open

ryansolid wants to merge 3 commits into
nextfrom
tembo/fix-4677-lane-split

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Summary

Fixes #4677 (issue's repro): an async memo that reads isPending(id) published pending: true while an isPending(id) binding beside it still showed false.

Checked against docs/RULES-FUNDAMENTALS.md / RULES-DERIVED.md. The badge memo is a verdict reader (D-25), so its async opens a lane (F-6). When details landed first, the parent (the write to id) waited on the lane's flight, so the lane and the parent landed at the same seam. The landing's reruns voided the verdict binding's stashed lane run (the run is for the frame being replaced) while the badge's run from the same lane still showed. The lane split, breaking F-6 (its readers show its answer together) and F-1.

Ruled screen (reading A, confirmed with the maintainer): the lane reveals whole, then everything moves at the badge's re-derived landing.

details lands   id 0 | Item 0 | pending false | ID: 0, pending: false
lane lands      id 0 | Item 0 | pending true  | ID: 0, pending: true    (was: pending false)
re-derivation   id 1 | Item 1 | pending false | ID: 1, pending: false

Fix (lanes.ts laneSeam, about 10 lines, pay-for-use lane engine only). When a revealing lane has other runs that show, the runs its parent's landing would void are restored ahead of the lane's runs, so they show together. The landing's re-derivation still follows next round. The guard (more lane runs than restored ones) keeps a lane holding only voided runs (e.g. a first load) unchanged.

Still open, pinned it.fails. In the second order (the lane lands first, then details), the landing flush's own run (details: Item 1) shows beside id: 0, while the held runs park with the badge's re-derivation (U-5): an F-1/F-7 tear the issue doesn't mention. Deferring the flush's own runs with the held runs breaks #4398's grouping parity (latest-first-one-pass-4402.test.ts), where the held runs are only verdict readers. Telling the two apart would need new run-queue bookkeeping, so that's left for a follow-up.

Public API changes

None.

Size

+111 B minified on the five rows that carry the lane engine; every floor and every non-lane scenario is unchanged. The second commit re-records them in this PR (not in a batch), together with #4682's +7 B, which hadn't been re-recorded and had already put the live page 50 B over its cap:

scenario cap recorded minified
signals + isPending/latest 12.07 → 12.12 KB 33,081 → 33,199
app: hydrating + every store family 33.27 → 33.32 KB 99,967 → 100,078
page: live server components (frozen floor) 40.14 → 40.21 KB 120,619 → 120,737
page: compiled live server components 44.19 → 44.24 KB 128,866 → 128,984
page: live + router 49.86 → 49.90 KB 146,432 → 146,550

Measured locally (compiler built from source, then pnpm build, as in size.yml) over next @ 5208944, with and without the fix. CI's numbers may differ by tens of brotli bytes.

Size-Exception: #4677 lane-split fix (+111 B minified on lane pages) plus #4682's unrecorded +7 B, re-recorded on the live-page floor at the maintainer's request.

How did you test this change?

  • packages/signals/tests/ispending-async-derivation-4677.test.ts: the baseline order, the issue's order (fixed; it failed before the change at exactly the split frame), and the second order pinned it.fails at its ruled screen.
  • @solidjs/compiler build, then pnpm build: 30/30 tasks.
  • signals: 6691 passed / 15 expected fail. solid: 926 passed. web: 1706 + 2007 + 758 passed across its three configs, on Node 24 (.nvmrc). On Node 22 one server-function test fails because Node 22's Request accepts a non-AbortSignal signal; that's unrelated to this change.
  • node scripts/size/size.mjs: the gate passes. check-floor-caps.mjs passes with the Size-Exception line above.

Want tembo to make any changes? Add a comment with @tembo and i'll get back to work!

View on Tembo  Review in Tembo  View Agent Settings

ryansolid and others added 2 commits November 4, 2026 22:40
An async memo over isPending(x) showed 'pending: true' beside an isPending(x) binding still false: the parent landing at the lane's seam voided the binding's lane run while the memo's run showed. The voided runs now show with the lane's (F-6, F-1); the landing's re-derivation follows next round. The second order from the issue (a landing flush's own run shown beside held runs parked with a re-derivation, F-1/F-7) is pinned it.fails.

Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
Five rows, +111 B minified each from #4677 and +7 B from #4682 (not re-recorded yet): signals + isPending/latest, app hydrating + every store family, the live page (a frozen floor, Size-Exception in the PR body), the compiled live page and live + router. Measured locally over next @ 5208944 with the in-repo compiler build; caps are measured brotli + 10 B.

Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
@tembo tembo Bot added tembo Pull request created by Tembo labels Nov 5, 2026
@changeset-bot

changeset-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1e4d374

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 Nov 5, 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 0 B 0 B −98 B 7.43 KB ✅
signals: + createStore 15.09 KB 0 B 0 B 0 B 15.10 KB ✅
signals: + isPending/latest 12.11 KB +49 B (+0.4%) +111 B 0 B 12.12 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.04 KB 0 B 0 B −91 B 8.06 KB ✅
app: render + one signal (the simple-app floor) 9.80 KB 0 B 0 B −157 B 9.80 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 19.01 KB 0 B 0 B −7 B 19.05 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 33.31 KB +46 B (+0.1%) +111 B 0 B 33.32 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.71 KB 0 B 0 B −7 B 13.73 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.45 KB 0 B 0 B −7 B 15.50 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 30.08 KB 0 B 0 B −7 B 30.12 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.98 KB 0 B 0 B −194 B 9.98 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.65 KB 0 B 0 B 0 B 26.67 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.93 KB 0 B 0 B 0 B 32.95 KB ✅ 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) 34.05 KB 0 B 0 B −7 B 34.11 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.30 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 40.19 KB +2 B (+0.0%) +111 B 0 B 40.21 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.27 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.98 KB 0 B 0 B −7 B 36.00 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 9.26 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 44.22 KB +62 B (+0.1%) +111 B 0 B 44.24 KB ✅ eager (counted): web.js 23.54 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.28 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.59 KB 0 B 0 B 0 B 41.60 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.58 KB, trace.js 9.24 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 49.88 KB +25 B (+0.1%) +111 B 0 B 49.90 KB ✅ eager (counted): client.js 28.75 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.27 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.86 KB 0 B 0 B 0 B 22.87 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 41982111029

Coverage remained the same at 78.249%

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: 1370
Covered Lines: 1132
Line Coverage: 82.63%
Relevant Branches: 1108
Covered Branches: 807
Branch Coverage: 72.83%
Branches in Coverage %: Yes
Coverage Strength: 30.13 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Nov 5, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

2 warnings

⚠️ 2 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

⚠️ 2 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes 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
❌ 1 regressed benchmark
✅ 199 untouched benchmarks
⏩ 5 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ dbmon partial tick 46.6 ms 49.2 ms -5.3%
⚡ arrow in template 11.5 ms 10.9 ms +5.76%

Tip

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


Comparing tembo/fix-4677-lane-split (23fbf23) with next (5208944)

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

…plit

Co-authored-by: Ryan <ryansolid@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tembo Pull request created by Tembo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants