Repository navigation
Commit b5bd6fb
Four lane-authority fixes plus their optimistic-store twins and a review
re-rule, all pre-existing on next. #3347 re-based directly onto next
(landing dispatch is eager, as next's is; the store twins carry the
held-adoption born-holding case only — #3336's fold case stays with #3337).
#3335 — merged lane hold is per node, not per transaction. laneHeld
looked up a lane's pending nodes in its own transaction's _asyncReporters;
lanes merge across transactions, so a merged reveal lost the other
member's async. waitingTransition(node) finds the live transaction blocked
on a node, whichever recorded it.
#3334 — a reveal holds on the lane flight it discovers, regardless of
stamp. read()'s pending branch showed a stale reader the committed value
of a node pending in another transaction (the stamp is bookkeeping, not
evidence the inputs are held); handleAsync's settle re-entry entered the
lane owner's transaction instead of the waiter's.
#3330 — a lane recompute compares against the slot it publishes (INV-11).
An OPT-dirty recompute compared against a transaction-staged
_pendingValue while publishing to _value and called an identical result
unchanged, revealing the override without its derivation.
laneReadsCommitted records a reader only when the commit changes what it
read.
#3331 — own-source arrival supersedes the override, with action
provenance (A18). A differing arrival marks the node
CONFIG_OVERRIDE_SUPERSEDED: tracked readers see the staged truth
(_supersededRead), the lane cascade is demoted and re-derives as held
transaction work, the override's downstream flight is inert; untracked
reads and the applied frame keep the override to the commit. Equal
arrivals confirm silently (the authoritative-observer wake lives in the
same hook). The scheduler carries the running action's sequence
(`origin`) through each slice and the landing's propagation; an answer
from an older action holds silently instead of superseding.
Store twins: a held adoption under a live transaction holds on optimistic
families too and stages its nodes at the outermost setter exit
(stageHeldAdoptions); a key first read under a held adoption is born
holding (stageHeldKey); notifyOptimisticWrites judges against the view
readers see; the authoritative landing on an override-covered node
dispatches to the engine (_landOnOverride). heldFromStale records a
reader served another transaction's committed value for that
transaction's commit replay. A settle that reverts optimism re-derives
its contested effects after the revert.
A15 reveal corollary re-ruled: the pending-branch carve-out returns,
gated on input visibility (CONFIG_INPUTS_PUBLISHED, a live lane, or an
uninitialized node refuse it); recompute drops a stale _gatedSubs
recording it is about to apply; a same-value re-prediction renews
_overrideStamp.
Floor 21,994 -> 22,457 (+463 B; budget 22,500); .size-limit.js caps
re-measured against next @ 4935c7d. Spec A15/A17/A18 amendments and the
2026-09-09 re-ruling log; INTERNALS-ASYNC §1–§3/§5; INTERNALS-STORE §3.
Closes #3335, closes #3334, closes #3330, closes #3331.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
1 parent 8366e09 commit b5bd6fb
28 files changed
Lines changed: 2625 additions & 142 deletions
File tree
- .changeset
- packages/signals
- docs
- src
- core
- store/next
- tests
- store
- scripts/size
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments