Skip to content

fix(signals): a removed optimistic row stays removed when another removal's refresh lands (#4441) - #4458

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

ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-4441

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Summary

Before: with two removals pending on an optimistic keyed list, a refresh that landed for the first one brought its removed row back. The lane's re-base wrote its composition over the guess (view.rows). The derive's key-by-key landing then appended a truth row that a partial write had shown, and that row stuck.

After: each re-base composes from the rows the guess actually wrote, over the latest truth (D-35, F-11). A removed row stays removed until its own removal resolves.

How

LaneView keeps the guess as written in a new g field. _laneRebase composes from g instead of from view.rows: const guessed = (view.g ??= view.rows).

Size vs next @ 7135a77: the compiled floor (hello world) is unchanged. app: hydrating + every store primitive family is −31 B brotli / +6 B minified. No cap is crossed.

How did you test this change?

  • New packages/signals/tests/optimistic-removed-row-returns-4441.test.ts. It fails on next.
  • Suite results:
    • signals: 6,002 passed.
    • web: 1,559 passed.
    • server: 1,904 passed. server-functions-adapter-request also fails on next. errored-loading-superseded-pass-3750 failed once under load and passed 2 of 2 reruns.
    • hydrate: 716 passed.

Fixes #4441


Generated by Claude Code

)

A keyed arrangement guess re-based over an older truth (`_laneRebase`)
wrote the composed rows back into `view.rows`, and the next re-base
composed from those. A derive's landing writes key by key (`d.length = n`,
then `d[i] = row`), so each partial write re-bases: the first one showed
the old row at the truncated length, the re-base appended it as a truth
row the guess lacked, and from then on it was part of "the guess". The
removed row came back once the refresh landed (D-35, F-11). Each re-base
now composes from the guess as the setter wrote it (`view.g`).

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: 07bda74

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

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 0 B 7.43 KB ✅
signals: + createStore 14.88 KB 0 B 0 B 0 B 14.89 KB ✅
signals: + isPending/latest 11.06 KB 0 B 0 B 0 B 11.07 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.77 KB 0 B 0 B 0 B 9.78 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.73 KB 0 B 0 B 0 B 18.74 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.40 KB −31 B (−0.1%) +6 B +6 B 32.45 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.42 KB 0 B 0 B 0 B 13.43 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.19 KB 0 B 0 B 0 B 15.20 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.73 KB 0 B 0 B 0 B 29.74 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.26 KB 0 B 0 B 0 B 26.27 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.42 KB 0 B 0 B 0 B 32.43 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.65 KB 0 B 0 B 0 B 33.66 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.74 KB 0 B 0 B 0 B 38.76 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.65 KB 0 B 0 B 0 B 35.66 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.66 KB 0 B 0 B 0 B 42.67 KB ✅ eager (counted): web.js 22.75 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.22 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.02 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.40 KB 0 B 0 B 0 B 48.42 KB ✅ eager (counted): client.js 27.95 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 ✅

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 41043974575

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.9 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 4 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-4441 (07bda74) with next (7135a77)

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 5f07d04 into next Oct 30, 2026
9 checks passed
ryansolid added a commit that referenced this pull request Oct 30, 2026
…ad; seat rows D1''/L1''/V3'' (#4472)

* fix(signals): a netted write read in a strict untrack is no staged read; seat rows D1''/L1''/V3''

#4452 made a signal's staging equal to its committed value (writes that
netted, D-8) a read of the screen in `read`'s fast block. The reader-seat
table still raised Fl on that read (rows D1 / L1 / D7, and V3 for a
verdict reader), so the shadow's seat parted from the flags and every
later read of the pass reported too ("world after the read", "verdict
seat after the read", B2 "born held"): 8 INV-seat-3 classes (x59) in the
signals suite, 7 in web, and 60 in the generator (37 / 35 / 43 at 2,000
cases x seeds 3289 / 91501 / 7, every pair). Bisected over every merge
7135a77..131ceb8: 0 before #4452 (66c6f56), 60 at it, none added by
#4453, #4458, #4460, #4454, #4457 or #4455. The runtime follows the rule
(D-8: a tick whose writes net to the committed value made no proposal),
so the table was stale: rows D1''/L1'' (D7'' in a lane) and V3'' serve P
and raise nothing. Shadow: 0 classes in signals, web and the generator.

With the rows in, the shadow found the path #4452 missed: in dev a
labelled `untrack` read (`strictRead`) takes the slow path, where `serve`
still called `stagedRead`, so dev held the errored re-run that prod (fast
block) does not. `serve` now skips it for a netted signal in dev; prod
folds the test away (0 B on every scenario).

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

* fix(signals): gate serve's netted skip on the strict read, not on dev

Only the strict untrack read skips the fast block in dev; a hydration
snapshot or a promoted write reaches serve in dev and prod alike and keeps
the staged-read mark. 0 B in prod.

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