Skip to content

Commit 6340653

Browse files
committed
Merge remote-tracking branch 'origin/next' into claude/project-thread-x1ore2-ledger-1101b
2 parents 4ab0065 + 39f951b commit 6340653

17 files changed

Lines changed: 789 additions & 27 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
Avoid evaluating property getters when attribution compares memo outputs and list items for unstable identity diagnostics.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/web": patch
3+
---
4+
5+
A broadcast live read with a plain form query (`?room=a`, no `?args=`) is now keyed by that query, so viewers of different queries no longer share one source.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
`deep()` and `snapshot()` read inside a computation now serve the frame the store's container node serves that computation. Before, a container held by a transaction (an action that wrote the store on both sides of a yield) always served its committed backing to `deep()`/`snapshot()`, even in the transaction's own landing flush, where the same computation's property reads already saw the landed values: a render effect reading `s.x` and `deep(s)` logged `3:{"x":1}` and was never re-run. The same applied to a derived `createStore(fn, seed)` whose user setter wrote across a yield. Reads outside a computation still see the committed backing of a held container.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
A rejection under a `<Loading>` that has not shown its content reaches `<Errored>` at once when a `latest()` reader under the same boundary reads a derivation whose upstream still has a flight out for an older question (#4568). The boundary judged its readers settled while that `latest()` reader was queued to re-derive, revealed into a hold the reader then went pending in, and the later rejection was staged in that hold until the obsolete flight landed. A verdict reader queued to re-derive is now waited on until its pass answers (A19, D-41).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/web": patch
3+
---
4+
5+
A no-JS form post answered by `respond(value, { headers })`, returned or thrown, now keeps the envelope's `Set-Cookie` headers on the redirect.

‎packages/signals/docs/RULES-INDEX.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Status legend: **live** stated and standing · **ruled** carries an explicit rul
6363
| A16 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:223` | scheduler.ts×1 | caught-reactive-read-diagnostic.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 spec-async-semantics.test.ts×1 strict-read-pending-store.test.ts×2 uninitialized-visibility.test.ts×1 visibility-oracle-store.states.ts×2 visibility-oracle.states.ts×2 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from B5)] `isPending` never throws in untracked contexts — (was B5) `isPending` never throws in untracked contexts — thunks that throw real errors or read… |
6464
| A17 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:71` | async.ts×3 constants.ts×1 lanes.ts×7 scheduler.ts×2 seat.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×1 store.ts×3 | create-deferred-3710.test.ts×1 fuzz-findings-l2.test.ts×6 lane-uninitialized-landing-3648.test.ts×5 optimistic-over-held-row-3796.test.ts×1 optimistic-read-lane-not-transaction-3698.test.ts×2 optimistic-undefined-override.test.ts×1 posture-store-parity.test.ts×1 refresh-await.test.ts×1 reveal-gating-contract.test.ts×3 spec-async-semantics.test.ts×10 createOptimisticStore.test.ts×2 kanban-a17-fixture.test.ts×3 optimistic-list-mutation-matrix.test.ts×1 optimistic-maparray-index-frame-f1.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 treeshake.test.ts×1 until.test.ts×1 visibility-oracle-store.states.ts×24 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×20 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-06 (promoted from C4)] An active override is the displayed value until its transaction commits, and the graph's value until its own source answers — **Statement (curre… |
6565
| A18 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:81` | action.ts×1 async.ts×2 core.ts×3 lanes.ts×8 scheduler.ts×2 types.ts×1 verdict.ts×1 map.ts×1 optimistic.ts×1 projection.ts×1 | body-end-supersession-visibility.test.ts×4 createOptimistic.test.ts×3 l2-fuzz-existing-rules.test.ts×2 lane-contract.test.ts×1 lane-frame-deferred-run-3662.test.ts×1 lane-outside-view.test.ts×1 lane-uninitialized-landing-3648.test.ts×5 optimistic-move-duplicate-3548.test.ts×2 optimistic-read-lane-not-transaction-3698.test.ts×4 posture-store-parity.test.ts×5 spec-async-semantics.test.ts×5 flight-owned-transaction.test.ts×1 lane-authority-twins.test.ts×1 optimistic-list-mutation-matrix.test.ts×1 optimistic-untracked-reads-f3-f5.test.ts×1 signal-store-twins-qd.test.ts×1 unchanged-presence-no-hold-3743.test.ts×2 superseded-before-first-commit.test.ts×4 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×19 visibility-oracle.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from B4)] An override lives exactly as long as its own transaction; a newer truth from the source supersedes it in the graph immediately, on screen at com… |
66-
| A19 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:151` | async.ts×1 constants.ts×1 core.ts×6 lanes.ts×1 scheduler.ts×2 seat.ts×1 types.ts×1 verdict.ts×6 store.ts×2 | create-deferred-3710.test.ts×2 derived-store-first-landing-verdict.test.ts×1 fuzz-findings-l2.test.ts×4 lane-uninitialized-landing-3648.test.ts×2 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 mount-over-foreign-hold-3761.test.ts×2 spec-async-semantics.test.ts×3 derived-presence-async-3726.test.ts×2 superseded-before-first-commit.test.ts×3 uninitialized-visibility.test.ts×1 verdict-memo-flight-no-reask.test.ts×2 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×14 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from C1)] `isPending(x)` ≡ the observable value is not final (three causes) — (was C1 — **partially reverses an earlier decision**) **Definition: `isPendi… |
66+
| A19 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:151` | boundaries.ts×1 async.ts×1 constants.ts×1 core.ts×6 lanes.ts×1 scheduler.ts×2 seat.ts×1 types.ts×1 verdict.ts×6 store.ts×2 | create-deferred-3710.test.ts×2 derived-store-first-landing-verdict.test.ts×1 errored-latest-obsolete-flight-4568.test.ts×1 fuzz-findings-l2.test.ts×4 lane-uninitialized-landing-3648.test.ts×2 latest-memo-inline-parity.test.ts×1 latest-uninitialized-over-latest-4362.test.ts×2 mount-over-foreign-hold-3761.test.ts×2 spec-async-semantics.test.ts×3 derived-presence-async-3726.test.ts×2 superseded-before-first-commit.test.ts×3 uninitialized-visibility.test.ts×1 verdict-memo-flight-no-reask.test.ts×2 visibility-oracle-store.states.ts×8 visibility-oracle-store.test.ts×1 visibility-oracle.states.ts×14 visibility-oracle.test.ts×1 write-proposals-3494.test.ts×1 | [ruled, amended in place 2026-07-07 (promoted from C1)] `isPending(x)` ≡ the observable value is not final (three causes) — (was C1 — **partially reverses an earlier decision**) **Definition: `isPendi… |
6767
| A20 | superseded | `docs/SPEC-ASYNC-SEMANTICS.md:410` | — | question-scoped-pending.test.ts×2 spec-async-semantics.test.ts×3 createOptimisticStore.test.ts×1 | [superseded 2026-07-13 by A24] (superseded) Optimistic writes announce a store-wide pending — (**SUPERSEDED 2026-07-13 by A24** — the mask is deleted; optimistic writes are verdict-inert. Kept for the… |
6868
| A21 | superseded | `docs/SPEC-ASYNC-SEMANTICS.md:417` | — | question-scoped-pending.test.ts×3 spec-async-semantics.test.ts×3 | [superseded 2026-07-13 by A24] (superseded) The store-wide mask — (**SUPERSEDED 2026-07-13 by A24** — the store-wide mask is deleted with the mask model; nothing silences a new question. The effective… |
6969
| A22 | amended | `docs/SPEC-ASYNC-SEMANTICS.md:231` | store.ts×1 | createProjection.draft-lifetime-3585.test.ts×1 spec-async-semantics.test.ts×1 visibility-oracle-store.states.ts×1 | [ruled, amended in place 2026-07-08] Pending is per-node; store-wide only for the firewall's own work — **Pending is per-node: store-wide verdicts exist only as the firewall's own in-flight work (A9) … |

‎packages/signals/src/boundaries.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
EFFECT_TRACKED,
5252
EFFECT_USER,
5353
REACTIVE_DISPOSED,
54+
REACTIVE_IN_HEAP,
5455
REACTIVE_LANE_READ,
5556
REACTIVE_PROBED,
5657
REACTIVE_ZOMBIE,
@@ -356,10 +357,15 @@ export function prune(b: Boundary, pass?: boolean | 0): number {
356357
// An error staged on its source (D-41, `stageError`) is not settled:
357358
// it publishes with the commit. A reader that threw it now (a lane
358359
// pass, a reader of a node born staged) reached the boundary first
359-
// (#4364).
360+
// (#4364). Nor a verdict reader queued to re-derive: its source
361+
// settling retired the pending it carried, and its pass, not that
362+
// retirement, is its answer (A19) — it may ask the next flight. Judged
363+
// settled before it ran, a fresh boundary revealed into a hold its
364+
// pass then went pending in, which waited on that flight (#4568).
360365
if (
361366
(r._statusFlags | s._statusFlags) & mask ||
362-
(mask & STATUS_ERROR && s._config & CONFIG_STAGED_ERROR)
367+
(mask & STATUS_ERROR && s._config & CONFIG_STAGED_ERROR) ||
368+
(r._config & CONFIG_VERDICT && r._flags & REACTIVE_IN_HEAP)
363369
) {
364370
if (pass === 0) break;
365371
continue;

‎packages/signals/src/core/attribution.ts‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,26 +1743,30 @@ function isPlainShape(v: unknown): v is object {
17431743

17441744
/** Shallow structural equivalence, capped so hot paths stay cheap. */
17451745
const UNSTABLE_KEY_CAP = 64;
1746+
function equivalentDataProperty(a: object, b: object, key: PropertyKey): boolean {
1747+
const left = Object.getOwnPropertyDescriptor(a, key);
1748+
const right = Object.getOwnPropertyDescriptor(b, key);
1749+
if (!left || !right) return !left && !right;
1750+
// Accessors are not passive metadata: reading one can run user code.
1751+
return "value" in left && "value" in right && left.value === right.value;
1752+
}
1753+
17461754
function shallowEquivalent(a: object, b: object): boolean {
17471755
const aArr = Array.isArray(a);
17481756
if (aArr !== Array.isArray(b)) return false;
17491757
if (aArr) {
17501758
const arrA = a as unknown[];
17511759
const arrB = b as unknown[];
17521760
if (arrA.length !== arrB.length || arrA.length > UNSTABLE_KEY_CAP) return false;
1753-
for (let i = 0; i < arrA.length; i++) if (arrA[i] !== arrB[i]) return false;
1761+
for (let i = 0; i < arrA.length; i++) if (!equivalentDataProperty(a, b, i)) return false;
17541762
return true;
17551763
}
17561764
// Every own key, symbols included: a symbol-keyed box holding a fresh value
17571765
// each run (web's `dynamic` boxes its in-flight promise) is not equivalent.
17581766
const keys = Reflect.ownKeys(a);
17591767
if (keys.length > UNSTABLE_KEY_CAP || keys.length !== Reflect.ownKeys(b).length) return false;
17601768
for (const key of keys) {
1761-
if (
1762-
!(key in b) ||
1763-
(a as Record<PropertyKey, unknown>)[key] !== (b as Record<PropertyKey, unknown>)[key]
1764-
)
1765-
return false;
1769+
if (!equivalentDataProperty(a, b, key)) return false;
17661770
}
17671771
return true;
17681772
}

‎packages/signals/src/store/store.ts‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,14 +2741,19 @@ function snapshotWalk(value: any, seen: Map<object, any>, fam: StoreFamily | nul
27412741
}
27422742
if (t._fam !== null) fam = t._fam;
27432743
// R27: a snapshot sees the batch's pending backing — a held one (another
2744-
// transaction's future) only from its own draft.
2744+
// transaction's future) only from its own draft, or from a pass the
2745+
// container node serves the future (its landing flush, a memo joining).
27452746
let backing = t.v;
2746-
if (
2747-
t.pb !== null &&
2748-
(inDraft(t) || writeOverride || t.k === null || !(t.k._config & CONFIG_HELD))
2749-
) {
2750-
if (t.ovl) materializePB(t);
2751-
backing = t.pb!;
2747+
const pb = t.pb;
2748+
if (pb !== null) {
2749+
const k = t.k;
2750+
backing =
2751+
inDraft(t) || writeOverride || k === null || !(k._config & CONFIG_HELD)
2752+
? pb
2753+
: stagingReader() !== null
2754+
? asBacking(untrack(() => readNode(k)))
2755+
: t.v;
2756+
if (backing === pb && t.ovl) backing = materializePB(t);
27522757
}
27532758
if (optHooks && optRead(t)) backing = optHooks.view(t, backing);
27542759
if (backing === src) break;

‎packages/signals/tests/attribution-list-identity.test.ts‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,34 @@ describe("UNSTABLE_LIST_IDENTITY", () => {
9191
expect(hits).toHaveLength(1);
9292
});
9393

94+
it("does not evaluate accessors while comparing rows", () => {
95+
const hits = arm();
96+
const getter = vi.fn(() => "lazy");
97+
const records = () =>
98+
rows(10).map(row =>
99+
Object.defineProperty(row, "children", {
100+
enumerable: true,
101+
get: getter
102+
})
103+
);
104+
const [items, setItems] = createSignal(records());
105+
const dispose = createRoot(dispose => {
106+
const mapped = mapArray(items, item => item.id, { name: "rows" });
107+
createMemo(() => mapped().length);
108+
return dispose;
109+
});
110+
try {
111+
flush();
112+
setItems(records());
113+
flush();
114+
115+
expect(getter).not.toHaveBeenCalled();
116+
expect(hits).toHaveLength(0);
117+
} finally {
118+
dispose();
119+
}
120+
});
121+
94122
it("does not report a list keyed by a stable field", () => {
95123
const hits = arm();
96124
const { setItems, count } = listFixture(item => item.id);

0 commit comments

Comments
 (0)