You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ce4011
Browse filesBrowse the repository at this point in the historyBrowse files
fix(solid): a served pass never swallows a client write
A served answer's arrival is hydration's own pass (NO_CLAIM): a latched
node re-running there re-serves its server answer. A client write
carried by that same flush must still make the node compute.
- Client writes already made (pending, unflushed) flush first, outside
the pass (`servedPass`). The async runtime's landing flushes
synchronously, and that flush would otherwise carry them.
- The pass covers only the flush round its served write lands in
(`_servedAt = clock`). An effect's write runs in a later round of the
same flush, and a latched node re-run there computes. The latch tests
`clock > _servedAt`.
`@solidjs/signals` exports its flush-round counter (`clock`), an
internal live binding, at 0 B.
Landings cannot be coalesced into one pass per microtask batch without
changing signals. `asyncWrite` already flushes synchronously on every
landing (`schedule(); flush()`) at the #4308 head, so a served pass
adds no flush per landing. Its trailing `flush()` is a no-op after a
value landing.
Tests: in served-source-landing, a write before the flush and an
effect's write in the landing's flush both give the written value with
1 ask. Both fail on 2b2990a.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
A served answer's arrival during hydration no longer swallows a client write made in the same flush. Writes made before the arrival flush first, outside hydration's own pass, and a write made during it (an effect's, a later round of the flush) makes a node it reaches compute, so the node shows the written value instead of re-serving the server's answer. `@solidjs/signals` exports its internal flush-round counter (`clock`) for this.
0 commit comments