diff --git a/.changeset/latest-error-publication.md b/.changeset/latest-error-publication.md new file mode 100644 index 0000000000..4809ed7255 --- /dev/null +++ b/.changeset/latest-error-publication.md @@ -0,0 +1,5 @@ +--- +"@solidjs/signals": patch +--- + +An error seen through `latest()` now publishes with its reader, as a value would. Inside an open action, an `` around `latest(m)`, or around a memo of it, shows `m`'s held error ahead, and later errors and the recovery reach that fallback the same way. Plain readers still wait for the reveal (D-41). diff --git a/packages/signals/docs/RULES-DERIVED.md b/packages/signals/docs/RULES-DERIVED.md index d27c2ef4b3..2d6dbf9fb6 100644 --- a/packages/signals/docs/RULES-DERIVED.md +++ b/packages/signals/docs/RULES-DERIVED.md @@ -258,7 +258,7 @@ When a guess's own source answers: an equal answer confirms silently; a differen **From:** F-2, F-1, F-12. **Rows:** S-38, S-42, S-43, S-53. **Pins also:** `tests/error-is-an-answer.test.ts`, `tests/watch-error-outcomes.test.ts`, `tests/errored-recovery-wedge-4403-4404-4405.test.ts`. **Ruled 2026-10-15** (Q-6 B, from #3886; first drafted as D-40 in #3995). -A rejection, a compute-phase throw or a comparator throw is the answer to the question its node asked. As an answer it _settles_ the async: a hold never waits on an errored flight, and nothing here changes what a hold waits for. But settled is not shown. A value that lands on a held node is staged until the frame reveals (F-2); an error that lands on a held node is staged the same way, because the error fallback is content (F-4) and showing it beside the previous frame's other content is the torn screen F-1 forbids. Until the reveal: the screen keeps what it showed, an ordinary outside read serves the committed value (it reads the screen, D-29, D-34), `createEffect`'s error arm does not run, `` does not flip, `resolve`/`until`/`refresh` do not reject (D-31), `isPending` of it is `true`, and `latest` of it throws the proposed error — the one way to see the answer early (F-6). At the reveal the error and everything that waited with it show as one frame: the arm runs, the boundary shows its fallback, the outside read throws, `isPending` is `false`. +A rejection, a compute-phase throw or a comparator throw is the answer to the question its node asked. As an answer it _settles_ the async: a hold never waits on an errored flight, and nothing here changes what a hold waits for. But settled is not shown. A value that lands on a held node is staged until the frame reveals (F-2); an error that lands on a held node is staged the same way, because the error fallback is content (F-4) and showing it beside the previous frame's other content is the torn screen F-1 forbids. Until the reveal: the screen keeps what it showed, an ordinary outside read serves the committed value (it reads the screen, D-29, D-34), `createEffect`'s error arm does not run, `` does not flip, `resolve`/`until`/`refresh` do not reject (D-31), `isPending` of it is `true`, and `latest` of it throws the proposed error — the one way to see the answer early (F-6). That error is the display-ahead reader's answer, published as its value would be (ruled 2026-11-09, #4705): an `` around `latest(m)`, or around a memo of it, shows its fallback now, in the reader's lane, and later errors and the recovery reach that fallback the same way; the clauses above are a plain reader's. At the reveal the error and everything that waited with it show as one frame: the arm runs, the boundary shows its fallback, the outside read throws, `isPending` is `false`. Recovery is the mirror: a shown error stays the display until the frame that carries its replacement reveals — through a pending retry, and through a held recovery, success or a different failure. A recovery to a value equal to the last good one is still a change of answer: payload equality never silences it, held or not. `latest` is the mirror's exception as it is the error's: as `latest` throws a proposed error early, it shows a held recovery early — the newest answer produced — so a `Show` gated on `latest(m)` recovers while the action is open (S-53, ruled 2026-11-07, not built; the plain-read rows S-42 and S-43 are unchanged). @@ -268,6 +268,8 @@ A first load that rejects has no previous content to keep: born held (D-2), it s **Built 2026-10-15.** An error a held node's flight or pass finds is staged in `_pendingValue` (CONFIG_STAGED_ERROR) and committed with the frame, which publishes it through the ordinary error path; a held recovery keeps the shown error (`_shownError`) until its own commit, and a recovery equal to the last good value is a change of answer, held or not. `watch` (`resolve`, `until`, `refresh`) rejects at the landing. The duplicated immediate-publish path is gone. Pins: `tests/error-is-an-answer.test.ts`, `tests/watch-error-outcomes.test.ts` (GabbeV, #3886). +**Built 2026-11-09 (#4705, GabbeV).** A boundary that catches an error a lane read threw takes the reader's lane for its swap (`caught`), and the swap's pass enters it, so the fallback, its `error` accessor and the recovery publish with the reader; `laneRead` enters the lane for an errored member as for a value, so a memo over `latest(m)` selects the same update before it throws. Pins: `tests/latest-derived-sync-error-4377.test.ts` (held rows flipped), `tests/latest-uninitialized-over-latest-4362.test.ts`, `web/test/latest-error-publication.spec.tsx`. + **S-53 (built 2026-11-07).** `latest` is the mirror's exception for a held recovery as for a proposed error: it shows the newest answer `m` produced, so a `` under an errored boundary opens while the action holding the recovery is open, and the boundary recovers with it; a recovery equal to the last good value is that answer. A plain read keeps the error until the landing (the mirror clause), and the content a display-ahead `Show` opens is S-46's mount (born held when it reads the staging plainly). Mechanism: `INTERNALS-ASYNC-STATE.md` §7, the 2026-11-07 entry. Pin: `tests/errored-recovery-wedge-4403-4404-4405.test.ts` (#4403). **Derived stores (closed 2026-10-30, #4489).** A derived store's (`createStore(fn)`, projections, optimistic stores) held rejection is staged like a memo's: an untracked read of its property reads the screen until the frame reveals. Pinned in `tests/error-is-an-answer.test.ts` and `tests/optimistic-held-error-untracked-read-4489.test.ts`. The standalone cases from #3886's audit (a write to a failed writable memo, error-wrapper formatting, comparator release, snapshot capture) are not this rule. **Status:** standing. diff --git a/packages/signals/docs/RULES-INDEX.md b/packages/signals/docs/RULES-INDEX.md index 56c1c3d40f..c13dd61713 100644 --- a/packages/signals/docs/RULES-INDEX.md +++ b/packages/signals/docs/RULES-INDEX.md @@ -103,9 +103,9 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul | D-37 | live | `docs/RULES-DERIVED.md:239` | async.ts×1 core.ts×4 lanes.ts×1 scheduler.ts×2 seat.ts×9 optimistic.ts×1 | display-ahead-plain-write-content.test.ts×1 lane-mount-effects-4557.test.ts×1 optimistic-held-write-leak.test.ts×1 optimistic-lane-seam-loop-4643.test.ts×5 optimistic-list-push-filter-push-4642.test.ts×1 | A lane sees the screen plus its own guesses and never holds a sync write | | D-38 | live | `docs/RULES-DERIVED.md:245` | — | errored-reader-4486.test.ts×1 | Effect error phases; a comparator throw is a compute error; an escaping error halts | | D-39 | live | `docs/RULES-DERIVED.md:253` | boundaries.ts×9 core.ts×1 lanes.ts×1 scheduler.ts×3 types.ts×1 store.ts×1 | derived-store-recovery-wake.test.ts×1 error-boundary-superseded-staged-error-4527.test.ts×1 error-is-an-answer.test.ts×2 error-staged-recovery.test.ts×1 errored-heal-memo-reader-4644.test.ts×2 errored-list-recovery-held-4526.test.ts×1 errored-memo-over-output-held-reject-4640.test.ts×1 errored-over-rearmed-loading-4384.test.ts×1 errored-reader-4486.test.ts×3 errored-recovery-fresh-loading-4627.test.ts×2 errored-recovery-stale-memo-4592.test.ts×2 errored-recovery-wedge-4403-4404-4405.test.ts×3 latest-memo-inline-parity.test.ts×2 latest-uninitialized-over-latest-4362.test.ts×1 createProjection.async.test.ts×1 derived-store-heal-4451.test.ts×1 | An error fallback is the display; it stays until a new answer replaces the error | -| D-40 | live | `docs/RULES-DERIVED.md:295` | constants.ts×1 core.ts×1 deferred.ts×2 signals.ts×1 | create-deferred-3710.test.ts×1 create-deferred.test.ts×1 | A deferred source lags its readers and never leads them | -| D-41 | live | `docs/RULES-DERIVED.md:257` | boundaries.ts×5 async.ts×5 constants.ts×1 core.ts×12 lanes.ts×1 scheduler.ts×4 seat.ts×10 types.ts×1 verdict.ts×3 signals.ts×1 projection.ts×3 store.ts×2 | derived-store-error-delivered-once.test.ts×2 derived-store-recovery-wake.test.ts×1 error-boundary-superseded-staged-error-4527.test.ts×3 error-is-an-answer.test.ts×3 error-staged-recovery.test.ts×1 errored-held-mount-staged-error-4480.test.ts×3 errored-latest-obsolete-flight-4568.test.ts×1 errored-list-recovery-held-4526.test.ts×2 errored-memo-over-output-held-reject-4640.test.ts×1 errored-reader-4486.test.ts×1 errored-recovery-fresh-loading-4627.test.ts×4 errored-recovery-wedge-4403-4404-4405.test.ts×7 errored-staged-source-4364.test.ts×1 held-sync-throw-4109.test.ts×2 hold-recovers-landing-reruns-4469.test.ts×3 latest-beside-staged-read-4365.test.ts×1 latest-derived-held-error-4106.test.ts×1 latest-derived-held-error-guess-lane-4106.test.ts×1 latest-derived-sync-error-4377.test.ts×1 loading-reveal-held-outside-4593.test.ts×1 optimistic-held-error-untracked-read-4489.test.ts×3 settle-diamond-revisit.test.ts×1 staged-error-derivation.test.ts×1 staged-error-rerun-4109.test.ts×1 staged-error-through-async-memo-4640.test.ts×1 writable-memo-write-clears-error-4110.test.ts×1 | An error is an answer: it ends the wait like a value, and it shows when a value would | -| D-42 | live | `docs/RULES-DERIVED.md:277` | boundaries.ts×2 async.ts×3 core.ts×5 dev.ts×1 effect.ts×2 owner.ts×1 verdict.ts×1 index.ts×1 signals.ts×1 | caught-reactive-read-diagnostic.test.ts×1 errored-reader-4486.test.ts×2 try-catch-reactive-read.test.ts×2 | A reactive read is not an `await`: `try/catch` around it is not a channel | +| D-40 | live | `docs/RULES-DERIVED.md:297` | constants.ts×1 core.ts×1 deferred.ts×2 signals.ts×1 | create-deferred-3710.test.ts×1 create-deferred.test.ts×1 | A deferred source lags its readers and never leads them | +| D-41 | live | `docs/RULES-DERIVED.md:257` | boundaries.ts×5 async.ts×5 constants.ts×1 core.ts×12 lanes.ts×1 scheduler.ts×4 seat.ts×10 types.ts×1 verdict.ts×3 signals.ts×1 projection.ts×3 store.ts×2 | derived-store-error-delivered-once.test.ts×2 derived-store-recovery-wake.test.ts×1 error-boundary-superseded-staged-error-4527.test.ts×3 error-is-an-answer.test.ts×3 error-staged-recovery.test.ts×1 errored-held-mount-staged-error-4480.test.ts×3 errored-latest-obsolete-flight-4568.test.ts×1 errored-list-recovery-held-4526.test.ts×2 errored-memo-over-output-held-reject-4640.test.ts×1 errored-reader-4486.test.ts×1 errored-recovery-fresh-loading-4627.test.ts×4 errored-recovery-wedge-4403-4404-4405.test.ts×7 errored-staged-source-4364.test.ts×1 held-sync-throw-4109.test.ts×2 hold-recovers-landing-reruns-4469.test.ts×3 latest-beside-staged-read-4365.test.ts×1 latest-derived-held-error-4106.test.ts×1 latest-derived-held-error-guess-lane-4106.test.ts×1 latest-derived-sync-error-4377.test.ts×2 loading-reveal-held-outside-4593.test.ts×1 optimistic-held-error-untracked-read-4489.test.ts×3 settle-diamond-revisit.test.ts×1 staged-error-derivation.test.ts×1 staged-error-rerun-4109.test.ts×1 staged-error-through-async-memo-4640.test.ts×1 writable-memo-write-clears-error-4110.test.ts×1 | An error is an answer: it ends the wait like a value, and it shows when a value would | +| D-42 | live | `docs/RULES-DERIVED.md:279` | boundaries.ts×2 async.ts×3 core.ts×5 dev.ts×1 effect.ts×2 owner.ts×1 verdict.ts×1 index.ts×1 signals.ts×1 | caught-reactive-read-diagnostic.test.ts×1 errored-reader-4486.test.ts×2 try-catch-reactive-read.test.ts×2 | A reactive read is not an `await`: `try/catch` around it is not a channel | ## A — spec propositions | id | status | defined | cited in src | cited in tests | statement (at definition) | diff --git a/packages/signals/src/boundaries.ts b/packages/signals/src/boundaries.ts index 8836e8f2ec..fe45255502 100644 --- a/packages/signals/src/boundaries.ts +++ b/packages/signals/src/boundaries.ts @@ -114,6 +114,8 @@ interface Boundary { * beside the held frame — not the frame's. `_lane` is set when the arm * flips the boundary and consumed by the swap pass. */ _armLane: Transaction | null; + /** Next swap's lane. An error caught ahead carries the reader's lane; + * recovery of that fallback stays in its output's lane until it ends. */ _lane: Transaction | null; /** DEV: the arm was display-ahead (a lane) — the fallback shows now, * whatever holds the frame; no LOADING_ON_OUTSIDE_HOLD report. */ @@ -193,6 +195,14 @@ function record(b: Boundary, node: Computed, source = node): void { * decides). */ function caught(b: Boundary, node: Computed, error: unknown, source = node): void { if (b._type === STATUS_ERROR) { + // The error's source is the retry target, but the reader's selected + // outcome owns publication. Do not lose a latest/optimistic lane when + // converting its error into fallback content. + // (Only the lane engine makes lanes: without it the clause folds away.) + const lane = laneStageHook + ? (passLane ?? (node._x?._transaction?._lane ? txOf(node) : null)) + : null; + if (laneStageHook && !b._fallback) b._lane = lane; // An error boundary waits on what THREW (`StatusError.source`), not on // the reader that saw it, while the error is settled only when its // source is neither errored nor in flight and the reader is not pending @@ -205,6 +215,9 @@ function caught(b: Boundary, node: Computed, error: unknown, source = node) source = (error as { source?: Computed })?.source ?? node; if (source._flags & REACTIVE_DISPOSED) source = node; const caught = unwrapStatusError(error); + // Subsequent errors update the existing fallback through this signal; + // its message must publish with the swap, including after a first show. + if (laneStageHook && lane) laneStageHook(b._error! as Computed, lane, true, false); setSignal(b._error!, caught); reportClientError(caught, b._owner, source); } @@ -792,6 +805,17 @@ function createBoundary( // re-arm's swap is the change's work (`arm`), until that swap commits // (D-13, #3540). const self = getOwner() as Computed; + // Reading the retained tree need not read the leaf that recovered. + // Keep the ahead swap's lane for recovery as well as for the fallback; + // otherwise that successful answer is parked in the input's hold. + if (laneStageHook && b._type === STATUS_ERROR) { + if (b._fallback && self._config & CONFIG_OVERRIDE) b._lane ??= txOf(self); + if (b._lane !== null) { + setPassLane(b._lane); + self._flags |= REACTIVE_LANE_READ; + b._lane = null; + } + } if (!b._armed && !(self._config & CONFIG_HELD)) self._config |= CONFIG_FRAME; // Reveal order (reveal.ts): a gated slot shows its fallback — or, in a // collapsed tail, nothing — whatever its content's state; the diff --git a/packages/signals/src/core/lanes.ts b/packages/signals/src/core/lanes.ts index c6b9048096..70b3bc6215 100644 --- a/packages/signals/src/core/lanes.ts +++ b/packages/signals/src/core/lanes.ts @@ -782,7 +782,12 @@ export function laneRead(c: Computed | null, el: Signal | Computed)._statusFlags; // An errored member's lane value predates its error; the error is the answer (#4106). - if (!guess && status & STATUS_ERROR) return NOT_PENDING; + if (!guess && status & STATUS_ERROR) { + // The error still belongs to this lane. A downstream memo must select + // the same update before read() throws, as it does for a lane value. + if (c !== null && tracking && !(c._config & CONFIG_CHILDREN_FORBIDDEN)) enterLane(l, c); + return NOT_PENDING; + } if (c === null) { if (__TEST__) shadowActual(SLOT_LV); return latestOf(el); diff --git a/packages/signals/tests/latest-derived-sync-error-4377.test.ts b/packages/signals/tests/latest-derived-sync-error-4377.test.ts index 14cb69913a..749105fbe1 100644 --- a/packages/signals/tests/latest-derived-sync-error-4377.test.ts +++ b/packages/signals/tests/latest-derived-sync-error-4377.test.ts @@ -6,11 +6,12 @@ * the error before `m` did, so ``, which waits on what threw, let it * go as settled; at the commit the leaf re-derived and reached the boundary * again, the memo's reader did not (an equal status re-notifies nobody) and - * kept `m`'s last value. With a held write the same: the leaf shows the - * error at the reveal, the derivation never did. Fixed by #4364's `prune` + * kept `m`'s last value. With a held write the leaf originally showed the + * error at the reveal, while the derivation never did. Fixed by #4364's `prune` * change (#4387): a staged error on an error boundary's source keeps the * boundary waiting, so the commit that publishes it finds the boundary still - * waiting on `m`. These pin it. + * waiting on `m`. The held cases now also pin D-41's value/error symmetry: + * latest publishes the error ahead; an ordinary read waits for the reveal. */ import { describe, expect, it } from "vitest"; import { @@ -66,7 +67,7 @@ describe("a memo over latest(m) shows m's sync error as the leaf does (#4377)", expect(s.screen()).toBe("[ERR]"); }); - it(`${shape}: a held write shows the error at the reveal`, async () => { + it(`${shape}: a held error follows the selected value publication`, async () => { const s = scene(shape); let release!: () => void; action(function* () { @@ -75,7 +76,7 @@ describe("a memo over latest(m) shows m's sync error as the leaf does (#4377)", })(); flush(); await tick(); - expect(s.screen()).toBe(0); + expect(s.screen()).toBe(shape === "plain" ? 0 : "[ERR]"); release(); await tick(); await tick(); diff --git a/packages/signals/tests/latest-uninitialized-over-latest-4362.test.ts b/packages/signals/tests/latest-uninitialized-over-latest-4362.test.ts index 19596da124..d7d13106a9 100644 --- a/packages/signals/tests/latest-uninitialized-over-latest-4362.test.ts +++ b/packages/signals/tests/latest-uninitialized-over-latest-4362.test.ts @@ -307,6 +307,8 @@ describe("uninitialized async memo over latest(s) (#4362, #4363)", () => { // shape #4365 found): the pass `latest(a) + b()` runs ahead of the hold // that holds `b`, throws over b's screen value (2 + 0 + 1), and its error // is its own. The landing re-derives it on the landed world (2 + 3 + 1). + // Like a successful answer to that ahead pass, the error publishes ahead; + // the recovery then replaces it when the ordinary update lands. it.each(["memo", "effect"])( "a pass that threw over a held write re-derives at the landing (%s)", async reader => { @@ -353,7 +355,7 @@ describe("uninitialized async memo over latest(s) (#4362, #4363)", () => { setB(3); setC(2); flush(); - expect(out).toBe("title=2"); + expect(out).toBe("[E m:3]"); resolve(); for (let i = 0; i < 8; i++) await Promise.resolve(); flush(); diff --git a/packages/web/test/latest-error-publication.spec.tsx b/packages/web/test/latest-error-publication.spec.tsx new file mode 100644 index 0000000000..1f0a054902 --- /dev/null +++ b/packages/web/test/latest-error-publication.spec.tsx @@ -0,0 +1,164 @@ +/** @jsxImportSource @solidjs/web */ +import { expect, test } from "vitest"; +import { action, createMemo, createSignal, Errored, latest, onCleanup, Show } from "solid-js"; +import { render } from "@solidjs/web"; + +const tick = () => new Promise(resolve => setTimeout(resolve, 0)); + +for (const fail of [false, true]) { + for (const depth of [0, 1, 2]) { + for (const asyncAnswer of [false, true]) { + test.each([false, true])( + `latest publishes errors and recovery through ${depth} memos (async=${asyncAnswer}, error=${fail}, removal=%s)`, + async removeBranch => { + const end = Promise.withResolvers(); + const answer = Promise.withResolvers(); + const recovery = Promise.withResolvers(); + const container = document.createElement("div"); + let start!: () => Promise; + let setVersion!: (value: number) => void; + function App() { + const [version, set] = createSignal(0); + setVersion = set; + const data = createMemo(() => { + switch (version()) { + case 1: + if (asyncAnswer) return answer.promise; + if (fail) throw new Error("failed"); + return "changed"; + case 2: + if (fail) throw new Error("failed again"); + return "changed again"; + case 3: + return recovery.promise; + default: + return "ready"; + } + }); + let ahead = () => latest(data); + for (let i = 0; i < depth; i++) ahead = createMemo(ahead); + start = action(function* () { + set(1); + yield end.promise; + }); + return ( + <> +

{version()}

+ (error() as Error).message}> + + {ahead()} + + +
+ (error() as Error).message}> + {data()} + + + ); + } + const dispose = render(() => , container); + let running: Promise | undefined; + try { + await tick(); + expect(container.textContent).toBe("0readyready"); + running = start(); + await tick(); + if (asyncAnswer) { + expect(container.textContent).toBe("0readyready"); + if (fail) answer.reject(new Error("failed")); + else answer.resolve("changed"); + await tick(); + } + expect(container.textContent).toBe(fail ? "0failedready" : "0changedready"); + setVersion(2); + await tick(); + expect(container.textContent).toBe(fail ? "0failed againready" : "0changed againready"); + setVersion(3); + await tick(); + expect(container.textContent).toBe(fail ? "0failed againready" : "0changed againready"); + recovery.resolve("recovered"); + await tick(); + expect(container.textContent).toBe("0recoveredready"); + end.resolve(); + await running; + await tick(); + expect(container.textContent).toBe("3recoveredrecovered"); + } finally { + end.resolve(); + answer.resolve("ready"); + recovery.resolve("recovered"); + await running; + dispose(); + } + } + ); + } + } +} + +test("reset retries the failed source and retains the fallback until latest recovers to the same value", async () => { + const end = Promise.withResolvers(); + const recovery = Promise.withResolvers(); + const container = document.createElement("div"); + let start!: () => Promise; + let reset!: () => void; + let retry = false; + let fallbackMounts = 0; + let fallbackCleanups = 0; + const dispose = render(() => { + const [version, setVersion] = createSignal(0); + const data = createMemo(() => { + if (version() === 0) return "ready"; + if (retry) return recovery.promise; + throw new Error("failed"); + }); + start = action(function* () { + setVersion(1); + yield end.promise; + }); + return ( + <> +

{version()}

+ { + reset = retry; + fallbackMounts++; + onCleanup(() => fallbackCleanups++); + return {(error() as Error).message}; + }} + > + {latest(data)} + + + ); + }, container); + let running: Promise | undefined; + try { + await tick(); + expect(container.textContent).toBe("0ready"); + running = start(); + await tick(); + expect(container.textContent).toBe("0failed"); + const fallback = container.querySelector("b"); + retry = true; + reset(); + await tick(); + expect(container.textContent).toBe("0failed"); + expect(container.querySelector("b")).toBe(fallback); + expect([fallbackMounts, fallbackCleanups]).toEqual([1, 0]); + recovery.resolve("ready"); + await tick(); + expect(container.textContent).toBe("0ready"); + expect([fallbackMounts, fallbackCleanups]).toEqual([1, 1]); + end.resolve(); + await running; + await tick(); + expect(container.textContent).toBe("1ready"); + expect([fallbackMounts, fallbackCleanups]).toEqual([1, 1]); + } finally { + end.resolve(); + recovery.resolve("ready"); + await running; + dispose(); + } +}); diff --git a/scripts/size/floor-caps.json b/scripts/size/floor-caps.json index b842620a5d..9608488c90 100644 --- a/scripts/size/floor-caps.json +++ b/scripts/size/floor-caps.json @@ -16,8 +16,8 @@ "minified": 102212 }, "page: live server components (base + live/GET + action + isPending/latest)": { - "cap": "40.82 KB", - "minified": 123243 + "cap": "40.92 KB", + "minified": 123431 }, "server: floor (getRequestEvent + isServer)": { "cap": "1.29 KB", diff --git a/scripts/size/scenarios.js b/scripts/size/scenarios.js index 00e8ccd56b..f48c655b0a 100644 --- a/scripts/size/scenarios.js +++ b/scripts/size/scenarios.js @@ -1485,9 +1485,10 @@ module.exports = [ // Batch re-record (2026-11-08, over next @ 2789ca9, measured locally: #4714, #4711, #4717, #4719, #4720): cap unchanged at 12.76 KB, recorded minified 35,492 -> 35,495 B (+3 B), measured at 12,748 B brotli. Re-recorded once after the batch, per the batch process. // 2026-11-08 (#4723, over next @ 701cbb3): S-58′ — a mount a probing pass opened is born held whatever its own pass reads ahead (the arm tests the stamp first in `frameRead` and `read`'s pending arm; the lane guard kept on it, D-37), and S-58″/‴ — the same mount under a guess lane waits on the lane's flight instead of being served the screen (lanes.ts `laneRead`): 12.76 -> 12.77 KB, measured 12,766 B / 35,587 B minified (+18 B brotli, +92 B minified over the batch record). 0 B on the core floor. // 2026-11-09 (#4726, over next @ db3d13d, measured locally, matching the PR's size job): a zombie does not retry an errored source (#4405's one-hop livelock, +11 B) and the S-46 mount stamp passes through a boundary in the mount (S-58, +33 B, lane engine only): 12.77 KB -> 12.79 KB, recorded minified 35,587 -> 35,631 B (+44 B), measured at 12,777 B brotli. Growth accepted by the maintainer. - limit: "12.79 KB", + // 2026-11-09 (#4732, ports #4705, over next @ 5eaaf93, size job on 99197e4): an error seen through latest() shows ahead as a held value would (D-41, ruled 2026-11-09), lane engine only: 12.79 KB -> 12.81 KB, recorded minified 35,631 -> 35,699 B, measured at 12,793 B brotli. 0 B without the lane engine. Growth accepted by the maintainer. + limit: "12.81 KB", // latest() read inline and through a memo show the same screen (#4284 through a memo; a plain write beside an async memo), 2026-10-29, over next @ 7ebd4a32: recorded minified 28,693 -> 29,086 B (+343 B minified over next), measured locally (linux) at 10,565 B brotli (+135 B over next). A render effect a verdict memo's change re-runs reads as its verdict reader for that pass (`laneDirty`), a pass that read a staging before the frame had a transaction re-derives once as a verdict reader only if the frame parks, `latest()` of a first load in flight in a verdict lane is loading (also through an identity memo, a derived store and `isPending`), a lane's dissolution leaves such a load and the nodes pending on it uninitialized instead of committing `undefined`, a verdict lane born at a seam is judged at it, a pass born in a staged reader stays the frame's on a verdict-memo read (C4, #4010), a plain write beside `latest()` computes once (the seam re-derives a pre-transaction staged reader only if the frame parks), a verdict reader's plain read of a staging in a transaction only a `latest()` opened is the frame's read, so a memo of `latest()` computes once too (D-22; not a pass with no value yet, D-6), and an error stays the display while the memo it came through re-asks, a Loading fallback behind it included (D-39, async-gen 91501 #1831). recompute's CONFIG_VERDICT clear now sits behind the lane engine: -21 B minified on every floor. Correctness; the maintainer: "only flag me if brotli goes more than 20kb" (2026-10-29). Cap unchanged; recorded minified = measured. - capMinified: 35631, + capMinified: 35699, alias }, { @@ -2822,11 +2823,12 @@ module.exports = [ // scenario carries — measured 33,820 B / 101,918 B minified. // Batch re-record (2026-11-08, over next @ 2789ca9, measured locally: #4714, #4711, #4717, #4719, #4720): 33.83 KB -> 33.89 KB, recorded minified 101,918 -> 101,921 B (+3 B), measured at 33,872 B brotli. Re-recorded once after the batch, per the batch process. // 2026-11-09 (#4726, over next @ db3d13d, measured locally, matching the PR's size job): a zombie does not retry an errored source (#4405's one-hop livelock, +11 B) and the S-46 mount stamp passes through a boundary in the mount (S-58, +33 B, lane engine only): 33.89 KB -> 33.90 KB, recorded minified 101,921 -> 102,057 B (+136 B), measured at 33,883 B brotli. Growth accepted by the maintainer. - limit: "33.90 KB", + // 2026-11-09 (#4732, ports #4705, over next @ 5eaaf93, size job on 99197e4): an error seen through latest() shows ahead as a held value would (D-41, ruled 2026-11-09), lane engine only: 33.90 KB -> 33.99 KB, recorded minified 102,057 -> 102,283 B, measured at 33,973 B brotli. 0 B without the lane engine. Growth accepted by the maintainer. + limit: "33.99 KB", // An Errored heals when the last reader that caught its error is disposed (#4373, #4384, 2026-10-28, re-recorded over next @ cbc0eebd): recorded minified 96,989 -> 97,047 B (+58 B minified over next's record), measured locally (linux) at 31,811 B brotli. Recorded minified = measured; CI re-bases. // Boundary readers keyed by the source they wait on (#4373), with enterLane's tail folded into one else-chain as an offset (-29 B on lane pages) (#4384, 2026-10-28, re-recorded over next @ 1b32ff2e): recorded minified 97,024 -> 97,045 B (+21 B minified over next's record), measured locally (linux) at 31,798 B brotli. Recorded minified = measured; CI re-bases. // latest() read inline and through a memo show the same screen (#4284 through a memo; a plain write beside an async memo), 2026-10-29, over next @ 7ebd4a32: recorded minified 97,045 -> 97,426 B (+240 B minified over next), measured locally (linux) at 31,976 B brotli (+109 B over next). A render effect a verdict memo's change re-runs reads as its verdict reader for that pass (`laneDirty`), a pass that read a staging before the frame had a transaction re-derives once as a verdict reader only if the frame parks, `latest()` of a first load in flight in a verdict lane is loading (also through an identity memo, a derived store and `isPending`), a lane's dissolution leaves such a load and the nodes pending on it uninitialized instead of committing `undefined`, a verdict lane born at a seam is judged at it, a pass born in a staged reader stays the frame's on a verdict-memo read (C4, #4010), a plain write beside `latest()` computes once (the seam re-derives a pre-transaction staged reader only if the frame parks), a verdict reader's plain read of a staging in a transaction only a `latest()` opened is the frame's read, so a memo of `latest()` computes once too (D-22; not a pass with no value yet, D-6), and an error stays the display while the memo it came through re-asks, a Loading fallback behind it included (D-39, async-gen 91501 #1831). recompute's CONFIG_VERDICT clear now sits behind the lane engine: -21 B minified on every floor. Correctness; the maintainer: "only flag me if brotli goes more than 20kb" (2026-10-29). Cap unchanged; recorded minified = measured. - capMinified: 102057, + capMinified: 102283, alias }, { @@ -5790,6 +5792,7 @@ module.exports = [ // Batch re-record (2026-11-08, over next @ 2789ca9, measured locally: #4714, #4711, #4717, #4719, #4720): cap unchanged at 40.76 KB, recorded minified 122,905 -> 123,070 B (+165 B), measured at 40,734 B brotli. A frozen floor, Size-Exception in this PR's body. Re-recorded once after the batch, per the batch process. // 2026-11-09 (#4726, over next @ db3d13d, measured locally, matching the PR's size job): a zombie does not retry an errored source (#4405's one-hop livelock, +11 B) and the S-46 mount stamp passes through a boundary in the mount (S-58, +33 B, lane engine only): 40.76 KB -> 40.81 KB (floor-caps.json, Size-Exception), recorded minified 123,070 -> 123,206 B (+136 B: +44 B this PR, +92 B from #4723 not yet re-recorded), measured at 40,798 B brotli. Growth accepted by the maintainer. // 2026-11-09 (#4727, over next @ ebd6283, size job 129310970054): a root ternary under a guess (#3835 shape, +29 B minified, lane engine only) and an Errored fallback's isPending ternary after a reset (+8 B): 40.81 KB -> 40.82 KB (floor-caps.json, Size-Exception), recorded minified 123,206 -> 123,243 B (+37 B), measured in CI at 40,811 B brotli. Growth accepted by the maintainer (2026-11-09). + // 2026-11-09 (#4732, ports #4705, over next @ 5eaaf93, size job on 99197e4): an error seen through latest() shows ahead as a held value would (D-41, ruled 2026-11-09), lane engine only: frozen floor 40.82 -> 40.92 KB, recorded minified 123,243 -> 123,431 B, measured at 40,906 B brotli. Size-Exception: the maintainer accepted the growth (2026-11-09). limit: floorCaps["page: live server components (base + live/GET + action + isPending/latest)"], capMinified: floorMinified["page: live server components (base + live/GET + action + isPending/latest)"], @@ -6603,11 +6606,12 @@ module.exports = [ // scenario carries — measured 50,559 B / 148,799 B minified. // Batch re-record (2026-11-08, over next @ 2789ca9, measured locally: #4714, #4711, #4717, #4719, #4720): 50.57 KB -> 50.59 KB, recorded minified 148,799 -> 148,802 B (+3 B), measured at 50,580 B brotli. Re-recorded once after the batch, per the batch process. // 2026-11-09 (#4726, over next @ db3d13d, measured locally, matching the PR's size job): a zombie does not retry an errored source (#4405's one-hop livelock, +11 B) and the S-46 mount stamp passes through a boundary in the mount (S-58, +33 B, lane engine only): cap unchanged at 50.59 KB, recorded minified 148,802 -> 148,938 B (+136 B), measured at 50,574 B brotli. Growth accepted by the maintainer. - limit: "50.59 KB", + // 2026-11-09 (#4732, ports #4705, over next @ 5eaaf93, size job on 99197e4): an error seen through latest() shows ahead as a held value would (D-41, ruled 2026-11-09), lane engine only: 50.59 KB -> 50.71 KB, recorded minified 148,938 -> 149,164 B, measured at 50,696 B brotli. 0 B without the lane engine. Growth accepted by the maintainer. + limit: "50.71 KB", // An Errored heals when the last reader that caught its error is disposed (#4373, #4384, 2026-10-28, re-recorded over next @ cbc0eebd): recorded minified 140,451 -> 140,509 B (+58 B minified over next's record), measured locally (linux) at 47,516 B brotli. Recorded minified = measured; CI re-bases. // Boundary readers keyed by the source they wait on (#4373), with enterLane's tail folded into one else-chain as an offset (-29 B on lane pages) (#4384, 2026-10-28, re-recorded over next @ 1b32ff2e): recorded minified 140,463 -> 140,485 B (+22 B minified over next's record), measured locally (linux) at 47,547 B brotli. Recorded minified = measured; CI re-bases. // latest() read inline and through a memo show the same screen (#4284 through a memo; a plain write beside an async memo), 2026-10-29, over next @ 7ebd4a32: recorded minified 140,485 -> 140,983 B (+405 B minified over next), measured locally (linux) at 47,722 B brotli (+162 B over next). A render effect a verdict memo's change re-runs reads as its verdict reader for that pass (`laneDirty`), a pass that read a staging before the frame had a transaction re-derives once as a verdict reader only if the frame parks, `latest()` of a first load in flight in a verdict lane is loading (also through an identity memo, a derived store and `isPending`), a lane's dissolution leaves such a load and the nodes pending on it uninitialized instead of committing `undefined`, a verdict lane born at a seam is judged at it, a pass born in a staged reader stays the frame's on a verdict-memo read (C4, #4010), a plain write beside `latest()` computes once (the seam re-derives a pre-transaction staged reader only if the frame parks), a verdict reader's plain read of a staging in a transaction only a `latest()` opened is the frame's read, so a memo of `latest()` computes once too (D-22; not a pass with no value yet, D-6), and an error stays the display while the memo it came through re-asks, a Loading fallback behind it included (D-39, async-gen 91501 #1831). recompute's CONFIG_VERDICT clear now sits behind the lane engine: -21 B minified on every floor. Correctness; the maintainer: "only flag me if brotli goes more than 20kb" (2026-10-29). Cap unchanged; recorded minified = measured. - capMinified: 148938, + capMinified: 149164, alias: pageAlias, conditions: solidConditions, compile: { hydratable: true }