Skip to content

Commit 46a72c0

Browse files
feat(signals): a question is asked only of the truth — F-2's producer clause on the M1 lane model (S-51..S-57, S-46, #4689) (#4717)
* refactor(signals): lane values on the node's two slots (spike M1) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * refactor(signals): per-node lane record and shown mark (spike M1) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * docs(signals): a question is asked only of the truth — F-2/F-6 amended, S-51..S-57 ruled, truth-asks oracle (on M1) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * docs(signals): undo two unrelated reformats Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * docs(signals): §17 — building the producer clause: marker, the two reads, what the verdict lane loses Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): F-2's producer clause — an asker reads the truth, never the screen (S-51); verdict lane carries no asks Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * docs(signals): S-51 built — what the verdict lane keeps, the cost, the pins Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * fix(signals): a netted staging is no proposal for an asker either (D-8) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * docs(signals): rules index regenerated Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-54 — pending stays true for a landed answer the lane still holds; the netted test first Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-53 — a held recovery to the last good value is a change of answer; latest shows it ahead Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-56 — a guess before the first answer shows; the memo-form dev guard goes Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-52 — a render effect probing a flight observes it; the #4349 shape shows pending beside the kept value Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-57 — a write whose derivation became a guess's lane work holds on that flight and reveals with the lane Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-46 plain row — a mount a probing pass opens is born held; a verdict lane reveals it at the landing Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * revert(signals): S-46 plain row — +43 B on the core floor; rebuilt cheaper next Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): S-46 plain row as a creation-time stamp — a probing pass's mount is born held; +8 B on the core floor Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * refactor(signals): S-57's wait moves out of the core — listed on the lane from laneStage, the frame found through over Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * feat(signals): latest keeps a displayed guess over a correction until the commit (#4689, D-34 decision 3) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * refactor(signals): read the creator's flags once per first pass Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * chore(size): raise the feature-chunk caps for the producer clause; the live page floor under a Size-Exception Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * test(web): #4375 hydration pin asks of the truth — no display-ahead m0:4 (S-51) Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * refactor(signals): the S-46 seam finds a born-held mount on the held lists, not by walking owner trees Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> * chore: changeset for the producer clause Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com> --------- Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
1 parent a4bd027 commit 46a72c0

55 files changed

