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
[2.0 / next] Outside latest reads of a derivation expose errors and values at different times #4106
With derived = createMemo(() => latest(source)), outside reads of latest(derived) expose successful and failed outcomes at different points during a held update.
A successful result becomes readable before the frame reveals. A rejection only becomes observable through the derivation after reveal, even though direct latest(source) already throws it. An async sibling keeps the frame held in both cases.
Wait for Derived effect: 1 and Committed round: 1. The Read latest button samples both accessors from an event handler, outside a reactive computation.
Rejected result:
Click Start update, then Reject source.
Click Read latest. The output shows latest(source): boom but latest(derived): 1. The read helper catches thrown errors and displays their messages. The committed round remains 1 because the sibling is still pending.
Click Release sibling, then Read latest again. Both reads now throw boom, and the committed round is 2.
Successful result:
Reload the playground.
Click Start update, then Resolve source to 2 (control).
Click Read latest before releasing the sibling. Both reads already return 2, while the committed round remains 1.
Expected behavior
Outside reads should follow a consistent publication rule for successful and failed outcomes.
The point at which latest(derived) exposes a new outcome should not depend on whether the source fulfills or rejects.
Fixed by #4129, which carries @brenelz's #4113 and is now merged into next (7093b07). Outside a latest read, a derivation now shows a held error at the same time it would show a held value. The tests in that PR fail on the previous next and pass now. It ships in the next 2.0 RC.
Activity
test(signals): pin a guess-lane derivation throwing its mainline error (
fix(signals): a held error reaches a derivation of latest when a valu…
ryansolid commentedon Oct 18, 2026
Generated by Claude Code