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 061b013
Browse filesBrowse the repository at this point in the historyBrowse files
fix(signals): a latest() read of a flight does not hold a Loading on switch (#4661) (#4663)
* fix(signals): a latest() read of a flight does not hold a Loading on switch (#4661)
A memo whose last run read `latest(() => list())` is still the hold's verdict
reader on its next run (D-25). Its read of the switch's own staging (`f`) is
the screen's, and that stale-reader mark (REACTIVE_FRAME_READ) made
`blockedBy` count it as a frame reader of `list`'s new flight too — a flight
it read only inside `latest()`, ahead of it (F-6). The switch was held and
the `on` fallback never showed.
At the seam, a verdict reader that read a flight of the frame only ahead of
it this pass (and no flight plainly: `observeFlight`, `frameRead`) drops the
mark and its rerun on the frame's landing: it holds nothing, keeps its
committed value (maintainer, 2026-11-03: "intentional tearing"), and the
flight's own landing re-derives it. Engine only (lanes.ts, verdict.ts).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
* perf(signals): track #4661's read-ahead readers with one list, no WeakMap
The seam drops the stale-reader mark of a verdict reader whose pass read a
flight inside latest() before any plain flight read routed it (F-6). A plain
read of a flight first routes the pass (REACTIVE_LANE_READ), so the read-ahead
push is skipped and the reader still holds (A10, A15); later plain reads in a
routed pass are the lane's and mark nothing. That replaces the pass-generation
tuples, the plain-read WeakMap and the laneServed hook. A new variant pins
the plain-read-first hold.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
* fix(signals): a memo's plain read of a flight after its latest() window still holds (#4661)
A window read routes the pass into the verdict lane, and `read` then served a
later plain read of a flight as lane work: committed, no frame read. So
`latest(len) + len()` did not hold where `len() + latest(len)` did, and with
the #4661 seam sweep the f-read variant lost its hold too (A10, A15: read
order never changes what holds).
`read` now asks `observeFlight` for any verdict reader first (the same
tokens, reordered: no core bytes). `observeFlight` serves a routed render
effect as before (lane work, D-26) and has a memo observe the flight; that
plain read takes the reader off the seam's read-ahead list. New variants pin
the window-first order with and without the read of f.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
---------
Co-authored-by: Claude <[email protected]>
A memo whose last run read `latest(x)` no longer holds a `<Loading on>` switch while `x`'s new flight is up: its read of the switch's own write is the screen's, and a flight it reads only inside `latest()` is one it reads ahead of (F-6). The fallback shows at once; the memo keeps its committed value until the flight lands (#4661).
Copy file name to clipboardExpand all lines: packages/signals/docs/RULES-INDEX.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,12 +54,12 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
54
54
| A7 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:167`| seat.ts×1 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… |
55
55
| 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… |
56
56
| A9 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:183`| async.ts×1 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 lanes.ts×1 scheduler.ts×1 seat.ts×1 verdict.ts×4| boundary-not-born-held-3540.test.ts×1 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. |
57
+
| A10 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:191`| async.ts×1 core.ts×4 lanes.ts×2 scheduler.ts×1 seat.ts×1 verdict.ts×5| boundary-not-born-held-3540.test.ts×1 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-stale-branch-hold-4661.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. |
58
58
| 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… |
59
59
| 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… |
60
60
| 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 … |
61
61
| 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… |
| A16 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:223`| scheduler.ts×1 | caught-reactive-read-diagnostic.test.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… |
64
64
| A17 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:71` | async.ts×3 constants.ts×1 lanes.ts×7 scheduler.ts×2 seat.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×2 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… |
65
65
| 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×17 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… |
0 commit comments