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 b26f40e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(signals): a Show branch mounted by a held write reads the value that mounted it (#4010)
A binding in a branch a held pass mounted is a member of that pass's held
frame (ruling A): the branch exists only in the transaction. Only a member
that had never run (STATUS_UNINITIALIZED) was treated as born into it; one
whose first pass published before the seam held it was served the
committed screen whenever it ran again before the landing — `frameRead`
made it a stale reader, `recompute` published it mainline, and
`stagedScreen` served a verdict reader the committed value in the
transaction's own flush. A non-keyed Show's narrowed accessor then read the
committed `null` and threw into <Errored>; since #3977 an unchanged landing
left the error up.
The park seam now flags every member of a held pass's frame
(CONFIG_HELD_FRAME, cleared by its commit), and `bornInto(c, t)` — held by
t and uninitialized or flagged — replaces the uninitialized-only test in
`recompute`, `frameRead` and `stagedScreen`. `observeFlight` likewise no
longer serves such a verdict reader the committed value of its own
transaction's flight: it waits with its frame. Without that, a member that
probes and reads the flight let the transaction land under it and was
re-derived into a fresh observation every round (an infinite flush loop).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01NcUAu8BQ6Xsf8XRBhr9V1w
A branch a held write mounts reads the value that mounted it on every pass. A binding in the new branch of a non-keyed `<Show>` that ran again before the landing — because it probes `isPending` on data the same write started loading, or because a live write reached it — was served the committed screen, where the condition is still `null`, and threw into `<Errored>` (where an unchanged landing then left the error up). Members of the frame a held pass built are now flagged at the park seam and read their transaction's world whichever flush runs them; a verdict reader among them waits on the transaction's flight with its frame instead of being served the committed value (#4010).
**State.** A node is `_value` (committed) or `_pendingValue` (staged for this flush). Cold state lives on the node's extension `_x`: `_transaction` (the `Transaction` holding it, `CONFIG_HELD`), `_lane` (a lane's value for it, `CONFIG_OVERRIDE`; `CONFIG_GUESS` for a written guess), `_q` (the question a flight answers — A18 provenance), `_reask` (a quiet re-ask's classification, A19 exc. 2), `_marks` (`affects()` count), `_pendingSources`/`_inFlight`/`_error` (the async core, unchanged). Per-pass flags on `_flags`: `REACTIVE_JOINED` (the pass read the future), `REACTIVE_FRAME_READ` (a stale reader, re-derived at the landing), `REACTIVE_STAGED_READ` (the pass read this flush's staging as the screen), `REACTIVE_LANE_READ`/`REACTIVE_SCREEN_READ` (lane work), `REACTIVE_PROBE_UNANSWERED` (a verdict probe answered before the flush had a transaction), `REACTIVE_REASK`, `REACTIVE_ZOMBIE` (a parked frame's child).
19
19
20
-
**Transaction** (`core/scheduler.ts`): `_nodes` (what it holds), `_reruns` (stale readers to re-derive at its landing), `_queues` (stashed effect runs), `_open` (actions running in it), `_lane`/`_parent`/`_verdict`/`_shown`/`_held` (lanes), `_into` (merged — `resolveTx`), `_marks`. The flush's seam (`settle`): run the heap; the lane corrections; `joinFuture` decided the flush's transaction (a pass went pending, a read of a held node joined); every staged node of the flush is held (`holdNode`) with its pass's frame (`holdFrame`) — a loading source is nobody's frame, a tick that nets to the committed value is no proposal (A34 (2)) — and the store holds the node-less stagings (`_storePark`); the lane seams; every transaction no frame waits on lands (`land`: `commitPendingNode` over `_nodes`, `reruns`, `releaseQueues`); the store folds (`_storeCommit`). `blocked(t)`: an open action, or a pending node it holds that a frame reader observes (`blockedBy`/`onScreen`), or a lane under it blocked. Membership is one relation (`merge`), so the direction rule (SPEC "The hold model — L2", 2026-10-06: a hold never waits on work that has never committed) is implemented where a node's commit status is checked — the loading-source skip, the boundary scope, the born-held enqueue and landing — not by the transaction.
20
+
**Transaction** (`core/scheduler.ts`): `_nodes` (what it holds), `_reruns` (stale readers to re-derive at its landing), `_queues` (stashed effect runs), `_open` (actions running in it), `_lane`/`_parent`/`_verdict`/`_shown`/`_held` (lanes), `_into` (merged — `resolveTx`), `_marks`. The flush's seam (`settle`): run the heap; the lane corrections; `joinFuture` decided the flush's transaction (a pass went pending, a read of a held node joined); every staged node of the flush is held (`holdNode`) with its pass's frame (`holdFrame`; its members are flagged `CONFIG_HELD_FRAME` until their commit — born into the transaction, `bornInto`: they read its world whichever flush runs them, #4010) — a loading source is nobody's frame, a tick that nets to the committed value is no proposal (A34 (2)) — and the store holds the node-less stagings (`_storePark`); the lane seams; every transaction no frame waits on lands (`land`: `commitPendingNode` over `_nodes`, `reruns`, `releaseQueues`); the store folds (`_storeCommit`). `blocked(t)`: an open action, or a pending node it holds that a frame reader observes (`blockedBy`/`onScreen`), or a lane under it blocked. Membership is one relation (`merge`), so the direction rule (SPEC "The hold model — L2", 2026-10-06: a hold never waits on work that has never committed) is implemented where a node's commit status is checked — the loading-source skip, the boundary scope, the born-held enqueue and landing — not by the transaction.
21
21
22
-
**Read** (`core/core.ts`): the fast block for a plain signal; `frameRead` (a render effect, a verdict reader, lane work — the screen, `staleReader`); `joinPass` (a held node's staging — the pass is the transaction's); `stagedRead` (this flush's staging as the screen); a pending node served committed to a frame reader (`_observeFlight` — the verdict module's hook). `recompute` decides the pass's frame after the pass (`CONFIG_STAGED`, held children, zombies).
22
+
**Read** (`core/core.ts`): the fast block for a plain signal; `frameRead` (a render effect, a verdict reader, lane work — the screen, `staleReader`; not a reader born into the node's transaction, `bornInto`: it has no screen); `joinPass` (a held node's staging — the pass is the transaction's); `stagedRead` (this flush's staging as the screen); a pending node served committed to a frame reader (`_observeFlight` — the verdict module's hook). `recompute` decides the pass's frame after the pass (`CONFIG_STAGED`, held children, zombies).
23
23
24
24
**Lanes** (`core/lanes.ts`): `optimisticWrite` → `pendingGuesses` → `applyGuesses` at the seam opens the lane under the frame's transaction; `laneValueOf`/`display`/`guessedValueOf`; `enterLane`/`laneRead` (lane work; untracked reads enter); `laneWrite` (a landing on a lane's node — `stale(el, question)` holds an older answer beneath the guess, `supersede` resolves a differing truth); `laneOutcome`; `dissolveLane`/`endLanes`; `laneSeam` (blocked parks, unblocked shows); `_laneSeams` (passes that read a parked staging re-derive); `linkBlocked`; `_laneRebase` is the store's (keyed re-base of an older truth beneath an arrangement guess).
Copy file name to clipboardExpand all lines: packages/signals/docs/RULES-INDEX.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
73
73
| A26 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:111`| — | action-await-contract.test.ts×2 fuzz-findings-l2.test.ts×1 posture-store-parity.test.ts×2 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×1 visibility-oracle.test.ts×1 |[ruled 2026-07-17] An ambient transaction window is one flush; parking is flush-driven — (**ruled 2026-07-17**, #2913; **enforcement hardened 2026-08-31**, #3141 — parking is flush-driven, and a trans… |
74
74
| A27 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:301`| — | loading-value.test.ts×2 visibility-oracle.states.ts×18 visibility-oracle.test.ts×1 |[ruled 2026-08-10] The commit-#0 loading window is loading-class and verdict-quiet — (**ruled 2026-08-10**) **The commit-#0 loading window is loading-class and verdict-quiet.** A node born committed v… |
75
75
| A28 | ruled, mechanism landed |`docs/SPEC-ASYNC-SEMANTICS.md:95`| constants.ts×1 core.ts×12 lanes.ts×2 scheduler.ts×3 types.ts×1 verdict.ts×2 store.ts×4 | createOptimistic.test.ts×5 fuzz-findings-l2.test.ts×6 held-derivation-not-a-proposal-3612.test.ts×1 issue-3800-repro.test.ts×1 latest-held-till-flush.test.ts×1 posture-store-parity.test.ts×5 question-scoped-pending.test.ts×3 snapshot-derived-store-rows.test.ts×1 createOptimisticStore.test.ts×10 optimistic-draft-visibility-3665.test.ts×5 optimistic-list-mutation-matrix.harness.ts×1 optimistic-list-mutation-matrix.test.ts×2 shallow.test.ts×1 woken-transaction-adopts-staged-bump.test.ts×1 treeshake.test.ts×2 verdict-contract.test.ts×1 visibility-oracle-store.states.ts×8 visibility-oracle.states.ts×8 |[ruled, mechanism landed 2026-09-15] A write becomes visible at flush — to every channel — (**ruled 2026-09-08**; supersedes the #2922 mid-tick pull) **A write becomes visible at flush — to every chan… |
76
-
| A29 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:119` | boundaries.ts×1 action.ts×1 constants.ts×1 core.ts×13 effect.ts×1 lanes.ts×1 scheduler.ts×4 signals.ts×1 store.ts×1 | adoption-unchanged-key-read-3706.test.ts×9 body-end-supersession-visibility.test.ts×1 born-held.test.ts×3 boundary-not-born-held-3540.test.ts×4 createProjection.draft-lifetime-3585.test.ts×1 direct-commit-readers-posture.test.ts×1 fuzz-findings-l2.test.ts×6 held-conditional-memo.test.ts×1 held-frame-dependencies.test.ts×2 held-truth-lane-only.test.ts×3 l2-contract.test.ts×1 latest-held-till-flush.test.ts×2 loading-fallback-in-flush-3540.test.ts×6 loading-on-frame-following-3540.test.ts×1 mount-over-foreign-hold-3761.test.ts×1 optimistic-mount-nested-memo-3835.test.ts×1 optimistic-read-lane-not-transaction-3698.test.ts×3 posture-born-held-and-observation.test.ts×1 posture-store-parity.test.ts×6 derived-presence-async-3726.test.ts×3 optimistic-untracked-reads-f3-f5.test.ts×1 store-unchanged-read-independent-write-3688.test.ts×1 tick-scoped-pass-transaction.test.ts×2 treeshake.test.ts×3 verdict-mount-first-pass-3851.test.ts×2 verdict-mount-loading-flush-loop.test.ts×2 visibility-oracle-store.states.ts×5 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×9 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-09-13 (#3408)] A tracked read served a live transaction's staged value enters that transaction — A tracked computation served a node's staged `_pendingValue` — a value a … |
76
+
| A29 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:119` | boundaries.ts×1 action.ts×1 constants.ts×1 core.ts×14 effect.ts×1 lanes.ts×1 scheduler.ts×4 signals.ts×1 store.ts×1 | adoption-unchanged-key-read-3706.test.ts×9 body-end-supersession-visibility.test.ts×1 born-held.test.ts×3 boundary-not-born-held-3540.test.ts×4 createProjection.draft-lifetime-3585.test.ts×1 direct-commit-readers-posture.test.ts×1 fuzz-findings-l2.test.ts×6 held-branch-verdict-reader-4010.test.ts×1 held-conditional-memo.test.ts×1 held-frame-dependencies.test.ts×2 held-truth-lane-only.test.ts×3 l2-contract.test.ts×1 latest-held-till-flush.test.ts×2 loading-fallback-in-flush-3540.test.ts×6 loading-on-frame-following-3540.test.ts×1 mount-over-foreign-hold-3761.test.ts×1 optimistic-mount-nested-memo-3835.test.ts×1 optimistic-read-lane-not-transaction-3698.test.ts×3 posture-born-held-and-observation.test.ts×1 posture-store-parity.test.ts×6 derived-presence-async-3726.test.ts×3 optimistic-untracked-reads-f3-f5.test.ts×1 store-unchanged-read-independent-write-3688.test.ts×1 tick-scoped-pass-transaction.test.ts×2 treeshake.test.ts×3 verdict-mount-first-pass-3851.test.ts×2 verdict-mount-loading-flush-loop.test.ts×2 visibility-oracle-store.states.ts×5 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×9 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-09-13 (#3408)] A tracked read served a live transaction's staged value enters that transaction — A tracked computation served a node's staged `_pendingValue` — a value a … |
77
77
| A30 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:257`| async.ts×3 attribution.ts×1 constants.ts×1 core.ts×1 effect.ts×1 lanes.ts×1 scheduler.ts×5 | async-landing-deps-3461.test.ts×3 fuzz-findings-l2.test.ts×3 held-conditional-effect.test.ts×1 held-conditional-memo.test.ts×1 held-frame-dependencies.test.ts×2 ispending-in-boundary-on-3528.test.ts×1 lane-frame-deferred-run-3662.test.ts×1 lane-frame-held-lane-3662.test.ts×1 posture-born-held-and-observation.test.ts×1 treeshake.test.ts×2 write-proposals-3494.test.ts×2 zombie-rerun-after-commit-3546.test.ts×2 |[ruled 2026-09-13 (#3410)] A memo's dependencies are the committed frame's until the frame is replaced — A pass that _staged_ its value has not replaced the committed frame, so the committed value sti… |
78
78
| A31 | live |`docs/SPEC-ASYNC-SEMANTICS.md:131`| boundaries.ts×1 core.ts×1 lanes.ts×1 verdict.ts×2 | fuzz-findings-l2.test.ts×6 ispending-combined-atomic-3442.test.ts×1 |[live 2026-09-14 (#3442)] A memo computes under its own lane posture, never its puller's — A memo's value is one shared slot every reader sees, so its pass runs under the lane posture the memo itself … |
79
79
| A32 | ruled |`docs/SPEC-ASYNC-SEMANTICS.md:139`| core.ts×4 lanes.ts×1 store.ts×1 | visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×9 visibility-oracle.test.ts×1 |[ruled 2026-09-14] Children-forbidden readers see the frame, not the graph — `createTrackedEffect` and `onSettled` callbacks are effect-phase code that runs after the frame is decided. They read the f… |
0 commit comments