Lines changed: 2605 additions & 979 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
A question is asked only of the truth (F-2's producer clause, F-6's limit), on the M1 lane value model. An async derivation that reads a held value plainly beside `latest()`/`isPending()` is the hold's work: it asks once, of the truth, never of the value the screen keeps (S-51, #4677). `isPending` stays true for a landed answer the lane still holds on a sibling's flight (S-54, #4685). A held recovery to the last good value is a change of answer and `latest` shows it ahead, so an errored boundary recovers while the action is open (S-53, #4403). A guess written to an optimistic memo before its first answer shows and the first answer judges it (S-56; the memo-form `OPTIMISTIC_WRITE_BEFORE_LOAD` guard is gone, the store form keeps it). `[isPending(x), x()]` shows pending beside the kept value in every shape, a sync-ending action included (S-52, #4349). A plain write whose derivation became a guess's lane work holds on that flight and reveals with the lane (S-57). The branch a display-ahead `<Show>` opens is born held: the fallback stays through the flight and the branch attaches at the landing, for `<Show>` and the compiled ternary alike (S-46's plain row). `latest()` of a displayed optimistic guess keeps the guess over a correction until the commit, for a signal and a superseded keyed row (#4689).
6+
7+
Lane values now live on the node's two slots with the cover recorded explicitly (M1): the separate lane slot, `display()` and `laneValueOf` are gone.

‎documentation/plans/optimism-seam-spike-brief.md‎

Lines changed: 124 additions & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,153 @@ The findings that used to follow here (§5a–§5h, 2026-07-06 → 2026-07-16) a
325325

326326
## 7. Decision log
327327

328+
- 2026-11-07: **A question is asked only of the truth** (F-2's producer
329+
clause; F-6's limit). Prompted by GabbeV's `experiment/unified-updates`
330+
(its tests run against `next`, the differing screens tabled as S-51–S-56)
331+
and settled on #4677: the badge, an async memo over `id` and
332+
`isPending(id)`, asked `badge(0, true)` from its display-ahead pass while
333+
the engine held `id = 1`. The stale ask was licensed by L2's rule 6
334+
(2026-10-04, "a verdict reader of a held node is the holder's verdict
335+
lane's — shown now"), which seated the reader's whole pass, body included,
336+
in a lane; A10's atomic pair (#2831, 2026-07-06) made the pass runnable on
337+
the committed value; Decision 1 and the D-25 collapse (2026-11-05)
338+
generalized it to memos and read #3905 as "not needed". The model as
339+
ruled: one version per node; the hold is the only producer of a change's
340+
consequences; the display — render effects, compiled bindings, user
341+
effects (their callback runs at the frame they belong to), and the sync
342+
derivations feeding them — is the one declared, terminal, kept-not-computed
343+
inconsistency, so memo-inline parity holds and S-27's memo row stands; the
344+
act is the async derivation, which is the hold's wherever it is reached;
345+
`latest` is never stale and `isPending` is a fact, readable anywhere; a
346+
guess is not stale until corrected (D-34 already said so); inside a hold's
347+
work a verdict about that hold is answered. #3905 is not warranted: the
348+
display lane cannot ask, so there is nothing to propagate. Full #3905 (two
349+
versions everywhere) was weighed and declined — the inconsistency is meant
350+
to be narrow. Rows: S-51 (one question, of the truth; the `isPending` hole
351+
shows at once), S-52 (the #4349 held shape was the odd one out), S-53
352+
(`latest` shows a held recovery ahead, value/error symmetry), S-54
353+
(pending stays true for a held, unshowable answer), S-56 (a guess before
354+
the first answer shows); S-55 standing (F-11). Built the same day for S-51
355+
(`askerJoins`, core `frameRead`/`read`, verdict.ts, scheduler `laneDirty`,
356+
the seat table's V0/Vp0 rows): the marker is `CONFIG_ASYNC` kept across
357+
windows (`holdWork` pairs it with CONFIG_OWN_PROBE); a plain or
358+
`isPending` read of a held or staged node by such a pass joins the frame
359+
and un-seats it from a verdict lane; it is re-derived by neither the seam
360+
nor a verdict lane's pass; it carries no inherited verdict posture, so a
361+
memo over it inherits none (#4504). `latest`-only askers stay lane work
362+
(F-6), so the verdict lane keeps those flights — the simplification §17
363+
hoped for is not there. Cost: +205 B brotli on the isPending/latest chunk.
364+
The `truth-asks` oracle's twelve gate cases became improvements; 29 pins
365+
in four files lost their display-ahead questions. S-54 built next
366+
(verdict.ts, the lane-node probe arm): a lane derivation's answer that
367+
landed while the lane is held on a sibling's flight keeps `isPending`
368+
true for a reader outside the lane, which re-derives at the reveal
369+
(`staleReader(c, l)`); three checkout pins in `createOptimistic.test.ts`
370+
changed (opacity waits for the lane while `latest()` text shows ahead).
371+
+34 B brotli on the isPending/latest chunk. S-53 built next (core.ts
372+
`recompute`, scheduler.ts the park): a recovery to the last good value
373+
in a flush that has joined a hold is a change of answer, so it stages
374+
with the shown error and is held, where before it published silently
375+
(`settleErroredDependents`, #2949's path) and left the display-ahead
376+
readers downstream with nothing to show ahead of — the `Show` it gated
377+
was held whole and the boundary kept `[E]` until the landing; the park
378+
no longer nets a staging that replaces a shown error. `latest` of the
379+
held recovery shows it ahead as it shows a held value, the readers are
380+
verdict-lane work, and the boundary recovers at the lane's seam. Unheld
381+
recoveries keep the silent path (same screen; #2701's boundary
382+
depends on it). The #4403 pin flipped. S-53's plain-read case (`′`) is
383+
S-46's plain row: the branch born held, the `Show` waits — today the hole
384+
attaches empty (#4417's mechanism), which the shown error masked before.
385+
+11 B brotli on the core floor. S-56 built next: the memo-form setter
386+
no longer calls `devGuardOptimisticBeforeLoad` (signals.ts) — the engine
387+
already carried a guess over an uninitialized node as its lane value, so
388+
the guess shows in place of the loading, `isPending` is true while the
389+
first flight is up, the function form receives `undefined`, and the first
390+
answer judges it; a guess whose lane never shows is void at the
391+
correction as before (the A18 d pin). The guard stays for derived
392+
optimistic stores: without it the store's screen stays loading while an
393+
untracked read sees the guess, and the first answer folds the guess in
394+
rather than judging a shown one — store engine work, parked with the
395+
store branch. Three pins flipped. S-52's #4349 shape built next
396+
(verdict.ts `observeFlight`): a render effect routed into a verdict lane
397+
no longer reads a flight "as lane work" that holds nothing (the D-26
398+
arm, #4661) — it observes the flight as a memo reading the same pair
399+
does (`verdictRead`, a frame reader), so an action ending inside the
400+
call is held on the flight it just probed instead of landing beneath it
401+
(CONFIG_INPUTS_PUBLISHED, #3305) and re-running the effect on the
402+
committed world, where the published-inputs read parked it. The pair
403+
shows `[true, 41]` ahead in every shape — render effect or memo, probe
404+
before or after the plain read — and the landing reveals `[false, 42]`.
405+
One pin flipped (the #4349 file's last case); the refresh shapes are
406+
unchanged. A few bytes fewer. Last, S-57 (the experiment's A2, "optimism
407+
winning when combined"): a plain write whose derivation became a guess's
408+
lane work was published beside the stale derivation because the lane had
409+
taken the only question; ruled F-2 as written — the write holds on the
410+
lane's flight and reveals with it, the frames entangled. Built the same
411+
day (lanes.ts `laneStage` → `laneWait`, at the tail of the lane pass —
412+
first as a core hook from `recompute`'s NotReady arm, moved out of the
413+
core the same day): a pass that read this flush's staging, ran as a
414+
guess's lane's and went pending makes the flush join a frame, lists the
415+
node on the lane (`Transaction.waits`, on the lane; `lanesBlocked` finds
416+
the frame through `over` with `liveTx`, so a frame merged since still
417+
waits — the `merge` append this replaced was 21 B brotli of core) and
418+
sets the lane `over` the frame, so the lane's work reads the frame's
419+
staging as its own world (core `frameRead`'s `over` arm) and holds while
420+
the frame does (`laneSeam`): one question (`label(5, 10)`), one reveal. The pass is
421+
dropped from `stagedReaders` so the seam does not re-ask the old world's
422+
question. Not the hold's own work (its parent already waits on the lane,
423+
`nestedBlocked`), not a verdict lane's `latest`-only asker (the same
424+
sentence, not built: the write publishes as before), and not a lane
425+
already over another live frame (a keyed rebase over a landing's answer,
426+
#4536 — `over` is one slot): the write publishes as before, beside the
427+
lane's answer to its old question (#4577's matrix keeps its screens).
428+
No pin flipped; the S-57 row's case 1 is standing. S-46's plain row built
429+
last, prompted by PR 4708 (the probe-gated mount without `<Show>`'s hop):
430+
a first pass under a pass that probed is stamped CONFIG_MOUNT_AHEAD at
431+
`recompute`'s head (one test of the creator's REACTIVE_PROBED, inside the
432+
existing lane-engine block), and core.ts `frameRead` no longer serves such
433+
a render effect the screen on its first pass: the branch a display-ahead
434+
read gates is a mainline mount whose first read of the hold's staging or
435+
flight is born held, not a D-3 leaf. lanes.ts `lanesBlocked` holds a
436+
verdict lane's reveal while a stamped render effect in its nodes' frames
437+
is born held and still waiting — on its own flight, or on a flight its
438+
frame holds (`mountPending`; only flights count, an orphaned first-mount
439+
leaf would otherwise deadlock the lane): revealed earlier, the branch
440+
attached with its hole empty (#4417) or with the committed value a seam
441+
re-derive's mount read (S-46's ✗ rows). Real `<Show>` and the compiled
442+
ternary keep the fallback through the flight and attach at the landing;
443+
the e1-3289-1831 pin flipped to `[F]` for that step and the S-46 row's
444+
case 1 is standing. A first build walked the owner chain on every held
445+
read (+43 B brotli on the core floor) and was reverted for the stamp
446+
(+8 B core, +96 B on the isPending/latest chunk — the seam walk). Not
447+
built: a hop-less single-memo gate (the branch reads the probing memo
448+
directly, PR 4708's target) still attaches with its hole empty — the
449+
insert effect reading it is routed into the verdict lane and its run goes
450+
with the lane's reveal; a mount whose own pass reads another node ahead
451+
(`[latest(m2), m0()]`, PR 4708's exact scenario) is served `m0`'s committed
452+
value by the verdict arm (A10 generalized to a different node, which D-25
453+
narrowed); S-53′ likewise. PR 4708's own two pins do not flip: its `gate`
454+
variant in the runner does not model the compiled ternary (real JSX
455+
paints at the landing, the runner's gate never does). After the day's
456+
trims the core floor is 7,423 B brotli (M1 7,406, cap 7,430) and the
457+
compiled hello world 9,979 B (cap 9,980): S-53 ~10 B, S-46's stamp ~8 B;
458+
the isPending/latest chunk carries the rest (+415 B over M1, the seam
459+
walk `mountPending` ~335 B minified the next thing to trim). Last, D-34's
460+
`latest` clause (decision 3, #4689): a shown guess a correction re-homed
461+
into its hold (`supersede`/`dissolveLane` mark it, `keptGuess`) keeps the
462+
screen's value for `latest` while the hold is blocked — verdict.ts's held
463+
arm returns `_value` before `heldLatest`; once the hold lands (`blocked`
464+
false) the landing's re-derive reads the staging, so a `latest`-only
465+
reader shows the truth at the commit and not a frame later. Built for a
466+
signal and for a superseded keyed row; seven pins flipped from "latest
467+
answers the truth" to the displayed guess (#4336's signal form, #4329,
468+
#3698, #3331's entangled and provenance cases). Not built for a lane a
469+
correction folded under (rows removed, `Transaction.folded`): `latest`
470+
of a folded guess reads the world whole as before — kept rows beside the
471+
truth's length tore inside one `latest` (#4336's store forms) when tried
472+
per leaf; the arrangement needs to be kept as a whole or not at all.
473+
+25 B brotli on the isPending/latest chunk, 0 on the core floor.
474+
328475
- 2026-07-17: **A18 store corollary — per-transaction optimistic layer**
329476
(#2899). `createOptimisticStore`'s override layer is one record per store
330477
target, but a settling action must consume only its own entries: layer

0 commit comments

Comments
 (0)