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 5417006
Browse filesBrowse the repository at this point in the historyBrowse files
fix(signals): seat a verdict reader per hold — the posture is released when the probed hold lands
A pass that probed (isPending/latest) or read a verdict memo (#4050) is a
verdict reader only while something it asked about is held. The probed
nodes are remembered per node (verdict.ts probeMemory; a render effect
laneDirty re-runs inherits the memo's) and resolved to their holds at use
(probesHeld/holdOf, through _fam.node for a derived store's leaves), so a
probed hold's landing releases the posture with nothing to walk; toward a
later, isolated hold the node is whatever its reads make it (D-25 as
amended 2026-11-01). CONFIG_VERDICT stays node-level; every site that seats
a pass on it now asks probesHeld: frameRead, read's staged fast path and
serve, the pending arm's observeFlight, stagedRead's effect push, the
store's node-less staging, the held re-pass arm, enterLane's guard,
laneRead's entered, a boundary's display-ahead swap. A boundary output's
fallback read brackets the memory as it does REACTIVE_PROBED.
Shadow: the 49 gated rows (4393 x28, 4491 x15, 4504 x4,
verdict-memo-flight-no-reask x2) and the #4544-clause rows (4439, 4362,
createProjection.async, fuzz-findings-l2, errored-recovery-wedge,
createErrorBoundary) no longer differ; lane rows unchanged; no new rows.
Pin flipped with citation: latest-two-readers-one-ask-4393 (beside, #4408)
— c1101 is display-ahead of the hold m1:1122 is the work of.
Co-authored-by: Claude via Cursor <[email protected]>
A verdict posture is per hold (D-25 as amended): a pass that probed (`isPending`/`latest`) or read a verdict memo is a verdict reader only while something it asked about is still held. The probed nodes are remembered per node and resolved to their holds at use, so a probed hold's landing releases the posture; toward a later, isolated hold the node is whatever its reads make it (#4393, #4491, #4504, #4544 clause).
Copy file name to clipboardExpand all lines: documentation/plans/seat-per-hold.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,7 +162,11 @@ Node-level `CONFIG_VERDICT` is still stamped at every window (`markVerdictReader
162
162
163
163
## 6. Mechanism sketch
164
164
165
-
**Representation.** Per node: `_seats: Transaction[] | null` — holds the node is a _verdict reader_ of (resolved through `resolveTx` at use; merges fold by identity). Work needs no new slot: it is `txOf(el)` + a staging, or `flushTransaction` at the head (in-flush), or `bornInto`. Mainline is the absence. Node-level `CONFIG_VERDICT` stays with its two remaining jobs (§3). The probed-node either-order service stays as today (it is node-level by construction: the probe and the plain read are of the same node in the same pass; the next pass's `CONFIG_VERDICT` carries it — exactly what `verdict-contract` L156 pins).
165
+
**Representation (as built, 2026-11-01 — approved in place of the `_seats: Transaction[]` sketch below).** Per node, a _probe memory_ (verdict.ts `probeMemory`, a `WeakMap`): the nodes its last asking pass asked about — its own tracked window reads (`verdictValue`, unless its creators read the future, #4341), the probes a verdict memo it read handed on (#4050, core.ts `read`), or, a render effect, those of the memo whose lane re-staging re-ran it (`laneDirty`). A pass's first contribution replaces the previous pass's list (`_depGen` names the pass). No hold is stored: the posture is _resolved to holds at use_ — `probesHeld(c, flush)` asks `holdOf(p)` of each remembered node now (a held node's transaction; a lane node's, the hold its lane is under; a derived store's leaf, whatever holds its family's derive, `_fam.node`, D-30; a node staged this flush or in flight and not held yet, the flush's hold to be — counted only for a read of the flush's own proposal, `flush`). So the posture is toward the hold that held the probed node at the probe and any hold it merged into (D-4: `resolveTx` is implicit — the node is simply held by the merged transaction), and released at that hold's landing with nothing to walk: after the landing nothing holds what the memory names. Node-level `CONFIG_VERDICT` stays as today — set by a window or a #4050 read, cleared by a pass that asked nothing, by the #3884 head clear and by `holdWork` — and every site that seats a pass on it now asks `probesHeld` too (`frameRead`, `read`'s staged fast path and `serve`, the pending arm's `observeFlight`, `stagedRead`'s effect push, store.ts's node-less staging, the held re-pass arm at the head, `enterLane`'s guard, `laneRead`'s `entered`, a boundary's display-ahead swap). Work needs no new slot: it is `txOf(el)` + a staging, or `flushTransaction` at the head (in-flush), or `bornInto`. Mainline is the absence. The probed-node either-order service stays as today (the probe and the plain read are of the same node in the same pass; `holdOf` of that node is the hold).
166
+
167
+
The original sketch, kept for the record:
168
+
169
+
**Representation (sketch).** Per node: `_seats: Transaction[] | null` — holds the node is a _verdict reader_ of (resolved through `resolveTx` at use; merges fold by identity). Work needs no new slot: it is `txOf(el)` + a staging, or `flushTransaction` at the head (in-flush), or `bornInto`. Mainline is the absence. Node-level `CONFIG_VERDICT` stays with its two remaining jobs (§3). The probed-node either-order service stays as today (it is node-level by construction: the probe and the plain read are of the same node in the same pass; the next pass's `CONFIG_VERDICT` carries it — exactly what `verdict-contract` L156 pins).
166
170
167
171
**Head decision** (`recompute`, replacing the scattered checks): compute once
168
172
@@ -183,7 +187,7 @@ stored on the pass as `passWork: Transaction | null` (one — D-4 merges two) an
183
187
184
188
**Display-ahead mount's children becoming T's work (#4574).** Falls out of row 1 + row 6: the mount is mainline toward T, its first pass reads the in-flush staging → `passWork = T` → its `insert` effects are created with `bornTx = T`. The web `test.fails` row flips without a web change.
185
189
186
-
**Release at landing.**`land` (scheduler.ts:1259–1288) walks `T._reruns` (verdict readers already listed by `staleReader`) and removes `T` from each `_seats`; a node never listed never had `T`. Merges: `_seats` entries resolve through `_into`; duplicates are harmless.
190
+
**Release at landing.**As built: none to perform — `probesHeld` resolves the remembered nodes to their holds at use, and a landed hold holds nothing. (Sketch: `land` (scheduler.ts:1259–1288) walks `T._reruns` and removes `T` from each `_seats`.)
187
191
188
192
**Byte class (estimates, not measured).** Core floor: **0 B** — `_seats`, `passWork`/`passVerdict` live behind `observeFlightHook`/`laneStageHook`; without them `frameRead` folds to today's `t === flushTransaction || bornInto`. `+ isPending/latest`: +60–120 B br (the array slot, `markVerdictReader(c, t)`, head fold, `land` release) **minus** the removed per-site checks (`frameRead`'s `!verdict`, `stagedScreen`'s arm, `enterLane`'s mask, `route`'s guard) — net plausibly +40–80 B br; the maintainer's stop line on the option-2 probe was +60 B, so this is at the line. Live page: same order (+80–150 B br). The S1 rebuild's +1061 br came from the seat _stack_ and its restores; this design has one array per probed node and two pass locals.
0 commit comments