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 4f8daa2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(signals): a derived store row first read under a held adoption is paired with its old row (#3712) (#3986)
* fix(signals): a derived store row first read under a held adoption is paired with its old row (#3712)
The adoption pairs old and new rows by key but can only record the
pairing on a target, so a row nobody had read was never paired: its first
read during the hold compared two raw objects, slot equality had nothing
to go on, and the key was held — the independent write that read
`cards.find(c => c.id === drag())?.id` was held for the action's lifetime.
Pair the row at that read as applyAdopt would have (adoptChild): one
target, the old raw its committed frame, the new raw its staging, held by
the same transaction. Both raws resolve to it, so the slot reads as
unchanged and the row's own leaves decide — id holds no one, version
holds (A29). Arrays pair by the family's key (derived stores now record
it, as optimistic ones do), records by key name; a reorder, a shallow
family, or a reconcile() in a plain setter leaves the hold standing.
sameRow is the one pairing predicate, shared with reconcile's aligned
prefix. The #3707 defects (reorder aliasing, split proxy identity, a
latest() child never cleared) are pinned.
Size-Exception: + createStore 14.71 -> 14.85 KB, compiled CSR 25.465 ->
25.51 KB (+426 B minified each); core, isPending/latest, render and CSR
unchanged. Accepted by the maintainer 2026-10-12.
Fixes#3712
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LVm3wseHt9wRTY8LfPiHmQ
* fix(signals): keep swapped raws distinct when a held adoption pairs a row
A held adoption that moves the same raw objects between slots ([A,B] ->
[B,A], or a record's {x:A,y:B} -> {x:B,y:A}) paired A's target with B as
staging on the first read, so after the commit both slots read B. A raw
present in both frames is its own row: skip the pairing for it. The frame
values are collected once per frame, so reading every row of a large
adoption during the hold stays linear.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
* chore(size): re-base the attribution scenario for #3994 and #3992 together
Each fit its cap alone; landing together they took "CSR, observe tier +
attribution engine enabled" to 28,942 B brotli / 87,216 B minified, 279 B
past the recorded minified, which leaves `next`'s own size check red. This
PR adds 0 B there.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
* fix(signals): share the swapped-raw rule between the eager and held pairings
The rule that keeps a raw present in both frames its own row (#3712) lived
only on the held first-read path (`adoptChild`); the eager `descend` paired
the same record swap (`{x: A, y: B}` to `{x: B, y: A}`, both rows proxied)
and aliased the two after the commit, held or not. One predicate, `ownRow`,
now serves both. `descend` becomes a closure of `applyAdopt` so it reads the
two frames without five call sites growing: +5 B brotli / +5 B minified on
the createStore scenario over the previous commit.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015Q7JD9PktsxtBJJbWmtuwr
* perf(signals): ask the swapped-raw rule only of a frame that carries a moved row
Asked of every eager pair, the shared rule built a raw set per frame and
CodSpeed measured -13% to -25% on the saturated reconcile benches. The eager
pairing now decides once per frame whether any value is a row of the family
already at a changed slot (`hasRow`: one lookup per value, no allocation);
a frame of fresh raws, the common one, pairs by slot and builds nothing. A
raw that is a row elsewhere keeps it, unless that row is the slot's own
(its raw re-sent). Tests cover the one-row-proxied swap (the row follows
its raw) and the immutable update kept at its slot (no move).
+78 B brotli / +159 B minified on the createStore scenario over the PR's
held-only form, recorded in the cap notes.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015Q7JD9PktsxtBJJbWmtuwr
* revert(signals): keep the swapped-raw rule on the held path only
Reverts eae477f (the rule on every eager pair: -13% to -25% on the
saturated reconcile benches) and d20ce53 (the rule behind a per-frame
scan: +86 B brotli over this form on createStore). The PR returns to
b7ece8c's form, +36 B over its first commit; the eager record swap that
the reverted commits fixed is on `next` today and gets its own issue.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015Q7JD9PktsxtBJJbWmtuwr
---------
Co-authored-by: Claude <[email protected]>
A derived store row first read during a held adoption is paired with its old row the way the adoption pairs rows (by the family's key), so reading a field the adoption left unchanged (`cards.find(...)?.id`) no longer holds an independent write for the action's lifetime (#3712). A changed field still holds.
| RUL-9 | resolved |`docs/INTERNALS-STORE-STATE.md:668`| — | — | - **RUL-9 — RESOLVED (2026-08-17, parity by construction).** Every piece of |
136
-
| RUL-10 | live |`docs/INTERNALS-STORE-STATE.md:673`| — | — | - **RUL-10 — The equality trio.** One precise rule needed spanning: no-op |
137
-
| RUL-11 | live |`docs/INTERNALS-STORE-STATE.md:679`| — | — | - **RUL-11 — SPEC'D (2026-08-17): §6d.** Sticky descendants flag ported from |
138
-
| RUL-12 | live |`docs/INTERNALS-STORE-STATE.md:681`| store.ts×1 types.ts×1 | createProjection.async.test.ts×1 shared-child-multiparent.test.ts×1 | - **RUL-12 — Smaller rulings, each with a proposed default** (proceeding on |
| RUL-9 | resolved |`docs/INTERNALS-STORE-STATE.md:681`| — | — | - **RUL-9 — RESOLVED (2026-08-17, parity by construction).** Every piece of |
136
+
| RUL-10 | live |`docs/INTERNALS-STORE-STATE.md:686`| — | — | - **RUL-10 — The equality trio.** One precise rule needed spanning: no-op |
137
+
| RUL-11 | live |`docs/INTERNALS-STORE-STATE.md:692`| — | — | - **RUL-11 — SPEC'D (2026-08-17): §6d.** Sticky descendants flag ported from |
138
+
| RUL-12 | live |`docs/INTERNALS-STORE-STATE.md:694`| store.ts×1 types.ts×1 | createProjection.async.test.ts×1 shared-child-multiparent.test.ts×1 | - **RUL-12 — Smaller rulings, each with a proposed default** (proceeding on |
0 commit comments