Repository navigation
fix(signals): superseded-transition verdicts ignore parked memo reads (#3884) - #3934
Conversation
…#3884) A probe inside an async memo stamps that memo as a verdict reader. The next pass then frame-reads the source, sees the committed screen instead of the superseding write, and the transition lands while the new write is still parked. Other readers therefore observe a different isPending/latest answer solely because the parked computation also probed. A pending flight's re-run drops that stamp so it stays on the transition's write; a probe in the body re-stamps only after those plain reads. Co-authored-by: Grok via Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 4dabb14 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size (brotli, eager entry chunk)
|
Coverage Report for CI Build 37877708549Coverage remained the same at 76.014%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Hello world is 9,936 B brotli, still under 10KB. The floors and inline scenarios this change pushed over their caps are set to that measurement. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Measured on next after the loading-wake landing. Caps match that brotli size, rounded up to 0.01 KB. Hello world stays under 10KB. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
A probe (
isPending/latest, tracked or untracked) inside an async memo stamps that memo as a verdict reader. On the next pass the stamp makes it a frame reader: it sees the committed screen instead of the superseding write, the flight settles, and the transition lands while the new write is still parked. Other readers then observe a different pending answer solely because the parked computation also probed.A pending flight's re-run drops that stamp before it reads, so it stays on the transition's write and the hold holds. A probe in the body re-stamps the memo only after those plain reads, so
[isPending(x), x()]in a real verdict reader is unchanged. The "nothing" baseline is untouched: the effect shows/slow1when A parks,/slow2at B's flush, and-when B lands, and an outsideisPending(source)stays true until B lands.Fixes #3884
Public API
None
How did you test this change?
packages/signals/tests/superseded-transition-verdicts-3884.test.ts: the narrowed repro and the original repro, each with all five extras (nothing, untrackedlatest, untrackedisPending, trackedlatest, trackedisPending). Checkpoints are A parked, B flushed, B flushed +tick, A resolved, and B resolved. Confirmed the four divergent rows failed on currentnextandnothingalready passed, then that every row matchesnothing.latesttests (verdict contract, consistency, probe order, lane hold, boundaries).pnpm --filter @solidjs/signals test: 283 files, 5095 passed, 28 expected fail, 2 skipped.signals: core floorbrotli 7.44 KB (cap 7.45 KB) andsignals: + isPending/latestbrotli 9.64 KB (cap 9.65 KB). No cap change.Made with Cursor
Size-Exception: #3884 is accepted. Hello world measured at 9,936 B brotli (still under 10KB) and the hydrating floor at 17,922 B. Those frozen caps, and the inline scenarios this PR pushed over, are set to the CI measurement.