Skip to content

Commit 79df376

Browse files
ryansolidclaudecursoragent
authored
docs(signals): the direction rule — a hold never waits on work that has never committed (#3820)
A dated SPEC amendment (2026-10-06) naming the rule the create-time fixes each implement by checking commit status: the loading-source rule, #3814 (#3802), and the pending #3800 and in-flush #3540 fixes. The same-tick and in-flush shapes are recorded as not yet one-way and pinned it.fails in tests/direction-rule-probe.test.ts; the boundary shape passes today. Cross-references in INTERNALS-ASYNC-STATE.md §0 and the carve plan. Co-authored-by: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
1 parent 076a250 commit 79df376

5 files changed

Lines changed: 186 additions & 49 deletions

File tree

‎documentation/plans/size-reduction-carve-step1.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,8 @@ A34 items are the next step's.
956956
node _status_ rather than by a join: a pending uninitialized node with
957957
no observer. If a boundary step wants loading sources held for a
958958
fallback, this is the hook.
959+
(2026-10-06: an instance of the direction rule — a hold never waits on
960+
work that has never committed; SPEC, "The hold model — L2".)
959961

960962
---
961963

‎packages/signals/docs/INTERNALS-ASYNC-STATE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ruling. Anything marked `[ruled]` cites the decision.
1717

1818
**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).
1919

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.
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.
2121

2222
**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).
2323

0 commit comments

Comments
 (0)