Skip to content

Commit 1ea6374

Browse files
fix(signals): latest() of an uninitialized source throws in every scope; rule the oracle's open cells
latestRead's NotReady fallback served the visible value when the caller was unowned OR the source was initialized; an uninitialized source read from an event handler therefore returned undefined — a value latest<T>'s type excludes. The condition is now the initialized case only. isPending is unchanged (an unowned probe answers false, which boolean admits). Rulings recorded in SPEC-ASYNC-SEMANTICS.md (2026-09-14, from the visibility oracle's first run): - A7 amended: before the first landing latest() throws, never undefined. - A16 wording corrected: the boundary is ownership (context === null), not tracking — untrack() inside an owner propagates NotReady. - A17 authoritative-reader carve-out: until()'s predicate reads the landed world (staged values included, before they are visible), never the caller's optimism. - A32 (new): children-forbidden readers (createTrackedEffect, onSettled) see the frame — committed values and a displayed override — never a held write; they cannot enter a hold on their own. - Observer dependence of a fresh derivation over a pending node recorded as inherent (the frame is identical either way). Oracle: 18 unspecified cells → 10, of which 7 are pre-flush cells parked on A28 (#3337). Three violation cells stand. Co-authored-by: Cursor <[email protected]>
1 parent d901abe commit 1ea6374

5 files changed

Lines changed: 92 additions & 85 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
`latest()` of an uninitialized async source now throws `NotReadyError` in every scope. Unowned callers (event handlers, imperative code) used to receive `undefined` — a value the accessor's type excludes — because the uninitialized case shared the pending-shadow fallback's condition in `latestRead`. `isPending()` is unchanged: an unowned probe still answers `false` (A16), which `boolean` admits. Spec: A7 amended, A16 wording corrected (the boundary is ownership, not tracking), A17 authoritative-reader carve-out ruled, A32 added (children-forbidden readers see the frame).

0 commit comments

Comments
 (0)