@solidjs/signals 2.0.0-rc.0 → 2.0.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.md +1 -1
  2. package/dist/dev-shared.js +7138 -0
  3. package/dist/dev.attribution.js +3307 -0
  4. package/dist/dev.js +8076 -6692
  5. package/dist/observe/affects.js +129 -0
  6. package/dist/observe/attribution.js +7 -0
  7. package/dist/observe/boundaries.js +793 -0
  8. package/dist/observe/core/action.js +177 -0
  9. package/dist/observe/core/async.js +849 -0
  10. package/dist/observe/core/attribution-costs.js +66 -0
  11. package/dist/observe/core/attribution-feedback.js +280 -0
  12. package/dist/observe/core/attribution-hooks.js +83 -0
  13. package/dist/observe/core/attribution-queries.js +43 -0
  14. package/dist/observe/core/attribution.js +2904 -0
  15. package/dist/observe/core/constants.js +283 -0
  16. package/dist/{types-cjs/core/context.d.cts → observe/core/context.js} +37 -12
  17. package/dist/observe/core/core.js +1999 -0
  18. package/dist/observe/core/dev.js +343 -0
  19. package/dist/observe/core/effect.js +200 -0
  20. package/dist/observe/core/error-hooks.js +71 -0
  21. package/dist/observe/core/error.js +80 -0
  22. package/dist/observe/core/external.js +98 -0
  23. package/dist/observe/core/graph.js +155 -0
  24. package/dist/observe/core/heap.js +147 -0
  25. package/dist/observe/core/invariants.js +45 -0
  26. package/dist/observe/core/lanes.js +205 -0
  27. package/dist/observe/core/optimistic.js +627 -0
  28. package/dist/observe/core/owner.js +353 -0
  29. package/dist/observe/core/scheduler.js +1547 -0
  30. package/dist/observe/core/verdict.js +674 -0
  31. package/dist/observe/index.js +59 -0
  32. package/dist/observe/map.js +484 -0
  33. package/dist/observe/signals.js +731 -0
  34. package/dist/observe/store/index.js +44 -0
  35. package/dist/observe/store/next/optimistic.js +717 -0
  36. package/dist/observe/store/next/projection.js +266 -0
  37. package/dist/observe/store/next/reconcile.js +375 -0
  38. package/dist/observe/store/next/store.js +2480 -0
  39. package/dist/observe/store/next/target.js +51 -0
  40. package/dist/observe/store/store.js +331 -0
  41. package/dist/observe/store/storePath.js +103 -0
  42. package/dist/observe/store/utils.js +1070 -0
  43. package/dist/prod/affects.js +10 -9
  44. package/dist/prod/attribution.js +45 -0
  45. package/dist/prod/boundaries.js +388 -178
  46. package/dist/prod/core/action.js +65 -37
  47. package/dist/prod/core/async.js +477 -208
  48. package/dist/prod/core/attribution-hooks.js +3 -0
  49. package/dist/prod/core/constants.js +186 -1
  50. package/dist/prod/core/context.js +10 -16
  51. package/dist/prod/core/core.js +1556 -415
  52. package/dist/prod/core/dev.js +18 -1
  53. package/dist/prod/core/effect.js +119 -79
  54. package/dist/prod/core/error-hooks.js +71 -0
  55. package/dist/prod/core/error.js +13 -1
  56. package/dist/prod/core/external.js +4 -4
  57. package/dist/prod/core/graph.js +105 -54
  58. package/dist/prod/core/heap.js +72 -65
  59. package/dist/prod/core/invariants.js +3 -2
  60. package/dist/prod/core/lanes.js +117 -52
  61. package/dist/prod/core/optimistic.js +474 -103
  62. package/dist/prod/core/owner.js +131 -84
  63. package/dist/prod/core/scheduler.js +1013 -248
  64. package/dist/prod/core/verdict.js +418 -113
  65. package/dist/prod/index.js +25 -13
  66. package/dist/prod/map.js +314 -151
  67. package/dist/prod/signals.js +382 -32
  68. package/dist/prod/store/index.js +38 -0
  69. package/dist/prod/store/next/optimistic.js +710 -0
  70. package/dist/prod/store/next/projection.js +257 -0
  71. package/dist/prod/store/next/reconcile.js +373 -0
  72. package/dist/prod/store/next/store.js +2356 -0
  73. package/dist/prod/store/next/target.js +51 -0
  74. package/dist/prod/store/store.js +129 -881
  75. package/dist/prod/store/utils.js +982 -242
  76. package/dist/types/attribution.d.ts +19 -0
  77. package/dist/types/attribution.prod.d.ts +22 -0
  78. package/dist/types/boundaries.d.ts +78 -5
  79. package/dist/types/core/action.d.ts +12 -5
  80. package/dist/types/core/async.d.ts +3 -1
  81. package/dist/types/core/attribution-costs.d.ts +35 -0
  82. package/dist/types/core/attribution-feedback.d.ts +133 -0
  83. package/dist/types/core/attribution-hooks.d.ts +304 -0
  84. package/dist/types/core/attribution-queries.d.ts +24 -0
  85. package/dist/types/core/attribution.d.ts +892 -0
  86. package/dist/types/core/constants.d.ts +179 -0
  87. package/dist/types/core/core.d.ts +305 -23
  88. package/dist/types/core/dev.d.ts +421 -8
  89. package/dist/types/core/effect.d.ts +8 -1
  90. package/dist/types/core/error-hooks.d.ts +71 -0
  91. package/dist/types/core/error.d.ts +9 -0
  92. package/dist/types/core/graph.d.ts +23 -0
  93. package/dist/types/core/heap.d.ts +5 -3
  94. package/dist/types/core/index.d.ts +6 -3
  95. package/dist/types/core/invariants.d.ts +5 -1
  96. package/dist/types/core/lanes.d.ts +51 -19
  97. package/dist/types/core/owner.d.ts +15 -3
  98. package/dist/types/core/scheduler.d.ts +252 -3
  99. package/dist/types/core/types.d.ts +124 -41
  100. package/dist/types/index.d.ts +18 -5
  101. package/dist/types/map.d.ts +2 -0
  102. package/dist/types/signals.d.ts +164 -13
  103. package/dist/types/store/index.d.ts +16 -5
  104. package/dist/types/store/next/optimistic.d.ts +25 -0
  105. package/dist/types/store/next/projection.d.ts +27 -0
  106. package/dist/types/store/next/reconcile.d.ts +10 -0
  107. package/dist/types/store/next/store.d.ts +143 -0
  108. package/dist/types/store/next/target.d.ts +196 -0
  109. package/dist/types/store/store.d.ts +46 -112
  110. package/dist/types/store/utils.d.ts +188 -40
  111. package/package.json +32 -26
  112. package/dist/node.cjs +0 -7938
  113. package/dist/prod/store/optimistic.js +0 -217
  114. package/dist/prod/store/projection.js +0 -231
  115. package/dist/prod/store/reconcile.js +0 -707
  116. package/dist/types/store/optimistic.d.ts +0 -45
  117. package/dist/types/store/projection.d.ts +0 -70
  118. package/dist/types/store/reconcile.d.ts +0 -46
  119. package/dist/types-cjs/affects.d.cts +0 -47
  120. package/dist/types-cjs/boundaries.d.cts +0 -175
  121. package/dist/types-cjs/core/action.d.cts +0 -64
  122. package/dist/types-cjs/core/async.d.cts +0 -21
  123. package/dist/types-cjs/core/constants.d.cts +0 -71
  124. package/dist/types-cjs/core/core.d.cts +0 -148
  125. package/dist/types-cjs/core/dev.d.cts +0 -64
  126. package/dist/types-cjs/core/effect.d.cts +0 -30
  127. package/dist/types-cjs/core/error.d.cts +0 -47
  128. package/dist/types-cjs/core/external.d.cts +0 -15
  129. package/dist/types-cjs/core/graph.d.cts +0 -5
  130. package/dist/types-cjs/core/heap.d.cts +0 -22
  131. package/dist/types-cjs/core/index.d.cts +0 -13
  132. package/dist/types-cjs/core/invariants.d.cts +0 -59
  133. package/dist/types-cjs/core/lanes.d.cts +0 -56
  134. package/dist/types-cjs/core/optimistic.d.cts +0 -6
  135. package/dist/types-cjs/core/owner.d.cts +0 -124
  136. package/dist/types-cjs/core/scheduler.d.cts +0 -170
  137. package/dist/types-cjs/core/types.d.cts +0 -148
  138. package/dist/types-cjs/core/verdict.d.cts +0 -2
  139. package/dist/types-cjs/index.d.cts +0 -10
  140. package/dist/types-cjs/map.d.cts +0 -69
  141. package/dist/types-cjs/package.json +0 -3
  142. package/dist/types-cjs/signals.d.cts +0 -605
  143. package/dist/types-cjs/store/index.d.cts +0 -9
  144. package/dist/types-cjs/store/optimistic.d.cts +0 -45
  145. package/dist/types-cjs/store/projection.d.cts +0 -70
  146. package/dist/types-cjs/store/reconcile.d.cts +0 -46
  147. package/dist/types-cjs/store/store.d.cts +0 -213
  148. package/dist/types-cjs/store/storePath.d.cts +0 -58
  149. package/dist/types-cjs/store/utils.d.cts +0 -114
@@ -1,14 +1,14 @@
1
- import { NOT_PENDING, unwrapOverride, STATUS_UNINITIALIZED, OVERRIDE_UNDEFINED, STATUS_PENDING, REACTIVE_MANUAL_WRITE, REACTIVE_OPTIMISTIC_DIRTY, EFFECT_RENDER, EFFECT_USER } from "./constants.js";
1
+ import { NOT_PENDING, unwrapOverride, STATUS_UNINITIALIZED, REACTIVE_DIRTY, REACTIVE_CHECK, CONFIG_HAS_LANE, OVERRIDE_UNDEFINED, STATUS_PENDING, CONFIG_DERIVED_OVERRIDE, CONFIG_OPTIMISTIC, CONFIG_OVERRIDE_SUPERSEDED, EFFECT_RENDER, CONFIG_AUTHORITATIVE_OBSERVED, REACTIVE_MANUAL_WRITE, REACTIVE_OPTIMISTIC_DIRTY, LANE_RUN, EFFECT_USER } from "./constants.js";
2
2
 
3
- import { latestReadActive, currentOptimisticLane, stale } from "./core.js";
3
+ import { ext, hasActiveOverride, stale, currentOptimisticLane, enterStagedRead, latestReadActive } from "./core.js";
4
4
 
5
5
  import { NotReadyError } from "./error.js";
6
6
 
7
7
  import "./invariants.js";
8
8
 
9
- import { resolveTransition, getOrCreateLane, hasActiveOverride, activeLanes, signalLanes, findLane, resolveLane, assignOrMergeLane } from "./lanes.js";
9
+ import { resolveTransition, getOrCreateLane, activeLanes, signalLanes, laneHeld, findLane, resolveLane, readsHeldCommitted, assignOrMergeLane } from "./lanes.js";
10
10
 
11
- import { GlobalQueue, activeTransition, globalQueue, clock, insertSubs, schedule } from "./scheduler.js";
11
+ import { GlobalQueue, activeTransition, globalQueue, origin, clock, insertSubs, schedule, sourceObserved, currentTransition, queuePendingNode } from "./scheduler.js";
12
12
 
13
13
  /**
14
14
  * The optimistic write engine, moved out of core.ts/scheduler.ts. Everything
@@ -24,51 +24,126 @@ import { GlobalQueue, activeTransition, globalQueue, clock, insertSubs, schedule
24
24
  * once the gate holds — the same late-binding contract as verdict.ts.
25
25
  */
26
26
  /** The optimistic half of setSignal, fired when `_overrideValue !== undefined`. */ function optimisticWrite(e, n) {
27
- const t = e._e !== NOT_PENDING;
28
- const i = t ? unwrapOverride(e._e) : e.Ue;
29
- if (typeof n === "function") n = n(i);
30
- const u = !!(e.S & STATUS_UNINITIALIZED) || !e.be || !e.be(i, n);
31
- if (!u) {
27
+ const i = e.o?.Fe !== NOT_PENDING;
28
+ const t = i ? unwrapOverride(e.o?.Fe) : e.ce;
29
+ if (typeof n === "function") n = n(t);
30
+ const r = !!(e.h & STATUS_UNINITIALIZED) ||
31
+ // A dirty node's _value is stale (its queued recompute hasn't run — e.g.
32
+ // a latest() shadow marked by the previous landing's companion snap), so
33
+ // equality against it must not swallow the write. Without this, a sync
34
+ // push returning the shadow to that stale value was dropped, the snap
35
+ // recompute then committed the parent's old value, and the banner showed
36
+ // the previous transition's target (#3041 follow-up).
37
+ !!((e.oe ?? 0) & (REACTIVE_DIRTY | REACTIVE_CHECK)) || !e.xe || !e.xe(t, n);
38
+ if (!r) {
32
39
  // Same-value write with an active override still entangles the current
33
- // action's transition — the hold must outlast all overlapping actions.
34
- if (t) {
40
+ // action's transition — the hold must outlast all overlapping actions —
41
+ // and renews the override's PROVENANCE: the newer action re-asks the
42
+ // question, so an older action's answer arriving later is stale to it
43
+ // too (#3331; a same-value re-prediction otherwise let the first
44
+ // action's slow source supersede and restart the downstream flight).
45
+ if (i) {
35
46
  const n = resolveTransition(e);
36
47
  if (n && activeTransition !== n) globalQueue.initTransition(n);
48
+ if (origin > e.o.Vn) e.o.Vn = origin;
37
49
  }
38
50
  return n;
39
51
  }
40
- if (t) globalQueue.initTransition(resolveTransition(e));
41
- // No revert target is stashed: while the override is active every reader
42
- // sees it (A17), so authoritative arrivals commit silently into _value and
43
- // reverting is just dropping the override — _value is already correct.
44
- else globalQueue.m.Me.push(e);
52
+ if (i) {
53
+ const n = resolveTransition(e);
54
+ if (n) globalQueue.initTransition(n);
55
+ } else {
56
+ // No revert target is stashed: while the override is active every reader
57
+ // sees it (A17), so authoritative arrivals commit silently into _value and
58
+ // reverting is just dropping the override — _value is already correct.
59
+ globalQueue.m.cn.push(e);
60
+ }
45
61
  // Stamp ownership on the node (post-merge, so entangled writers share the
46
62
  // joint root). resolveTransition prefers this over the lane's _transition,
47
63
  // which a shared subscriber can merge across transactions (#2912).
48
- e.sn = activeTransition;
49
- const r = getOrCreateLane(e);
50
- e.Ke = r;
64
+ ext(e).Ln = activeTransition;
65
+ ext(e).hn = clock;
66
+ // Provenance: the action asking. An answer an OLDER action's flight brings
67
+ // back is a stale question and holds silently to commit (#3331).
68
+ ext(e).Vn = origin;
69
+ const u = getOrCreateLane(e);
70
+ ext(e).me = u;
71
+ // A fresh override re-masks: whatever truth is staged, this write is the
72
+ // value for the graph again until the source answers it (#3331).
73
+ e.C = (e.C | CONFIG_HAS_LANE) & -8912897;
51
74
  // Literal undefined must not land raw: the slot doubles as the optimistic
52
75
  // brand, and erasing it makes the write invisible and routes follow-up
53
76
  // writes off the optimistic path into permanent commits (#2898).
54
- e._e = n === undefined ? OVERRIDE_UNDEFINED : n;
77
+ ext(e).Fe = n === undefined ? OVERRIDE_UNDEFINED : n;
55
78
  // syncCompanions only pokes _pendingSignal/_latestValueComputed — with
56
79
  // neither companion present the call is a guaranteed no-op.
57
- (e.ge !== undefined || e.pe !== undefined) && GlobalQueue.Pe !== null && GlobalQueue.Pe(e, n);
58
- e.de = clock;
59
- insertSubs(e, true);
80
+ (e.o?.Ze !== undefined || e.o?.He !== undefined) && GlobalQueue.Ve !== null && GlobalQueue.Ve(e, n);
81
+ if (e.he !== undefined) e.be = clock;
82
+ // §12e: computed-only slot
83
+ insertSubs(e, true);
60
84
  schedule();
61
85
  return n;
62
86
  }
63
87
 
88
+ /**
89
+ * Lanes stage (#3479): a lane pass's publish for a memo. An optimistic
90
+ * derivation is an override — the speculative result lives in the override
91
+ * slot, `_value` stays the committed truth. The whole optimistic frame is then
92
+ * in one place: the lane's readers and untracked reads see it (A17), a render
93
+ * effect off the held lane sees the committed frame whole (readsHeldCommitted,
94
+ * #3460) — the source's shadow AND its derivations — where a speculative
95
+ * `_value` beside a committed shadow tore it. The node joins the
96
+ * transaction's optimistic nodes on its first speculative publish; the revert
97
+ * drops the override and re-derives it from the truth (a derived override has
98
+ * no truth of its own — see resolveOptimisticNodes, endOptimism).
99
+ */ function laneOverride(e, n, i) {
100
+ // The wake-only channel (#3009, see recomputeLane): a plain write to a
101
+ // latest()-tracked source rides a companion-sourced lane with no
102
+ // transaction on either side only to wake the verdict companions. Nothing
103
+ // is speculative — the pass commits directly, as any plain write does.
104
+ i = findLane(i);
105
+ if (!i.we && !activeTransition && i.ni.o?.kn !== undefined) {
106
+ e.ce = n;
107
+ return;
108
+ }
109
+ if (!hasActiveOverride(e)) {
110
+ // It reverts with the lane's transaction (a landing runs outside any
111
+ // flush, where the ambient batch would revert it at its own end); an
112
+ // orphan lane's falls to the batch, adopted with it (initTransition) as a
113
+ // write's is. No `_overrideOwner`: a derived override is a plain member,
114
+ // its transaction its lane's (resolveTransition), and it merges lanes
115
+ // through itself as any shared reader does (assignOrMergeLane). No
116
+ // provenance stamp either: not an intent, any truth supersedes it.
117
+ (i.we ? currentTransition(i.we) : globalQueue.m).cn.push(e);
118
+ }
119
+ // A lane pass's output is a derivation — also over a WRITTEN guess it
120
+ // corrects (a `createOptimistic(fn)` re-derived from fresh upstream data):
121
+ // the guess is gone, the slot holds fn's answer, and the revert promotes it
122
+ // rather than dropping to a stale `_value` and re-asking downstream (the
123
+ // next user write re-arms the guess: optimisticWrite clears the bit). No
124
+ // `_overrideTime` stamp: that marks a user WRITE unflushed until the flush
125
+ // that carries it (A28) and shields it from same-tick supersession — a pass's
126
+ // result is neither (a pulled ownerless memo publishes outside any flush).
127
+ // A fresh lane frame ends a supersession in force: the pass just dropped
128
+ // the staged truth it pointed at (recompute, INV-11 corollary) — left set,
129
+ // the flag served a `_value` never committed (fuzzer latest-1 #2481).
130
+ e.C = (e.C | CONFIG_DERIVED_OVERRIDE) & ~CONFIG_OVERRIDE_SUPERSEDED;
131
+ e.o.Fe = n === undefined ? OVERRIDE_UNDEFINED : n;
132
+ }
133
+
64
134
  /**
65
135
  * transitionComplete's override blockage: a settling transition stays open
66
136
  * while one of its optimistic nodes holds an active override that is still
67
- * pending on real (non-affects-sentinel) async.
137
+ * pending on real (non-affects-sentinel) async. A derived override's flight is
138
+ * the lane's own work, never authoritative — it does not hold the settle.
139
+ * Neither is a companion's (#3494): the `latest()` shadow backfilled under the
140
+ * owner's transaction (A28 (3)) is an observation of the flight, and a
141
+ * mainline `latest(details)` after the flight's last reader unmounted held the
142
+ * released write until the orphaned request landed.
68
143
  */ function transitionBlocked(e) {
69
- for (let n = 0; n < e.Me.length; n++) {
70
- const t = e.Me[n];
71
- if (hasActiveOverride(t) && "S" in t && t.S & STATUS_PENDING && t._ instanceof NotReadyError) {
144
+ for (let n = 0; n < e.cn.length; n++) {
145
+ const i = e.cn[n];
146
+ if (!(i.C & CONFIG_DERIVED_OVERRIDE) && i.o?.kn === undefined && hasActiveOverride(i) && "h" in i && i.h & STATUS_PENDING && i.o?._ instanceof NotReadyError) {
72
147
  return true;
73
148
  }
74
149
  }
@@ -80,100 +155,371 @@ function resolveOptimisticNodes(e) {
80
155
  // notifications) may push fresh optimistic nodes; only this batch settles
81
156
  // now, so iterate a fixed window and splice it out at the end.
82
157
  const n = e.length;
83
- for (let t = 0; t < n; t++) {
84
- const n = e[t];
85
- n.Ke = undefined;
158
+ for (let i = 0; i < n; i++) {
159
+ const n = e[i];
160
+ if (n.o !== null) n.o.me = undefined;
86
161
  // Revert is a pure drop: there is no revert target to commit —
87
162
  // override-covered authoritative values hold in _pendingValue and
88
163
  // elevate on their OWN transition's schedule (A18 as re-ruled 2026-07-07).
89
- if (!(n.S & STATUS_PENDING)) n.S &= ~STATUS_UNINITIALIZED;
90
- const i = n._e;
91
- n._e = NOT_PENDING;
92
- if (i !== NOT_PENDING && n.Ue !== unwrapOverride(i)) insertSubs(n, true);
93
- n.Ne = null;
94
- n.sn = null;
164
+ if (!(n.h & STATUS_PENDING)) n.h &= ~STATUS_UNINITIALIZED;
165
+ const t = n.o?.Fe;
166
+ // A derived override (lanes stage, #3479) has no truth of its own: the
167
+ // slot disarms — the memo is plain again — and the override PROMOTES to
168
+ // `_value`. Not superseded, nothing it derives from told it otherwise
169
+ // (a source override that reverts to a differing truth dirties it just
170
+ // above — sources join this list before their derivations — and its
171
+ // recompute then replaces the promotion), so by the graph's invariant
172
+ // the override IS what a recompute from the truth yields. Re-deriving
173
+ // instead re-asked an async member's flight and held the transaction on
174
+ // it — a waterfall after the reveal.
175
+ const r = n.C & CONFIG_DERIVED_OVERRIDE;
176
+ ext(n).Fe = r && !(n.C & CONFIG_OPTIMISTIC) ? undefined : NOT_PENDING;
177
+ // A superseded override's subscribers already re-derived from the truth
178
+ // when it arrived (#3331) — the drop changes nothing they read. Everyone
179
+ // else learns of the correction here: this drop IS their notification.
180
+ const u = (n.C & CONFIG_OVERRIDE_SUPERSEDED) !== 0;
181
+ n.C &= -8912897;
182
+ if (!u && t !== NOT_PENDING && n.ce !== unwrapOverride(t)) {
183
+ if (r) n.ce = unwrapOverride(t); else {
184
+ insertSubs(n, true);
185
+ }
186
+ }
187
+ n.we = null;
188
+ if (n.o !== null) n.o.Ln = null;
95
189
  }
96
190
  // Settlement checkpoint (#2838): companions caught in this batch (or owned
97
191
  // by a node in it) re-derive from committed state, so verdicts survive the
98
192
  // transition that produced them (A19 — pending is a property of the data).
99
- for (let t = 0; t < n; t++) {
100
- const n = e[t];
101
- if (n.ge || n.pe) GlobalQueue.un(n);
102
- const i = n.nn;
103
- if (i && (i.ge === n || i.pe === n)) GlobalQueue.un(i);
193
+ for (let i = 0; i < n; i++) {
194
+ const n = e[i];
195
+ if (n.o?.Ze || n.o?.He) GlobalQueue.ti(n);
196
+ const t = n.o?.kn;
197
+ if (t && (t.o?.Ze === n || t.o?.He === n)) GlobalQueue.ti(t);
104
198
  }
105
199
  e.splice(0, n);
106
200
  }
107
201
 
202
+ /**
203
+ * A18 supersession (#3331): the node's own source arrived with a value that
204
+ * differs from its active override. "Knowing otherwise" ends the optimism for
205
+ * the graph at once: the override stays only as the DISPLAYED value (untracked
206
+ * reads, the applied frame) until the owning transaction commits, while
207
+ * tracked readers see the staged truth and re-derive from it as that
208
+ * transaction's held work — so async downstream restarts now, not at the
209
+ * revert (no waterfall).
210
+ *
211
+ * The lane's job for this node is over: a lane applies an optimistic view
212
+ * ahead of its transaction, and there is no optimistic view left — the
213
+ * corrected cascade is plain transaction-held work (staged memos, effect runs
214
+ * in the stashable queues). Demote the node and every cascade member that
215
+ * rides this lane; the caller then notifies on the plain channel. Runners the
216
+ * lane still holds for demoted effects (the optimistic frame that never got to
217
+ * apply) defer to the regular queue in runEffect. In a lane merged with a
218
+ * still-optimistic source, members shared with that source lose their lane
219
+ * too and simply wait for the transaction — less optimistic, never torn.
220
+ *
221
+ * A later arrival EQUAL to the override (an earlier action's answer superseded
222
+ * this one's; now this one's answer confirms it) ends the supersession: the
223
+ * graph re-derives from the override, which is the truth again. Notifies the
224
+ * subscribers in both cases. A plain matching confirmation (no supersession
225
+ * in force) is A17-silent for ordinary subscribers and wakes only an
226
+ * authoritative-view reader (until()'s predicate, refresh()'s waiter) that
227
+ * observed this node past its override — "authoritative arrival equal to the
228
+ * override" is exactly the acknowledgment it waits for (#3164, #3303). The
229
+ * wake hook is installed by the setters of that bit; optional here because
230
+ * the bit only implies the optimistic engine was consulted.
231
+ */ function supersedeOverride(e, n) {
232
+ const i = !e.xe || !e.xe(n, unwrapOverride(e.o.Fe));
233
+ if (!i) {
234
+ if (!(e.C & CONFIG_OVERRIDE_SUPERSEDED)) {
235
+ if (e.C & CONFIG_AUTHORITATIVE_OBSERVED) GlobalQueue.zn?.(e);
236
+ return;
237
+ }
238
+ e.C &= ~CONFIG_OVERRIDE_SUPERSEDED;
239
+ } else {
240
+ // Provenance (#3331): an answer brought back by an OLDER action than the
241
+ // one that wrote this override answers a question the user has since
242
+ // changed. It is staged like any other landing and reveals if it is
243
+ // still the truth when the transaction commits, but it does not move the
244
+ // graph now — a slow source must not leak back in over a newer intent.
245
+ // 0 is mainline (no action): always the current question.
246
+ if (origin && origin < e.o.Vn) return;
247
+ e.C |= CONFIG_OVERRIDE_SUPERSEDED;
248
+ const n = e.o?.me;
249
+ if (n) {
250
+ const i = findLane(n);
251
+ const t = [ e ];
252
+ while (t.length) {
253
+ const e = t.pop();
254
+ const n = e.o?.me;
255
+ if (!n || findLane(n) !== i) continue;
256
+ e.o.me = undefined;
257
+ i.Qe.delete(e);
258
+ for (let n = e.u; n !== null; n = n.Ae) t.push(n.ge);
259
+ }
260
+ }
261
+ }
262
+ insertSubs(e);
263
+ }
264
+
265
+ /**
266
+ * The flush's pre-verdict step once the action bodies have ended (#3427).
267
+ * The bodies were the optimism's justification; with them over, the
268
+ * overrides still in force revert at the settle — unless the transaction is
269
+ * still waiting on AUTHORITATIVE work: an override node's own source in
270
+ * flight (`transitionBlocked` — that answer supersedes or confirms on
271
+ * arrival), or a held flight that does not derive from an override (a plain
272
+ * write's load the action asked for). Through that window the optimistic
273
+ * world stands: a co-written "saving" flag stays rendered until the page it
274
+ * covers lands (A17 — the optimistic world is one).
275
+ *
276
+ * The flights that DO derive from an override — routed through a live lane —
277
+ * are obsolete: their input is the guess that is about to revert, and nobody
278
+ * will read their answer. With nothing authoritative left, each override's
279
+ * truth is already here (the staged value an A17-silent landing left, else
280
+ * the committed value) and supersedes it now, exactly as an arriving
281
+ * differing truth does (A18, #3331): the graph re-derives from it as this
282
+ * transaction's held work — a lane-derived memo re-asks with the truth, its
283
+ * other changed inputs included — and the transaction settles when THAT
284
+ * lands. Before this the settle first waited for the obsolete flight,
285
+ * revealed the obsolete optimistic frame when it landed, and only then
286
+ * started the correction — a waterfall with a flash in the middle. Returns
287
+ * whether it superseded anything (the caller re-runs the heap).
288
+ *
289
+ * The optimistic world is one, so it ends early only when all of it can. An
290
+ * optimistic STORE edit cannot yet: its truth is the base layer under an
291
+ * overlay that `_clearOptimisticStores` folds off at settlement, with no
292
+ * tracked/displayed split — superseding its tracking signals alone would
293
+ * re-derive readers against a still-displayed overlay (and a memo reading
294
+ * both a signal and the store would ask a mixed question). A transaction
295
+ * holding one keeps the settle-then-revert order throughout. Companions
296
+ * (`_parentSource` set) are optimistic nodes too — a verdict written through
297
+ * the optimistic path so it flushes ahead of the hold — but they answer for
298
+ * their owner and snap at settlement (`_snapCompanions`), not here.
299
+ */ function endOptimism(e) {
300
+ if (!e.Te || e.pe.length || !e.cn.length || e.ri.size || transitionBlocked(e)) return false;
301
+ for (const n of e.le.keys()) if (sourceObserved(e, n, e) && n.o?.ue?.has(n) && !resolveLane(n)) return false;
302
+ let n = false;
303
+ for (const i of e.cn) {
304
+ if (!hasActiveOverride(i) || i.o.kn ||
305
+ // A derived override re-derives when its source's is superseded.
306
+ i.C & (CONFIG_OVERRIDE_SUPERSEDED | CONFIG_DERIVED_OVERRIDE) || i.h & STATUS_UNINITIALIZED) continue;
307
+ const e = i._e !== NOT_PENDING ? i._e : i.ce;
308
+ if (!i.xe || !i.xe(e, unwrapOverride(i.o.Fe))) {
309
+ supersedeOverride(i, e);
310
+ // Judged by the mark, not the call: a provenance refusal (an older
311
+ // action's window is still open) leaves the node for a later pass.
312
+ if (i.C & CONFIG_OVERRIDE_SUPERSEDED) n = true;
313
+ }
314
+ }
315
+ return n;
316
+ }
317
+
318
+ /** read()'s value for a tracked reader of a superseded node: the truth —
319
+ * staged, or already committed (a mainline landing commits at the head of
320
+ * its flush, ahead of the heap run, and the override drops only at the
321
+ * batch's end; in between the graph must not fall back to the override it
322
+ * has left) — or the displayed override for a stale (render) reader of some
323
+ * OTHER transaction, the same visibility a foreign transaction's staged
324
+ * write has. */
325
+ /**
326
+ * A tracked read of an active override (read()'s override arm). Lanes mirror
327
+ * transitions (#3460): a render effect OFF the override's held lane — re-run
328
+ * by a sync write, or mounted mid-hold — sees the committed value, as a stale
329
+ * reader of a held transaction does, and publishes now; the lane's release
330
+ * re-runs it (readsHeldCommitted). The lane defers the override's own readers'
331
+ * runs, so the committed value is what is on screen — the override is the
332
+ * visible value only once the lane has revealed (or, demoted at body-end,
333
+ * A18). Otherwise the override displays, unless the node's own source
334
+ * answered with a DIFFERENT value (A18 supersession, #3331): the optimism is
335
+ * over for the graph — a tracked reader sees the staged truth — while the
336
+ * override remains the DISPLAYED value for untracked reads (and for a stale
337
+ * reader of some other transaction), and for a LANE pass (#3548, below).
338
+ */ function overrideRead(e, n) {
339
+ if (stale && readsHeldCommitted(e, n)) {
340
+ // The committed frame of a node that has NEVER committed is nothing to
341
+ // show (#3648): a memo whose first landing rode its lane (asyncWrite's
342
+ // lane branch → a derived override) has no `_value` yet, and the outsider
343
+ // was served a fabricated `undefined`. Uninitialized is loading, not
344
+ // pending (A19 exception 1): the reader suspends, as it does on a
345
+ // pending uninitialized source regardless of lane (#3276, laneSuspends).
346
+ // readsHeldCommitted already queued its re-run on the lane's render
347
+ // queue, which runs at the release — by then the commit has promoted the
348
+ // override into `_value` (resolveOptimisticNodes), or the revert has
349
+ // re-derived the node. Lane readers keep seeing the override (A17).
350
+ if (e.h & STATUS_UNINITIALIZED) throw new NotReadyError(e);
351
+ return e.ce;
352
+ }
353
+ if (!(e.C & CONFIG_OVERRIDE_SUPERSEDED)) return unwrapOverride(e.o?.Fe);
354
+ // The owning transaction: `_overrideOwner` (#2912), not the stamp — an
355
+ // override written directly inside an action never passes the adoption
356
+ // loop that stamps `_transition`, and a body-end supersession (#3427)
357
+ // stages nothing that would queue it. Without the owner a stale reader of
358
+ // a body-ended node read the committed truth beside a display still
359
+ // showing the override.
360
+ const i = resolveTransition(e);
361
+ // A lane pass composes the frame the lane applies AHEAD of the commit, so
362
+ // it reads what is on screen — for a superseded node, the override (A18
363
+ // (c): the applied screen keeps it until the transaction commits). The
364
+ // supersession dropped this node's own lane; a LATER write's lane reaching
365
+ // a shared reader (a list filtered on two rows' fields, #3548) otherwise
366
+ // handed that pass the staged truth and applied it at once: one list
367
+ // re-derived from the truth while its neighbours still displayed the
368
+ // override — the same row rendered in two lanes. The reader is recorded
369
+ // for replay at the owner's commit under laneReadsCommitted's contract:
370
+ // the superseded drop notifies nobody (resolveOptimisticNodes assumes its
371
+ // subscribers already derive from the truth), so the replay is what
372
+ // brings this reader the revealed value.
373
+ if (currentOptimisticLane !== null) {
374
+ (i ?? globalQueue.m).In.add(n);
375
+ return unwrapOverride(e.o?.Fe);
376
+ }
377
+ if (stale && i && activeTransition !== i) return unwrapOverride(e.o?.Fe);
378
+ // A superseded read is a staged read (A29) whether the truth is staged or
379
+ // already committed: the pass that derives from it derives from the
380
+ // owning transaction's world (the override is still displayed by it).
381
+ enterStagedRead(e, i);
382
+ return e._e !== NOT_PENDING ? e._e : e.ce;
383
+ }
384
+
385
+ /**
386
+ * An authoritative store landing on an override-covered node — a derived
387
+ * optimistic store's own truth arriving over a tentative edit through the
388
+ * projection-write channel (setSignal under projectionWriteActive). The
389
+ * store twin of asyncWrite's override branch: the truth stages for its
390
+ * transaction's commit whatever its relation to the committed value (a
391
+ * landing equal to committed still differs from the override), companions
392
+ * learn of it, and supersedeOverride decides the rest — A18 supersession with
393
+ * action provenance, or an A17-silent confirmation (#3331). Before this the
394
+ * landing took setSignal's plain path: a differing truth staged silently
395
+ * under the override and the graph never moved until the commit.
396
+ */ function landOnOverride(e, n) {
397
+ const i = e._e === NOT_PENDING ? e.ce : e._e;
398
+ if (typeof n === "function") n = n(i);
399
+ if (e._e === NOT_PENDING) queuePendingNode(e);
400
+ e._e = n;
401
+ GlobalQueue.Ve?.(e, n);
402
+ supersedeOverride(e, n);
403
+ schedule();
404
+ return n;
405
+ }
406
+
108
407
  function runQueue(e, n) {
109
- for (let t = 0; t < e.length; t++) e[t](n);
408
+ for (let i = 0; i < e.length; i++) e[i](n | LANE_RUN);
110
409
  }
111
410
 
112
411
  /**
113
- * Run effects from all lanes that are ready (no pending async).
412
+ * Run effects from all lanes that are ready (no OBSERVED pending async — see
413
+ * laneHeld).
114
414
  */ function runLaneEffects(e) {
115
415
  for (const n of activeLanes) {
116
- if (n.tn || n.Ae.size > 0) continue;
117
- const t = n.rn[e - 1];
118
- if (t.length) {
119
- n.rn[e - 1] = [];
120
- runQueue(t, e);
416
+ if (n.ei || laneHeld(n)) continue;
417
+ const i = n.dn[e - 1];
418
+ if (i.length) {
419
+ n.dn[e - 1] = [];
420
+ runQueue(i, e);
121
421
  }
122
422
  }
423
+ // Optimistic patch applications ride the same visibility slot as lane
424
+ // effects (in-flight DOM updates); no-op unless patches registered.
425
+ if (e === EFFECT_RENDER) GlobalQueue.ui?.();
123
426
  }
124
427
 
125
428
  function cleanupCompletedLanes(e) {
126
429
  for (const n of activeLanes) {
127
- const t = e ? n.Ne === e : !n.Ne;
128
- if (!t) continue;
129
- if (!n.tn) {
130
- if (n.rn[0].length) runQueue(n.rn[0], EFFECT_RENDER);
131
- if (n.rn[1].length) runQueue(n.rn[1], EFFECT_USER);
430
+ const i = e ? n.we === e : !n.we;
431
+ if (!i) continue;
432
+ if (!n.ei) {
433
+ if (n.dn[0].length) runQueue(n.dn[0], EFFECT_RENDER);
434
+ if (n.dn[1].length) runQueue(n.dn[1], EFFECT_USER);
132
435
  }
133
- if (n.en.Ke === n) n.en.Ke = undefined;
134
- n.Ae.clear();
135
- n.rn[0].length = 0;
136
- n.rn[1].length = 0;
436
+ if (n.ni.o?.me === n) if (n.ni.o !== null) n.ni.o.me = undefined;
437
+ n.Qe.clear();
438
+ n.dn[0].length = 0;
439
+ n.dn[1].length = 0;
137
440
  activeLanes.delete(n);
138
- signalLanes.delete(n.en);
441
+ signalLanes.delete(n.ni);
139
442
  }
140
443
  }
141
444
 
142
445
  /** read()'s per-lane suspension test (pending-throw path, lane context). */ function laneSuspends(e) {
446
+ // An UNINITIALIZED async source suspends regardless of lane (#3276): a
447
+ // lane mismatch preserves an already-committed stale value, but a source
448
+ // with no committed truth has nothing to serve — the cross-lane read
449
+ // surfaced a fabricated `undefined` where latest() itself suspends
450
+ // (latestRead rethrows NotReady for tracked uninitialized reads). Lives
451
+ // here rather than read()'s throw path so the floor bundles don't pay:
452
+ // this is only reachable under a lane, which implies the engine.
453
+ if (e.h & STATUS_UNINITIALIZED) return true;
143
454
  // Per-lane suspension: only throw if in same lane as pending async
144
- // AND the node doesn't have an active override (overrides are the visible value,
145
- // downstream in the lane should read the override, not throw)
146
- const n = e.Ke;
455
+ // AND the node doesn't have an active WRITTEN override (overrides are the
456
+ // visible value, downstream in the lane should read the override, not
457
+ // throw). A derived override (#3479) is a previous speculative answer, not
458
+ // an intent: the re-ask pending behind it suspends like any lane async.
459
+ const n = e.o?.me;
147
460
  if (!n) return false;
148
- return findLane(n) === findLane(currentOptimisticLane) && !hasActiveOverride(e);
461
+ return findLane(n) === findLane(currentOptimisticLane) && (!hasActiveOverride(e) || (e.C & CONFIG_DERIVED_OVERRIDE) !== 0);
462
+ }
463
+
464
+ /**
465
+ * read()'s reveal carve-out asks whether a pending node is routed through a
466
+ * LIVE lane: a lane-derived flight's inputs are already revealed through the
467
+ * lane (the override, or latest()'s fresh value), so a stale reader of another
468
+ * transaction must hold on the flight rather than show the node's committed
469
+ * value beside them (#3334). Exact, not sticky: `resolveLane` clears a lane
470
+ * reference the engine has since retired, so a node that was once lane-routed
471
+ * and is now pending under a plain hold is judged by that hold alone.
472
+ */ function laneLive(e) {
473
+ return resolveLane(e) !== undefined;
149
474
  }
150
475
 
151
476
  /**
152
477
  * read()'s entanglement gate: a reader recomputing under an optimistic lane
153
478
  * that reads a pending mid-transition write sees the committed value; the sub
154
479
  * is recorded for replay at commit.
155
- */ function gatedRead(e, n, t) {
156
- if (latestReadActive || e.De === NOT_PENDING || e.ce || n !== e && !(n.se & REACTIVE_MANUAL_WRITE)) {
480
+ */ function gatedRead(e, n, i) {
481
+ if (latestReadActive || e._e === NOT_PENDING || e.he || n !== e && !(n.oe & REACTIVE_MANUAL_WRITE)) {
157
482
  return false;
158
483
  }
159
- activeTransition.ln.add(t);
484
+ activeTransition.In.add(i);
160
485
  return true;
161
486
  }
162
487
 
163
488
  /**
164
489
  * read()'s value selection under a lane: return the committed `_value` for
165
490
  * optimistic/lane-assigned signals, stale-mode reads, and pending owners.
166
- */ function laneReadsCommitted(e, n, t) {
167
- if (e._e !== undefined || !!e.Ke || !!(n.S & STATUS_PENDING)) return true;
168
- if (n === e && stale && t.nn !== e) {
169
- // The committed view can hide a same-tick ambient write (a lane member —
170
- // even just an isPending companion flip — puts the reader "under a lane"
171
- // against unrelated plain writes). With no transaction the write commits
172
- // at THIS flush's end with no re-delivery, so record the reader for
173
- // replay at commit — the same contract gatedRead provides when a
174
- // transaction is active (#2963). If a transaction forms mid-flush,
175
- // initTransition carries the recording over to it.
176
- if (e.De !== NOT_PENDING && activeTransition === null) globalQueue.m.ln.add(t);
491
+ */ function laneReadsCommitted(e, n, i) {
492
+ if (e.o?.Fe !== undefined || !!e.o?.me || !!(n.h & STATUS_PENDING)) {
493
+ // The committed view hides a staged in-flight value that will promote
494
+ // silently (commitPendingNode never re-notifies). gatedRead records plain
495
+ // signals for replay at commit; async memos are excluded from it by the
496
+ // `_fn` check and reach here instead — a lane-assigned source whose async
497
+ // already settled (laneAsyncSettled keeps _optimisticLane) served its
498
+ // committed value to a reader that never re-ran after the landing, so a
499
+ // pending-gated branch stayed one value behind permanently (#3041
500
+ // follow-up). Record the reader under the same replay contract — when
501
+ // the commit will actually change what it read: a staged value equal to
502
+ // the committed one (a lane recompute already published it, INV-11)
503
+ // promotes to the same view, and a replay would only re-run effects
504
+ // against an unchanged frame (#3330). An override-covered node's revert
505
+ // notifies its own subscribers when the truth differs (resolveOptimistic
506
+ // Nodes), so the reader is recorded only for the staged-vs-committed gap.
507
+ if (e._e !== NOT_PENDING && e._e !== e.ce) (activeTransition ?? globalQueue.m).In.add(i);
508
+ return true;
509
+ }
510
+ if (n === e && stale && i.o?.kn !== e) {
511
+ // The committed view can hide a staged write (a lane member — even just
512
+ // an isPending companion flip — puts the reader "under a lane"). The
513
+ // staged value commits with no re-delivery (commitPendingNode never
514
+ // re-notifies), so record the reader for replay at commit — the same
515
+ // contract gatedRead provides (#2963). gatedRead itself only covers
516
+ // signal reads where the reading computed differs from the source; the
517
+ // owner === el memo/self read lands here instead. With a transaction
518
+ // active the staged value promotes silently at ITS landing, so record
519
+ // into the transaction (#3041 follow-up: a pending-gated branch that
520
+ // first read its async source during the landing flush stayed one value
521
+ // behind permanently); with none, into the ambient batch.
522
+ if (e._e !== NOT_PENDING) (activeTransition ?? globalQueue.m).In.add(i);
177
523
  return true;
178
524
  }
179
525
  return false;
@@ -184,13 +530,30 @@ function cleanupCompletedLanes(e) {
184
530
  * a dependency's optimistic lane (own=false — parent-deeper-than-owned-child
185
531
  * can run before its OPT-dirty child propagates).
186
532
  */ function recomputeLane(e, n) {
187
- if (n) return resolveLane(e) ?? null;
188
- for (let n = e.tt; n; n = n.nt) {
189
- const t = n.it;
190
- if (t.se & REACTIVE_OPTIMISTIC_DIRTY) {
191
- const n = resolveLane(t);
533
+ if (n) {
534
+ const n = resolveLane(e);
535
+ if (!n) return null;
536
+ // Wake-only lane demotion (#3009): a plain write to a latest()-tracked
537
+ // source rides the optimistic channel only to wake verdict companions —
538
+ // its lane is sourced by the companion shadow (_parentSource set) and owns
539
+ // no transaction. When such a node is pulled mid-tick by a latest()/
540
+ // isPending() probe, lane posture would direct-commit _value, leaking the
541
+ // queued write into committed reads before the flush. Return `false` so
542
+ // recompute() runs plain: the value stages and commits with the flush.
543
+ // (el's own override slot excludes companions themselves; a lane merged
544
+ // into a real optimistic lane resolves to a non-companion source.)
545
+ if (!globalQueue.Jn && !activeTransition && !n.we && n.ni.o?.kn !== undefined && e.o?.Fe === undefined) {
546
+ if (e.o !== null) e.o.me = undefined;
547
+ return false;
548
+ }
549
+ return n;
550
+ }
551
+ for (let n = e.Ie; n; n = n.Ne) {
552
+ const i = n.Oe;
553
+ if (i.oe & REACTIVE_OPTIMISTIC_DIRTY) {
554
+ const n = resolveLane(i);
192
555
  if (n) {
193
- e.se |= REACTIVE_OPTIMISTIC_DIRTY;
556
+ e.oe |= REACTIVE_OPTIMISTIC_DIRTY;
194
557
  assignOrMergeLane(e, n);
195
558
  return n;
196
559
  }
@@ -199,26 +562,28 @@ function cleanupCompletedLanes(e) {
199
562
  return null;
200
563
  }
201
564
 
202
- /** recompute()'s catch path: track pending async in the current lane. */ function laneAsyncPending(e) {
565
+ /** recompute()'s catch path: record the pending async as the current lane's
566
+ * (ownership — laneHeld decides the hold). The lane source's isPending
567
+ * companion is NOT refreshed here: its verdict never read _pendingAsync, and
568
+ * the source's own write/commit/settlement paths keep it current. */ function laneAsyncPending(e) {
203
569
  const n = findLane(currentOptimisticLane);
204
- if (n.en !== e) {
205
- n.Ae.add(e);
206
- e.Ke = n;
207
- GlobalQueue.Se !== null && GlobalQueue.Se(n.en);
570
+ if (n.ni !== e) {
571
+ n.Qe.add(e);
572
+ ext(e).me = n;
573
+ e.C |= CONFIG_HAS_LANE;
208
574
  }
209
575
  }
210
576
 
211
577
  /** recompute()'s success path: the node's async settled, clear it from its lane. */ function laneAsyncSettled(e) {
212
578
  const n = resolveLane(e);
213
579
  if (n) {
214
- n.Ae.delete(e);
215
- GlobalQueue.Se !== null && GlobalQueue.Se(n.en);
580
+ n.Qe.delete(e);
216
581
  }
217
582
  }
218
583
 
219
584
  function trackOptimisticStore(e) {
220
585
  // After initTransition, globalQueue._batch IS activeTransition (same reference)
221
- globalQueue.m.cn.add(e);
586
+ globalQueue.m.ri.add(e);
222
587
  schedule();
223
588
  }
224
589
 
@@ -227,19 +592,25 @@ function trackOptimisticStore(e) {
227
592
  * create optimistic state (verdict.ts at module top level, createOptimistic
228
593
  * and createOptimisticStore at first call) BEFORE any optimistic node exists.
229
594
  */ function installOptimisticEngine() {
230
- if (GlobalQueue.Gt !== null) return;
231
- GlobalQueue.Gt = optimisticWrite;
232
- GlobalQueue.En = resolveOptimisticNodes;
233
- GlobalQueue.Tn = transitionBlocked;
234
- GlobalQueue.dn = cleanupCompletedLanes;
235
- GlobalQueue.In = runLaneEffects;
236
- GlobalQueue.Rt = gatedRead;
237
- GlobalQueue.Ot = laneSuspends;
238
- GlobalQueue.Pt = laneReadsCommitted;
239
- GlobalQueue.je = recomputeLane;
240
- GlobalQueue.$e = laneAsyncPending;
241
- GlobalQueue.ze = laneAsyncSettled;
242
- GlobalQueue.Nn = trackOptimisticStore;
595
+ if (GlobalQueue.ot !== null) return;
596
+ GlobalQueue.ot = optimisticWrite;
597
+ GlobalQueue.oi = resolveOptimisticNodes;
598
+ GlobalQueue.ai = transitionBlocked;
599
+ GlobalQueue.li = cleanupCompletedLanes;
600
+ GlobalQueue.si = runLaneEffects;
601
+ GlobalQueue.ke = supersedeOverride;
602
+ GlobalQueue.Ei = endOptimism;
603
+ GlobalQueue.ut = overrideRead;
604
+ GlobalQueue.Me = laneOverride;
605
+ GlobalQueue.st = landOnOverride;
606
+ GlobalQueue.lt = gatedRead;
607
+ GlobalQueue.it = laneSuspends;
608
+ GlobalQueue.tt = laneLive;
609
+ GlobalQueue.$n = laneReadsCommitted;
610
+ GlobalQueue.an = recomputeLane;
611
+ GlobalQueue.Sn = laneAsyncPending;
612
+ GlobalQueue.Tn = laneAsyncSettled;
613
+ GlobalQueue.fi = trackOptimisticStore;
243
614
  }
244
615
 
245
616
  export { installOptimisticEngine };