Skip to content

fix(signals): a merged transaction's verdict lane is the same hold's at the D-28 seat (#4427) - #4455

Merged
ryansolid merged 7 commits into
nextfrom
claude/project-thread-x1ore2-4427
Oct 30, 2026
Merged

ryansolid merged 7 commits into
nextfrom
claude/project-thread-x1ore2-4427

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Before: a render effect seated as a hold's verdict reader (it reads latest() of a node B holds) left that seat when it read a verdict-lane derivation of a transaction merged into B. That derivation was stamped before the merge and still sits in A._verdict.

D-28's reset compared lane objects, so B's own merged lane looked like another hold's. The leaf was then served the staging as B's held work, and its run waited for B's landing, while the derivation it read was already on screen. The screen showed m = 20 beside a leaf still at 1/10, a tear (F-1).

After: the reset compares holds, so a merged transaction's verdict lane counts as the same hold's (D-28, D-4). The leaf stays seated, reads the lane's value, and shows it together with the derivation (1/20).

How

In laneRead, a seated leaf now leaves the seat only in three cases:

  • the node is in flight and has never shown;
  • the lane is not a verdict lane;
  • the lane's parent resolves to a different hold than the seat's.

Otherwise the leaf reads the lane as its own: it skips the stale-reader block, and enterLane links the two verdict lanes of the one hold. This is the V6 row of #4438's table.

This only runs with the lane engine installed. Nothing changes in recompute, and no effects are added. The structural fix for lanes keeping their pre-merge identities (#3905) is out of scope.

Also: readsHeld's loop (from #4449) is rewritten as for (let d = r._deps; d; d = d._nextDep), as retryReaches does, per the #4449 review. That saves 7 B minified. The #4438 seat-shadow known #4427 entry now gets 0 hits and is left in place for later cleanup.

Size vs next @ cddaa76 (measured locally, linux; next's ledger was re-recorded by #4462):

scenario brotli minified cap
compiled floor (hello world) 0 B (9,963) 0 B unchanged
signals: + isPending/latest +17 B +45 B 11.10 → 11.12 KB
app: hydrating + every store primitive family +93 B +45 B 32.45 → 32.48 KB
page: live server components (frozen floor) +22 B +45 B 38.83 → 38.85 KB
page: compiled live server components +20 B +40 B 42.71 → 42.73 KB
page: live + router +29 B +45 B unchanged (recorded minified re-recorded)

The brotli on the store scenario is mostly layout: the lanes.ts change renames a mangled property in store.js, which moves brotli on bundles whose minified size barely changes.

Size-Exception: the live server-components page carries the D-28 same-hold check that fixes #4427 (+45 B minified, +22 B brotli); correctness.

How did you test this change?

  • New packages/signals/tests/verdict-seat-merged-lane-4427.test.ts. On next the leaf stays at 1/10 beside m = 20; with the fix it passes.
  • Suites:
    • signals: 5,999 passed.
    • web: 1,559 passed.
    • hydrate: 715 passed.
    • server: server-functions-adapter-request fails the same way on next.
  • On the test(signals): reader seat — the slot table and shadow differential as a CI spec (S0+M1, byte-identical) #4438 shadow:
    • On next, the new test hits only known #4427; with the fix it hits nothing.
    • Generator 7 / 3289 / 91501 × 5,000 cases: the hit count goes from 1 to 0, with 0 mismatch classes. Screens, finals and findings are identical.

Fixes #4427


Generated by Claude Code

…ane objects (#4427)

`laneRead`'s D-28 reset (#4275, #4284) makes a leaf seated as a hold's
verdict reader leave the seat when it reads a lane that is not that
hold's. It decided that by lane identity (`passLane !== l`). A
transaction merged into the hold keeps its own verdict lane: a
derivation stamped before the merge stays in it. So the leaf read that
lane as another hold's. It was served the derivation's staging as the
hold's own work (L7'), and its run waited for the hold's landing while
the derivation it read was already on screen.

The reset now compares the holds. It leaves only when the node is in
flight and has never shown, when the lane is not a verdict lane, or when
the lane's parent resolves to a different hold than the seat's (D-4:
merged holds are one). The seated leaf then reads that lane as the
hold's own: the lane's value, the two lanes linked by `enterLane` as for
any pass that reads both.

Fixes #4427

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
…golf readsHeld's loop

`readsHeld` (#4449) now walks its deps as `retryReaches` does
(`for (let d = r._deps; d; d = d._nextDep)`), which saves 7 B minified
on isPending/latest.

Measured locally (linux) over next @ 7135a77. On page: live server
components (a frozen floor): 38,764 B brotli / 117,272 B minified, +45 B
minified, so the cap goes 38.76 -> 38.78 KB and floor-caps.json's
recorded minified 117,227 -> 117,272. On page: compiled live server
components: 42,690 / 125,414, so the cap goes 42.67 -> 42.70 KB and the
recorded minified 125,374 -> 125,414. Caps are at measured + 10 B
rounded up to 0.01 KB. Every other scenario passes the gate.

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

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 828aa89

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 30, 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 +13 B 7.43 KB ✅
signals: + createStore 14.95 KB −2 B (−0.0%) 0 B 0 B 14.97 KB ✅
signals: + isPending/latest 11.11 KB +17 B (+0.2%) +45 B 0 B 11.12 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.04 KB 0 B 0 B 0 B 8.06 KB ✅
app: render + one signal (the simple-app floor) 9.78 KB 0 B 0 B +13 B 9.78 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.75 KB 0 B 0 B +13 B 18.74 KB ⚠️ over by 5 B, 7 B minified headroom lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.47 KB +93 B (+0.3%) +45 B 0 B 32.48 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.45 KB 0 B 0 B 0 B 13.47 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.18 KB 0 B 0 B 0 B 15.20 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.76 KB 0 B 0 B 0 B 29.78 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.96 KB 0 B 0 B 0 B 9.98 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.30 KB −13 B (−0.0%) 0 B 0 B 26.33 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.51 KB +41 B (+0.1%) 0 B 0 B 32.52 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) 33.76 KB 0 B 0 B 0 B 33.77 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.84 KB +22 B (+0.1%) +45 B 0 B 38.85 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.70 KB 0 B 0 B 0 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 9.00 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 42.72 KB +20 B (+0.0%) +40 B 0 B 42.73 KB ✅ 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.18 KB 0 B 0 B 0 B 41.23 KB ✅ 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.01 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.39 KB +29 B (+0.1%) +45 B 0 B 48.44 KB ✅ eager (counted): client.js 27.91 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.04 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: hydrating (no stores) with Show/For/Loading/Errored/lazy: over brotli cap by 5 B; minified 53,598 B vs 53,585 B recorded with the cap (+13 B) — 7 B of the 20 B minified allowance left; +0 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).

@coveralls

coveralls commented Oct 30, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41065411805

Coverage remained the same at 78.1%

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: 1362
Covered Lines: 1125
Line Coverage: 82.6%
Relevant Branches: 1090
Covered Branches: 790
Branch Coverage: 72.48%
Branches in Coverage %: Yes
Coverage Strength: 29.82 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 13.54%

2 warnings

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

⚠️ 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 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
❌ projection derive: write one NESTED field (reference) 2.1 ms 2.5 ms -13.54%

Tip

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


Comparing claude/project-thread-x1ore2-4427 (828aa89) with next (cddaa76)

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 pushed a commit that referenced this pull request Oct 30, 2026
The #4400 case writes s, waits 3 ms, and writes again while a 10 ms ask is
in flight. On CI's coverage run the real gap outlived the ask, which landed
before the second write and asked `m1:23` (seen on #4455 and #4460). The
gaps are part of each scenario, so the file now advances fake timers
instead of sleeping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
ryansolid added a commit that referenced this pull request Oct 30, 2026
…er it lands (#4460)

* fix(signals): don't retain the transaction a latest() read opened after it lands

`pendingVerdict` (#4453) remembered the flush's transaction a `latest`
read of an unheld flight opened in a module-level `latestJoined`, compared
only against `flushTransaction` and never cleared: after the seam it kept
the last landed transaction (its `_nodes`, `_queues`, `_reruns`) alive
until the next such read overwrote it.

The mark now lives on the transaction itself (`Transaction.latest`), so
it ends with it. Same answer for every probe: a transaction stays the
flush's from its opening to the seam, a merge keeps the flush's own, and
one merged away is no longer anyone's flush transaction, as before. The
property is not `_`-prefixed (as `folded`), so the mangler's assignment
is untouched; only bundles importing `latest`/`isPending` change, and
they shrink (isPending/latest -13 B brotli, -10 B minified).

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

* test(signals): the #4393/#4400 two-reader specs run on fake timers

The #4400 case writes s, waits 3 ms, and writes again while a 10 ms ask is
in flight. On CI's coverage run the real gap outlived the ask, which landed
before the second write and asked `m1:23` (seen on #4455 and #4460). The
gaps are part of each scenario, so the file now advances fake timers
instead of sleeping.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
…-x1ore2-4427

# Conflicts:
#	scripts/size/floor-caps.json
#	scripts/size/scenarios.js
…-x1ore2-4427

# Conflicts:
#	scripts/size/scenarios.js

Copy link
Copy Markdown
Member Author

I don't think CodSpeed's −13.5% on projection-root-write "projection derive: write one NESTED field (reference)" comes from this PR. This bench file's single-run cases swing ±13–15% with the store module's byte size alone, because a V8 lazy sweep after the pre-run gc() either lands in the one measured run or misses it. #4456 is on the same base (next cddaa76) and shows the same bench at −13.2% with an unrelated diff. This PR changes only the verdict-lane pick at the D-28 seat, and the bench is a synchronous projection write with no hold or lane. The other 199 benches are untouched. I'm treating this as noise.


Generated by Claude Code

@ryansolid
ryansolid merged commit 131ceb8 into next Oct 30, 2026
8 of 9 checks passed
ryansolid pushed a commit that referenced this pull request Oct 30, 2026
… held-frame clause covers it

laneRead's D-28 seat reset goes back to comparing verdict lanes by identity.
With the held-frame clause, no shape depends on the hold comparison, and the
seat table's #4427 known entry no longer matches anything. -48 B minified on
the verdict pages.

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