Repository navigation
Commit ed85ca2
fix(signals): a lazy memo woken after a missed landing catches up on the committed world (#4474)
Ruling (2026-10-30): laziness is never observable (D-22). A memo released
unread at its source's landing (#2934) and woken in a flush that re-asks
the source reads as a memo a prior reader kept alive would: `latest()` of
it is the landed value and `isPending()` of it `true`, in either read
order within the mount.
The fix is at the wake (`wake`, core.ts) and distinguishes two dormant
memos. One with a committed value re-runs on this flush's world; its plain
read of a flight with a committed value is served that value (`read`)
instead of throwing — the landing it missed — and after the pass it is
marked pending on each such flight, as `propagateStatus` would have. One
with no committed value (`commitPendingNode` keeps a released node
uninitialized) catches up on the committed world: a staging of this flush
is read as its committed value (`read`, `serve`, `verdictValue`) and the
memo re-derives over the staging or verdict lane after. A first landing's
staging and the memo's own staged landing are not a screen's. Verdict
readers and boundary outputs are re-derived rather than marked (A19); a
catch-up that errored re-derives at the landing (`_blocked`, D-41).
Also: a pass thrown on a flight clears `_pendingSources` beside setting
`_blocked`, so the retry at the landing is not skipped as already waited
(the generator's seed 7 #6390 regressed without it).
Co-authored-by: Cursor <[email protected]>1 parent 25b94f0 commit ed85ca2
11 files changed
Lines changed: 864 additions & 30 deletions
File tree
- .changeset
- packages
- signals
- docs
- src/core
- tests
- web/test
- async-gen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments