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 25c5064
Browse filesBrowse the repository at this point in the historyBrowse files
Three of gabbev's optimistic/transaction reports, one theme: the pure graph
does not wait where it is not forced to, and a hold is a fact about what a
pass observed — never about which reader happened to exist.
- #3426: the last async reader of an optimistic value unmounting mid-action
releases the frame. `reporterBlocksSource` is now `sourceObserved`, shared
by the settle verdict, the lane hold (`waitingTransition`) and the landing:
the hold check prunes dead reporters itself. A live action parks its
transaction without a verdict, so this is the only prune such a frame ever
gets — the lane used to wait for a flight nobody observed.
- #3427: the action body ending starts the correction (`endOptimism`, called
from `flush` after the heap and before the verdict). With the bodies over
(`_acted`, no live `_actions`) and nothing authoritative up — no override
node's own source in flight, no held plain load the action asked for —
each override's truth supersedes it as an arriving differing truth does
(A18): the graph re-derives now and the transaction settles when THAT
lands. Before: wait for the obsolete lane-derived flight, flash the
obsolete optimistic frame, revert, re-ask — a waterfall. Display is
unchanged (override on screen until commit). A co-written pending flag
stays through the action's own load (attribution-holds pin); optimistic
store edits keep settle-then-revert; companions snap at settlement.
- #3407: a render effect's pass belongs to whatever dirtied it. `recompute`
re-entered a stamped effect's transaction whenever another was active, so
a sync `action` write to a signal that merely shared a hole with a held
async merged into the async's transaction and waited (0:0 → 2:1) while the
same plain write passed through. The stamp re-entry is memo-only now; the
re-entry's one legitimate job — completing every reveal that discovered a
flight — moves to the landing (`settleTransition` → `enterWaiting`). A15
amended in place: a shared reader entangles nothing by itself; only a pass
that observes a flight pending joins it. Two independent flights read in
one hole now land at their own times.
Docs: SPEC A15 shared-hole corollary, A18 body-end corollary; INTERNALS §2/§3
mechanism notes; RULES-INDEX regenerated. Floor 23,058 → 23,195 (+78 B
#3426/#3427, +59 B #3407); size-limit caps ratcheted with notes.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Optimistic frames release when nothing authoritative is left to wait on, and a shared render effect no longer entangles unrelated updates (#3426, #3427, #3407).
6
+
7
+
- The last async reader of an optimistic value unmounting mid-action releases the frame (#3426): the lane's hold check prunes dead reporters itself (`sourceObserved`, shared with the settle verdict), instead of waiting for a flight nobody observes to land.
8
+
- The action body ending starts the correction (#3427): with the bodies over and no authoritative work in flight — no override node's own source, no held plain load the action asked for — each override's truth supersedes it now and the graph re-derives from it as the transaction's held work, settling when that lands. Before, the settle waited for the obsolete lane-derived flight, flashed the obsolete optimistic frame, then reverted and re-asked. A co-written flag stays through a plain load; optimistic store edits keep the settle-then-revert order.
9
+
- A render effect's pass belongs to whatever dirtied it (#3407): a sync `action` write to a signal that shared a hole with a held async (`{b()}:{detailsA()}`) merged into the async's transaction and waited (`0:0 → 2:1`) while the same plain write passed through. `recompute` re-enters a stamped node's transaction for memos only; the landing of a flight enters every transaction waiting on it (`enterWaiting`), which is where the effect re-entry's one legitimate job — completing the reveals that discovered the flight — now lives. Two independent flights read in one hole land at their own times.
Copy file name to clipboardExpand all lines: packages/signals/docs/RULES-INDEX.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,10 +59,10 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
59
59
| A12 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:117`| — | 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:125`| async.ts×1 | 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:133`| — | spec-async-semantics.test.ts×2 |[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 |ruled|`docs/SPEC-ASYNC-SEMANTICS.md:167`| core.ts×2 lanes.ts×1 scheduler.ts×1| lane-hold-on-observation.test.ts×1 reveal-carve-out.test.ts×2 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 treeshake.test.ts×3 |[ruled2026-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 is observed by a s… |
62
+
| A15 |amended|`docs/SPEC-ASYNC-SEMANTICS.md:167`|async.ts×1 core.ts×3 lanes.ts×1 scheduler.ts×2| lane-hold-on-observation.test.ts×1 reveal-carve-out.test.ts×2 shared-effect-no-entangle.test.ts×1 spec-async-semantics.test.ts×2 stale-read-uninitialized-cross-transition.test.ts×1 treeshake.test.ts×3 |[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
63
| A16 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:141`| verdict.ts×1 | spec-async-semantics.test.ts×1 strict-read-pending-store.test.ts×2 uninitialized-visibility.test.ts×1 |[ruled 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 uninitialized asy… |
64
-
| A17 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:31`| async.ts×3 constants.ts×2 core.ts×7 invariants.ts×3 optimistic.ts×3 scheduler.ts×2 verdict.ts×1 signals.ts×2 optimistic.ts×1 store.ts×3 | optimistic-undefined-override.test.ts×1 refresh-await.test.ts×1 reveal-gating-contract.test.ts×3 spec-async-semantics.test.ts×10 createOptimisticStore.test.ts×1 treeshake.test.ts×1 until.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
-
| A18 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:41`| async.ts×2 constants.ts×1 core.ts×4 optimistic.ts×3 scheduler.ts×2 types.ts×2 optimistic.ts×1 | createOptimistic.test.ts×1 spec-async-semantics.test.ts×3 flight-owned-transaction.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… |
64
+
| A17 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:31`| async.ts×3 constants.ts×2 core.ts×7 invariants.ts×3 optimistic.ts×5 scheduler.ts×2 verdict.ts×1 signals.ts×2 optimistic.ts×1 store.ts×3 | optimistic-undefined-override.test.ts×1 refresh-await.test.ts×1 reveal-gating-contract.test.ts×3 spec-async-semantics.test.ts×10 createOptimisticStore.test.ts×1 treeshake.test.ts×1 until.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
+
| A18 | amended |`docs/SPEC-ASYNC-SEMANTICS.md:41`| async.ts×2 constants.ts×1 core.ts×4 optimistic.ts×4 scheduler.ts×2 types.ts×2 optimistic.ts×1 | createOptimistic.test.ts×1 spec-async-semantics.test.ts×3 flight-owned-transaction.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
66
| A19 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:69`| async.ts×1 optimistic.ts×1 | spec-async-semantics.test.ts×3 uninitialized-visibility.test.ts×1 |[ruled 2026-07-07 (promoted from C1)]`isPending(x)` ≡ the observable value is not final (three causes) — (was C1 — **partially reverses an earlier decision**) **Definition: `isPending(x)` ≡ the value… |
67
67
| A20 | superseded |`docs/SPEC-ASYNC-SEMANTICS.md:247`| invariants.ts×1 | 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… |
68
68
| A21 | superseded |`docs/SPEC-ASYNC-SEMANTICS.md:254`| — | 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… |
@@ -102,17 +102,17 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
102
102
103
103
| id | status | defined | cited in src | cited in tests | statement (at definition) |
104
104
|---|---|---|---|---|---|
105
-
| INV-1 | live |`docs/INTERNALS-ASYNC-STATE.md:140`| invariants.ts×2 | — | - **INV-1 (high)**`pendingProbe` is non-null only inside an `isPending()` call |
106
-
| INV-2 | live |`docs/INTERNALS-ASYNC-STATE.md:142`| invariants.ts×2 | — | - **INV-2 (high)** A node with an _active_ override (`hasActiveOverride`) is |
107
-
| INV-3 | live |`docs/INTERNALS-ASYNC-STATE.md:146`| core.ts×1 invariants.ts×2 lanes.ts×1 scheduler.ts×2 | lane-hold-on-observation.test.ts×1 | - **INV-3 (high)**`_asyncReporters` gains entries only inside |
108
-
| INV-4 | live |`docs/INTERNALS-ASYNC-STATE.md:153`| invariants.ts×3 | — | - **INV-4 (medium)** After any of the three write paths completes for node `el`|
109
-
| INV-5 | live |`docs/INTERNALS-ASYNC-STATE.md:157`| invariants.ts×2 lanes.ts×1 | — | - **INV-5 (medium)** A lane in `activeLanes` has `_mergedInto === null`|
110
-
| INV-6 | live |`docs/INTERNALS-ASYNC-STATE.md:163`| invariants.ts×2 | — | - **INV-6 (medium)** At the end of a completing-transition flush: every node in |
111
-
| INV-7 | live |`docs/INTERNALS-ASYNC-STATE.md:166`| core.ts×1 invariants.ts×2 | action-completion-race.test.ts×2 | - **INV-7 (medium)**`_pendingValue !== NOT_PENDING` on a non-optimistic node |
112
-
| INV-8 | retired |`docs/INTERNALS-ASYNC-STATE.md:169`| invariants.ts×1 | rules-index.test.ts×1 | - **INV-8 (RETIRED 2026-07-07b, §5e)** Hold-provenance: a `_pendingValue` on an |
113
-
| INV-9 | live |`docs/INTERNALS-ASYNC-STATE.md:180`| invariants.ts×1 owner.ts×1 | — | - **INV-9 (high)** An `isPending` companion of a DISPOSED owner reads `false`|
| INV-11 | live |`docs/INTERNALS-ASYNC-STATE.md:190`| core.ts×1 optimistic.ts×1 | spec-async-semantics.test.ts×1 treeshake.test.ts×1 | - **INV-11 (high, structural — pinned, not asserted)** A recompute's equality |
105
+
| INV-1 | live |`docs/INTERNALS-ASYNC-STATE.md:142`| invariants.ts×2 | — | - **INV-1 (high)**`pendingProbe` is non-null only inside an `isPending()` call |
106
+
| INV-2 | live |`docs/INTERNALS-ASYNC-STATE.md:144`| invariants.ts×2 | — | - **INV-2 (high)** A node with an _active_ override (`hasActiveOverride`) is |
107
+
| INV-3 | live |`docs/INTERNALS-ASYNC-STATE.md:148`| core.ts×1 invariants.ts×2 lanes.ts×1 scheduler.ts×2 | lane-hold-on-observation.test.ts×1 | - **INV-3 (high)**`_asyncReporters` gains entries only inside |
108
+
| INV-4 | live |`docs/INTERNALS-ASYNC-STATE.md:155`| invariants.ts×3 | — | - **INV-4 (medium)** After any of the three write paths completes for node `el`|
109
+
| INV-5 | live |`docs/INTERNALS-ASYNC-STATE.md:159`| invariants.ts×2 lanes.ts×1 | — | - **INV-5 (medium)** A lane in `activeLanes` has `_mergedInto === null`|
110
+
| INV-6 | live |`docs/INTERNALS-ASYNC-STATE.md:165`| invariants.ts×2 | — | - **INV-6 (medium)** At the end of a completing-transition flush: every node in |
111
+
| INV-7 | live |`docs/INTERNALS-ASYNC-STATE.md:168`| core.ts×1 invariants.ts×2 | action-completion-race.test.ts×2 | - **INV-7 (medium)**`_pendingValue !== NOT_PENDING` on a non-optimistic node |
112
+
| INV-8 | retired |`docs/INTERNALS-ASYNC-STATE.md:171`| invariants.ts×1 | rules-index.test.ts×1 | - **INV-8 (RETIRED 2026-07-07b, §5e)** Hold-provenance: a `_pendingValue` on an |
113
+
| INV-9 | live |`docs/INTERNALS-ASYNC-STATE.md:182`| invariants.ts×1 owner.ts×1 | — | - **INV-9 (high)** An `isPending` companion of a DISPOSED owner reads `false`|
0 commit comments