Skip to content

Commit 9baaba3

Browse files
ryansolidclaude
andauthored
fix(signals): latest() of a memo born in a lane throws NotReady, not undefined (#4362, #4363, #4376) (#4383)
* fix(signals): latest() of a memo born in a lane throws NotReady instead of undefined (#4362, #4363, #4376) A memo whose compute reads latest(s) is re-asked as the write's verdict lane work, so it becomes a lane derivation. While its first pass is in flight, nothing is in the lane, and laneValueOf/display fell back to the committed value, which an uninitialized node does not have: - latest(m)/isPending(m) served undefined and probed it pending (#4363); - the lane's end committed that undefined as the node's answer and cleared STATUS_UNINITIALIZED with the flight still up, which tripped the flush loop guard for [latest(m), isPending(m)] (#4362); - in hydration, m2 = fetchC(1 + latest(m1)) asked fetchC(NaN) instead of adopting the streamed answer (#4376). laneValueOf/display now return NOT_PENDING for such a node, so every read throws NotReady (A7; A19 exc. 1) and the lane's end leaves the node in flight. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): keep a verdict reader's lane routing and own-error recovery (async-gen #119, #1238) - verdictValue: read the lane value before routing the reader into the verdict lane, so a node born in the lane with nothing in it yet is read as any uninitialized node (NotReady) without moving its reader (#1238). - reruns: a stale reader whose error is its own (thrown by its pass over the committed value it was served) re-derives at the landing; only an error from an errored source is skipped (#3945). With #4363 no longer committing `undefined`, async-gen case 119 reached this stuck error. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * chore: re-measure sizes over next @ 40cde2c, record async-gen improvements - scripts/size: ledger lines for `signals: + isPending/latest`, the compiled live page and live + router (+46/+46/+47 B minified over next); this PR's store-app line re-measured (97,019 B). - async-gen baseline: 15 recorded failures no longer reproduce (10 undefined-value, 4 final-screen, 1 unhandled-rejection). - RULES-INDEX regenerated; changeset notes the error recovery. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): re-derive a self-errored stale reader at the lane's end, not in reruns The verdict reader's own error from a served committed value (async-gen #119) now re-derives from `dissolveLane` (lane engine only) instead of a widened `reruns` condition, so the floors pay nothing (0 B; the lane scenarios +20 B over the previous form). `reruns` is next's again. Ledger re-measured; async-gen baseline unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): the lane's end re-derives a render effect's own stale error too The re-enqueue of a self-errored stale reader at the lane's end sat inside the non-effect branch, so a render effect whose display-ahead pass threw over a held write's screen value kept its error after the landing (found by the #4365 thread). It now applies to both. Byte-neutral (0 B minified in every scenario); floors 0 B. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): an async memo over a verdict memo asks each question once A memo that reads a verdict memo is a verdict reader (F-6, #4050), and propagateStatus re-derived every verdict reader when its source went pending. Re-derived, an async one was served the committed value it had already derived from (A10) and asked that question again; that flight held the verdict lane, and the source's held landing re-ran it as lane work onto the same committed value, a third ask. Only the landing's re-derive asked the new question. Now an async memo that is a verdict reader only by reading a verdict memo (it opened no isPending/latest window of its own: REACTIVE_WINDOW, set per pass by markVerdictReader) drops CONFIG_VERDICT when that memo goes pending and takes the plain pending mark: it is pending through the flight (F-9) and the hold's work until it lands, reading plainly (D-25, #3884), and asks once at the landing. Sync readers re-derive as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * test(signals): with #4383, isPending of the unresolved m1 holds its Loading, so the unheld latest case asks like the held one Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * docs(signals): regenerate RULES-INDEX Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): an async memo with no verdict window of its own takes no verdict role #4397 review: with two verdict sources (`m1 = ask(1 + m0() + m0b())` over `m0 = ask(1 + latest(s) + s())` and `m0b = ask(10 * (latest(t) + t()))`), the grouped `[isPending(m1), m1()]` reader asked `m1:5` a second time on stale inputs after both sources landed. m1 lost CONFIG_VERDICT when its first source went pending, but a pass that threw NotReady at that source's read picked it back up (F-6, `read`). The settle walk then re-ran m1 as a verdict reader, and the committed values a hold had moved past were served to it (A10). The demotion is now per pass, in `recompute`. An async memo (new CONFIG_ASYNC: its last answering pass registered a flight) whose pass opened no isPending/latest window of its own (REACTIVE_WINDOW) does not become a verdict reader by reading a verdict memo. It waits on its sources like any derivation (F-9), reads them plainly (D-25), and asks each question once. The side-effecting clear in `propagateStatus` is gone, since that path no longer sees such a memo as a verdict reader. Pinned: two verdict memos into one async memo, grouped and split, with no question asked twice and equal final screens. A `test.fails` pin records that the grouped shape still skips the t lane's m1:15/m1:16 asks that split makes: whether a later write merges into an open transaction or opens its own lane depends on grouping (#4398). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a grouped reader over a held write shows the lane's answer A reader that groups isPending with the value over a held write (`[isPending(m1), m1()]`) never showed m1's lane answer, though a plain value reader did. Two things kept it out: - A pass served a held node's committed value (frameRead, a stale reader of the hold) still kept the node's propagated pending sources, so when it went pending on another source it never woke when that source settled. frameRead now drops what the served node propagated onto it (A15): the landing re-derives it. - A lane's reveal (reruns on a lane) cleared REACTIVE_FRAME_READ, the mark the held transaction's landing needed to re-run the reader. Only the transaction's own reruns clear it now. CONFIG_ASYNC is worked out once, at the end of each pass, from the pass's `_inFlight` (registered a flight: async; answered sync: not; pending or errored without a flight: the last answer's), so a plain sync recompute does no extra work and handleAsync no longer touches it. refresh(m0) mid-hold now shows the lane's answer for the refreshed question in every reader shape. Pins for the held write, an equal landing, and refresh after and mid-hold cover the value, pair and split readers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * test(signals): name frameRead in the held-shapes pin comment Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * chore(size): re-record this PR's four sizes over next @ 7ebd4a3 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): an async memo over a verdict memo stays a verdict reader (D-25) Review of #4397: the strict rule (an async memo with no `latest`/`isPending` window of its own took no verdict role at all) overrode D-25 ("one that reads a verdict reader's value is ... a verdict reader itself"; "a memo computes under its own posture"). It caused two regressions against next: 1. Memo-extracted `latest()` (`v = createMemo(() => latest(s))`, `m1` async over `v()` and `s()`): m1's pass at the write read the transaction's staging and asked m1:220, the lane re-derived it (m1:120), and the landing asked m1:220 again. It now asks m1:120 then m1:220, once each, as the inline form does (D-22, F-9 exc. 2), showing v120 then v220 (F-6). 2. A reader disposed and remounted while the lane answer was in flight: `[isPending(m1), m1()]` in one effect showed true,4 -> true,5 -> false,6 while `m1()` alone and split showed 4 -> 6. All shapes now show the screen, then the landing (F-6: grouped holds like a lone read; D-26). The strict rule is gone. In its place, D-25's "a node whose fetch a hold is waiting on is that hold's work" (#3884), kept by the verdict engine (verdict.ts `holdWork`, behind `holdWorkHook`, like `observeFlightHook`): - A verdict source going pending does not re-derive an async memo with no window of its own: none of its reads changed, and re-derived it was served the committed value it had already derived from and asked that question again (A10). It waits on the source like any derivation (F-9). Except when its own flight is up outside a lane on a new question of the source's: that re-run supersedes a flight asked of a value the source has moved past (a `refresh()` re-ask is the same question). - A held re-run of such a memo reads plainly, as a pending one already did (#3884): the write that re-ran it is its hold's. - Its async posture (CONFIG_ASYNC) is kept at each pass end in verdict.ts, not computed in core. Kept from the PR, as review asked: the frame read's drop of a served flight's pending (A15; now in lanes.ts `laneServed`, behind a hook, run only for lane work and verdict readers, with no closure), and `reruns` leaving the stale-reader mark to the transaction at a lane's reveal. Pins (tests/verdict-memo-flight-no-reask.test.ts): the memo-extracted and inline forms ask m1:120, m1:220 once and show v110, v120, v220 in every reader shape (D-22, D-25, F-6); a reader remounted mid-flight shows the screen, then the landing, grouped as alone or split (F-6, D-26). Both fail on the previous head. Size: the floors are +14 B minified over next (was +126). The verdict scenarios carry the rule: + isPending/latest +339 B. Ledger lines and the frozen live-server-components floor are re-recorded to the measured sizes (Size-Exception: floor-caps.json 115,423 -> 115,646 B minified, measured 38,197 B brotli; the maintainer relaxed the size rule for this fix). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * test(signals): pin the remount shapes on what holds whatever the timing CI ran the "remounted mid-flight, then a write" pin slower than local runs: the landing's `m1:6` was asked before the remount in the grouped run and after the write in the lone run, so comparing one shape's asks against another's compared two timings, not two shapes. Run at a later remount locally, every shape asks `m1:6` alike, and none diverges. The pin now states what holds at any timing, per shape: no question asked twice (F-9), the lane's `m1:5` never shown to a reader mounted mid-hold (D-26), and the grouped `[isPending(m1), m1()]` ending on the landing like the lone read (F-6). The no-write case still fails on the strict rule's head, where the grouped remount showed `true,5`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * test(signals): land the extracted pin's flights by hand, not by timer CI's coverage run (slower than a plain run) let m1's 10 ms lane flight land before the pin's 2 ms sleep ended, so the later write came after the landing and the run asked m1:220 where the pin expects m1:125. The pin compared two timings, not two behaviours. m1's flights now land only when the test lands them, so the later write always comes while the write's flights are up. The pin's expectations are unchanged (D-25, D-22, F-6, F-9), and it still fails on ee0b535's source in all three reader shapes (the m1:220, m1:120, m1:220 triple ask). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): only an async memo with no window of its own is hold work (D-25) Review of #4397: REACTIVE_WINDOW was wiped at the pass tail, and both of holdWork's consumers (the pass head and propagateStatus) run between passes, so `own` was CONFIG_ASYNC alone. The rule hit every async verdict memo, including one that calls latest()/isPending() itself, and changed screens against next on the canonical F-6 shape: an async memo over `${isPending(m0)}:${latest(m0)}` never showed the lane's true:2, and one over latest(m0) read through [isPending(m1), m1()] skipped l1 and showed true,l1. CONFIG_ASYNC is now set at the pass end, while the pass's REACTIVE_WINDOW is still up, only for a pass that registered a flight and opened no window; a pass that opened one clears it. A memo that asks is a verdict reader whoever dirties it (D-25, ruled 2026-10-28), unchanged from next. The held re-run arm applies only to memos that never asked; removing it reasks m1:5/m1:104/m1:15 in five pins, so it stays, documented against D-25. Pins: the two own-window shapes, as next shows them (D-25, F-6). The pin file takes the hand-landed flights from the split prepared for review, so no pin races a timer. Ledger re-records dropped: the size ledger is re-recorded once on next after the batch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * perf(signals): keep D-25's async posture off recompute's hot path CONFIG_ASYNC is now set where a flight registers (handleAsync) and cleared by a verdict window (markVerdictReader) or a sync answer, instead of a holdWork call at every pass's end. The pass-head check is inline. holdWork only answers propagateStatus. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): an error clears D-25's async posture A pass that throws a real error answers with no flight of its own, so a verdict source going pending re-derives the memo instead of holding it on its pre-error value (F-1). Pinned, held and unheld. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a stale reader's own error re-derives at any landing, not only a lane's end With #4383 the lane's end no longer commits `undefined` for a node that has produced nothing (#4363), so a sync memo that errored before its first value (async-gen 91501 #1158: m1 = m0 + 1 throws at m0 = 1) stays uninitialized through the next lane's end. Its next pass, under the transaction a `latest()` read opened, is "a pass with no value yet": `stagedScreen` serves it the screen (m0 = 1, not the staged 4) and lists it as a stale reader to run again at the landing. That pass throws its own error, and `reruns` skipped every errored reader whose error source is errored -- its own included -- so it never ran again and the root stayed on [ROOT-E]. On next the memo had been initialized as `undefined`, so it read the staging instead and never hit this. `reruns` now re-derives a reader whose error is its own (A15; D-39: the landing is the new answer), as #4383 first did (1e270cd). That also covers the lane's node case, so the `dissolveLane` re-enqueue (3fc3ef1, 15b9419) goes: +11 B minified on the floors, -27 B on the lane scenarios. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 --------- Co-authored-by: Claude <[email protected]>
1 parent f94dcd5 commit 9baaba3

13 files changed

Lines changed: 606 additions & 68 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
`latest()`, `isPending()` and plain reads of an uninitialized async memo now throw NotReady (A7) while the memo is re-asked as a verdict lane's work, for example when its compute reads `latest(s)` and `s` changes. Before, they returned `undefined`, and the lane's end committed that `undefined` as the memo's first answer, which tripped the flush loop guard (#4362, #4363). During hydration, a chain of memos over `latest()` adopts the streamed answers again instead of asking `fetch(NaN)` (#4376).
6+
7+
A memo that reads `latest()` and throws over the committed value of an async input it was served while that input was in flight now re-derives when the input lands, so an `<Errored>` it tripped recovers (D-39). Before, the error stuck until some other input changed.

‎packages/signals/docs/RULES-INDEX.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
2222

2323
| vocabulary | rules | cited in src | cited in tests | cited nowhere |
2424
|---|---|---|---|---|
25-
| A | 34 | 19 | 34 | 0 |
25+
| A | 34 | 20 | 34 | 0 |
2626
| V | 5 | 1 | 5 | 0 |
2727
| B | 5 | 1 | 5 | 0 |
2828
| C | 4 | 0 | 3 | 1 |
@@ -51,19 +51,19 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
5151
| A4 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:345` | — | derived-write-then-derivation-3733.test.ts×1 equals-comparator-errors.test.ts×1 | [ruled] A custom `equals` never sees `undefined` prev on first commit — A custom `equals` is never invoked with `undefined` previous value on a node's first commit. |
5252
| A5 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:353` | — | derived-write-then-derivation-3733.test.ts×1 errorHalt.test.ts×1 | [ruled] An error escaping every boundary halts the system — An error escaping every boundary permanently halts the system with `REACTIVITY_HALTED`; later writes log "Update ignored". |
5353
| A6 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:361` | boundaries.ts×2 | derived-write-then-derivation-3733.test.ts×1 enforceLoadingBoundary.test.ts×1 | [ruled] `ASYNC_OUTSIDE_LOADING_BOUNDARY` is warn-only — `ASYNC_OUTSIDE_LOADING_BOUNDARY` is a warn-only diagnostic; an `Errored` above must not swallow it and must not show its fallback for a pending. |
54-
| A7 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:167` | — | fuzz-findings-l2.test.ts×1 spec-async-semantics.test.ts×2 visibility-oracle-store.states.ts×1 visibility-oracle.states.ts×1 visibility-oracle.test.ts×1 | [ruled, amended in place] Resolved async never reads `[false, undefined]` — After an async memo resolves, `[isPending(x), latest(x)]` is `[false, resolvedValue]` — never `[false, undefined]`. **Amende… |
54+
| A7 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:167` | truth.ts×1 verdict.ts×1 | fuzz-findings-l2.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 spec-async-semantics.test.ts×2 visibility-oracle-store.states.ts×1 visibility-oracle.states.ts×1 visibility-oracle.test.ts×1 | [ruled, amended in place] Resolved async never reads `[false, undefined]` — After an async memo resolves, `[isPending(x), latest(x)]` is `[false, resolvedValue]` — never `[false, undefined]`. **Amende… |
5555
| A8 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:175` | — | create-deferred-3710.test.ts×1 createMemo.test.ts×1 visibility-oracle-store.states.ts×1 visibility-oracle.states.ts×2 | [ruled, amended in place 2026-07-07] `isPending(() => latest(x))` follows `x`'s own async only — verdicts are per-channel — (**re-ruled 2026-07-07c** — was "tracks the transition the same as `isPendin… |
5656
| A9 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:183` | projection.ts×1 target.ts×1 | spec-async-semantics.test.ts×3 visibility-oracle-store.states.ts×4 visibility-oracle-store.test.ts×1 | [ruled, amended in place 2026-07-07] Store leaves behind a firewall report the firewall's new-question refetch — `isPending` on a store leaf behind a firewall reports the firewall's refetch like any a… |
57-
| A10 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:191` | async.ts×1 core.ts×3 verdict.ts×3 | createMemo.test.ts×1 error-staged-recovery.test.ts×1 fuzz-findings-l2.test.ts×1 ispending-memo-unstamped-hold-3457.test.ts×2 latest-isPending-consistency.test.ts×3 verdict-contract.test.ts×2 verdict-memo-flight-no-reask.test.ts×1 | [ruled] `[isPending(x), x()]` is atomic within one scope — `[isPending(x), x()]` read in one scope is atomic: a reader that observed the fresh value must not see `pending === true` for it. |
57+
| A10 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:191` | async.ts×1 core.ts×3 scheduler.ts×1 verdict.ts×3 | createMemo.test.ts×1 error-staged-recovery.test.ts×1 fuzz-findings-l2.test.ts×1 ispending-memo-unstamped-hold-3457.test.ts×2 latest-isPending-consistency.test.ts×3 latest-uninitialized-over-latest-4362.test.ts×1 verdict-contract.test.ts×2 verdict-memo-flight-no-reask.test.ts×1 | [ruled] `[isPending(x), x()]` is atomic within one scope — `[isPending(x), x()]` read in one scope is atomic: a reader that observed the fresh value must not see `pending === true` for it. |
5858
| A11 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:103` | — | latest-isPending-consistency.test.ts×1 loading-fallback-in-flush-3540.test.ts×2 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×1 | [ruled] Sync derivations of held sources are visible through `latest()`/`isPending()` — Sync derivations of transition-held sources are visible through `latest()`/`isPending()` (held sync recompute is… |
5959
| A12 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:199` | — | createOptimistic.test.ts×2 spec-async-semantics.test.ts×1 | [ruled, amended in place] Resting optimistic nodes report pending like a plain memo — A resting optimistic node reports pending via exactly the causes a plain async memo does (A19) — a reverting optim… |
6060
| A13 | ruled | `docs/SPEC-ASYNC-SEMANTICS.md:207` | — | spec-async-semantics.test.ts×7 | [ruled 2026-07-06 (promoted from B1)] Resting optimistic ≡ plain async memo at every checkpoint — (was B1) A resting optimistic node (no active override) is observationally identical to a plain async … |
6161
| A14 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:215` | — | spec-async-semantics.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B2)] Companion nodes get child lanes that do not merge with the owner — (was B2) `isPending`/`latest` companion nodes get child lanes that do not mer… |
62-
| A15 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:251` | async.ts×2 constants.ts×1 core.ts×4 lanes.ts×5 scheduler.ts×15 verdict.ts×4 | async-chain-supersession.test.ts×1 boundary-output-frame-reader.test.ts×1 create-deferred-3710.test.ts×2 first-observer-stale-reader.test.ts×1 fuzz-findings-l2.test.ts×17 held-restore.test.ts×1 l2-contract.test.ts×7 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-hold-on-observation.test.ts×1 lane-outside-view.test.ts×1 lane-pass-stamped-effect-3662.test.ts×1 latest-memo-inline-parity.test.ts×1 loading-fallback-in-flush-3540.test.ts×4 mount-over-foreign-hold-3761.test.ts×2 overlapping-flights.test.ts×3 posture-born-held-and-observation.test.ts×4 posture-store-parity.test.ts×2 reveal-carve-out.test.ts×2 shared-effect-no-entangle.test.ts×1 show-stale-child-in-action-4137.test.ts×2 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 superseded-source-blocks-3462.test.ts×2 tick-scoped-pass-transaction.test.ts×1 treeshake.test.ts×4 verdict-memo-flight-no-reask.test.ts×1 visibility-oracle-store.states.ts×6 visibility-oracle.states.ts×7 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B3)] Transition entanglement is graph-driven; lanes settle as one reveal — (was B3) Transition entanglement is graph-driven: writes whose async work … |
63-
| A16 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:223` | scheduler.ts×1 | spec-async-semantics.test.ts×1 strict-read-pending-store.test.ts×2 uninitialized-visibility.test.ts×1 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×2 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B5)] `isPending` never throws in untracked contexts — (was B5) `isPending` never throws in untracked contexts — thunks that throw real errors or read… |
62+
| A15 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:251` | async.ts×2 constants.ts×1 core.ts×4 lanes.ts×5 scheduler.ts×16 verdict.ts×4 | async-chain-supersession.test.ts×1 boundary-output-frame-reader.test.ts×1 create-deferred-3710.test.ts×2 first-observer-stale-reader.test.ts×1 fuzz-findings-l2.test.ts×17 held-restore.test.ts×1 l2-contract.test.ts×7 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-hold-on-observation.test.ts×1 lane-outside-view.test.ts×1 lane-pass-stamped-effect-3662.test.ts×1 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×1 loading-fallback-in-flush-3540.test.ts×4 mount-over-foreign-hold-3761.test.ts×2 overlapping-flights.test.ts×3 posture-born-held-and-observation.test.ts×4 posture-store-parity.test.ts×2 reveal-carve-out.test.ts×2 shared-effect-no-entangle.test.ts×1 show-stale-child-in-action-4137.test.ts×2 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 superseded-source-blocks-3462.test.ts×2 tick-scoped-pass-transaction.test.ts×1 treeshake.test.ts×4 verdict-memo-flight-no-reask.test.ts×1 visibility-oracle-store.states.ts×6 visibility-oracle.states.ts×7 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B3)] Transition entanglement is graph-driven; lanes settle as one reveal — (was B3) Transition entanglement is graph-driven: writes whose async work … |
63+
| A16 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:223` | scheduler.ts×1 | latest-uninitialized-over-latest-4362.test.ts×2 spec-async-semantics.test.ts×1 strict-read-pending-store.test.ts×2 uninitialized-visibility.test.ts×1 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×2 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B5)] `isPending` never throws in untracked contexts — (was B5) `isPending` never throws in untracked contexts — thunks that throw real errors or read… |
6464
| A17 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:71` | async.ts×3 constants.ts×1 lanes.ts×7 scheduler.ts×2 verdict.ts×1 map.ts×1 optimistic.ts×1 store.ts×3 | create-deferred-3710.test.ts×1 fuzz-findings-l2.test.ts×6 lane-uninitialized-landing-3648.test.ts×5 optimistic-over-held-row-3796.test.ts×1 optimistic-read-lane-not-transaction-3698.test.ts×2 optimistic-undefined-override.test.ts×1 posture-store-parity.test.ts×1 refresh-await.test.ts×1 reveal-gating-contract.test.ts×3 spec-async-semantics.test.ts×10 createOptimisticStore.test.ts×2 kanban-a17-fixture.test.ts×3 optimistic-list-mutation-matrix.test.ts×1 optimistic-maparray-index-frame-f1.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 treeshake.test.ts×1 until.test.ts×1 visibility-oracle-store.states.ts×24 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×20 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from C4)] An active override is the displayed value until its transaction commits, and the graph's value until its own source answers — **Statement (curre… |
6565
| A18 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:81` | action.ts×1 async.ts×2 core.ts×3 lanes.ts×8 scheduler.ts×2 types.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×1 projection.ts×1 | body-end-supersession-visibility.test.ts×4 createOptimistic.test.ts×3 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-frame-deferred-run-3662.test.ts×1 lane-outside-view.test.ts×1 lane-uninitialized-landing-3648.test.ts×5 optimistic-move-duplicate-3548.test.ts×2 optimistic-read-lane-not-transaction-3698.test.ts×4 posture-store-parity.test.ts×5 spec-async-semantics.test.ts×5 flight-owned-transaction.test.ts×1 lane-authority-twins.test.ts×1 optimistic-list-mutation-matrix.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 unchanged-presence-no-hold-3743.test.ts×2 superseded-before-first-commit.test.ts×4 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×19 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from B4)] An override lives exactly as long as its own transaction; a newer truth from the source supersedes it in the graph immediately, on screen at com… |
66-
| A19 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:151` | async.ts×1 constants.ts×1 core.ts×6 lanes.ts×1 scheduler.ts×2 types.ts×1 verdict.ts×5 store.ts×2 | create-deferred-3710.test.ts×2 derived-store-first-landing-verdict.test.ts×1 fuzz-findings-l2.test.ts×4 lane-uninitialized-landing-3648.test.ts×2 latest-memo-inline-parity.test.ts×1 mount-over-foreign-hold-3761.test.ts×2 spec-async-semantics.test.ts×3 derived-presence-async-3726.test.ts×2 superseded-before-first-commit.test.ts×3 uninitialized-visibility.test.ts×1 verdict-memo-flight-no-reask.test.ts×1 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×14 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from C1)] `isPending(x)` ≡ the observable value is not final (three causes) — (was C1 — **partially reverses an earlier decision**) **Definition: `isPendi… |
66+
| A19 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:151` | async.ts×1 constants.ts×1 core.ts×6 lanes.ts×1 scheduler.ts×2 types.ts×1 verdict.ts×6 store.ts×2 | create-deferred-3710.test.ts×2 derived-store-first-landing-verdict.test.ts×1 fuzz-findings-l2.test.ts×4 lane-uninitialized-landing-3648.test.ts×2 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 mount-over-foreign-hold-3761.test.ts×2 spec-async-semantics.test.ts×3 derived-presence-async-3726.test.ts×2 superseded-before-first-commit.test.ts×3 uninitialized-visibility.test.ts×1 verdict-memo-flight-no-reask.test.ts×1 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×14 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from C1)] `isPending(x)` ≡ the observable value is not final (three causes) — (was C1 — **partially reverses an earlier decision**) **Definition: `isPendi… |
6767
| A20 | superseded | `docs/SPEC-ASYNC-SEMANTICS.md:410` | — | question-scoped-pending.test.ts×2 spec-async-semantics.test.ts×3 createOptimisticStore.test.ts×1 | [superseded 2026-07-13 by A24] (superseded) Optimistic writes announce a store-wide pending — (**SUPERSEDED 2026-07-13 by A24** — the mask is deleted; optimistic writes are verdict-inert. Kept for the… |
6868
| A21 | superseded | `docs/SPEC-ASYNC-SEMANTICS.md:417` | — | question-scoped-pending.test.ts×3 spec-async-semantics.test.ts×3 | [superseded 2026-07-13 by A24] (superseded) The store-wide mask — (**SUPERSEDED 2026-07-13 by A24** — the store-wide mask is deleted with the mask model; nothing silences a new question. The effective… |
6969
| A22 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:231` | store.ts×1 | createProjection.draft-lifetime-3585.test.ts×1 spec-async-semantics.test.ts×1 visibility-oracle-store.states.ts×1 | [ruled, amended in place 2026-07-08] Pending is per-node; store-wide only for the firewall's own work — **Pending is per-node: store-wide verdicts exist only as the firewall's own in-flight work (A9) … |

‎packages/signals/docs/SPEC-ASYNC-SEMANTICS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ A memo's value is one shared slot every reader sees, so its pass runs under the
168168

169169
**Status:** **ruled, amended in place** — #2829 (the `[false, undefined]` pins were a regression); amended 2026-09-14 (uninitialized: `latest()` throws in every scope, never `undefined`)
170170
**Pinned by:** `tests/latest-async.test.ts`, `tests/createMemo.test.ts`
171-
**Mechanism (L2, 2026-10-04):** no shadow — `latest(x)` reads the node (`verdictValue` under `latestActive`): a held node serves its staging (`heldLatest` → `_pendingValue`, or the stashed rewrite `_x._flushed`), a lane's node its lane value (`laneValueOf`), a flight its committed value (below the async nothing newer exists), an uninitialized one throws. Resolved async therefore never pairs `false` with `undefined`: a resolved node has a value, and a resolving one is pending.
171+
**Mechanism (L2, 2026-10-04):** no shadow — `latest(x)` reads the node (`verdictValue` under `latestActive`): a held node serves its staging (`heldLatest` → `_pendingValue`, or the stashed rewrite `_x._flushed`), a lane's node its lane value (`laneValueOf`), a flight its committed value (below the async nothing newer exists), an uninitialized one throws — a lane's node too while nothing is in the lane: `laneValueOf` / `display` fall back to a committed value it does not have, NOT_PENDING (#4362/#4363/#4376: a memo over `latest(s)` re-asked as the write's verdict-lane work). Resolved async therefore never pairs `false` with `undefined`: a resolved node has a value, and a resolving one is pending.
172172

173173
After an async memo resolves, `[isPending(x), latest(x)]` is `[false, resolvedValue]` — never `[false, undefined]`. **Amended 2026-09-14:** before the first landing there is no visible value, and `latest()` never fabricates one — it throws `NotReadyError` in every scope, owned or unowned, exactly like the plain read. (Maintainer: returning `undefined` "would mess with types" — `latest<T>` returns `T`.) The unowned scope used to return `undefined` by sharing the pending-shadow fallback's condition; the `isPending` twin stays `false` there because `false` inhabits `boolean` (A16). **Judged on the owner (2026-09-15, store oracle):** a store leaf behind a projection's firewall is a plain signal whose `_value` is the seed; `latest(() => store.key)` on an uninitialized projection returned the seed — A25's draft made visible through the one read path that bypasses the firewall gate. `latest()` now asks the leaf's owner (the firewall) whether anything has landed, as `read()` does. Pinned: `tests/visibility-oracle-store.test.ts` (projection uninitialized × latest).
174174

0 commit comments

Comments
 (0)