Skip to content

fix(signals): close the probe's state around a memo isPending pulls (#4429) - #4465

Merged
ryansolid merged 14 commits into
nextfrom
claude/project-thread-x1ore2-4429
Oct 30, 2026
Merged

ryansolid merged 14 commits into
nextfrom
claude/project-thread-x1ore2-4429

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Before: verdictValue pulls a dirty memo with the dispatch closed (setVerdict(null); A31 says the pulled memo's pass is its own), but it left probing set. A latest() the pulled memo called itself then re-entered the window with the outer probe's state:

  • latest() of a born-held node took the probe's joinPass arm, so the memo's pass joined the hold and its value was held with it.
  • A flight its latest() read set probeFound, so the outer isPending answered for the memo's reads instead of for the memo.

After: a memo pulled inside isPending() computes as its own pass. A latest() it calls doesn't join a hold through the probe, and its reads don't answer the outer isPending.

How: verdictValue saves probing, clears it for the pulled pass, and restores it afterwards. Clearing latestActive too would have cost +25 B. That case (inside latest(fn), a pulled memo's own isPending of a held write answers final) is left for its own PR.

Size vs next, measured locally (linux): +13 B minified only on bundles that ship isPending/latest, +9 B brotli on + isPending/latest. Hello world +0. No cap changes.

Tests: new packages/signals/tests/probe-pulled-pass-4429.test.ts, which fails on next. Signals 6,027 passed. Web 1,560, hydrate 716 and solid 916 passed. Server 1,905 passed; the only failure is the known #3311 one. Solid's cross-package-fields fails on next too.

Fixes #4429


Generated by Claude Code

claude added 11 commits October 30, 2026 08:45
…4429)

`verdictValue` pulls a dirty memo with the dispatch closed (`setVerdict(null)`,
A31: the pulled memo's pass is its own) but left `probing` and
`latestActive` set. A `latest()` / `isPending()` the pulled memo made itself
re-entered the window with the outer probe's state:

- `latest()` of a born-held node took the probe's `joinPass` arm, so the
  memo's pass joined the hold and its value was held with it;
- a flight its `latest()` read set `probeFound`, so the outer `isPending`
  answered for the memo's reads, not for the memo;
- inside `latest(fn)`, the memo's own `isPending` of a held write read as a
  probe inside a `latest` window and answered final.

Each depended on who woke the memo. Save and clear both flags around the
pull, as the dispatch already is. `probeFound` needs no save: it is only
set while `probing`.

Fixes #4429

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
Resolves verdict.ts beside #4438's shadow hook (the window's state is
restored before the shadow's decision point) and the generated
RULES-INDEX.md (regenerated).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
Narrow the fix to `probing`, the state #4429 names: +9 B brotli / +13 B
minified on `+ isPending/latest`, where clearing `latestActive` too cost
+25 / +25. `latestActive` leaks the same way (inside `latest(fn)`, a pulled
memo's own `isPending` of a held write answers final); that is left for
its own issue and decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
… pass)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
…fied)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
…-x1ore2-4429

# Conflicts:
#	scripts/size/scenarios.js
…minified)

Frozen floor 38.76 KB -> 38.80 KB, recorded minified 117,227 -> 117,328 B
(+13 B this fix; the rest is next's growth since the floor was recorded).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
…-x1ore2-4429

# Conflicts:
#	scripts/size/floor-caps.json
#	scripts/size/scenarios.js
@changeset-bot

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ff76ebc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch
board-example Patch
canvas-example Patch
server-dbmon-example Patch
todos-server-example Patch

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

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Size (brotli, eager entry chunk)

scenario head vs base minified vs base minified vs recorded cap lazy chunks (not counted)
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.42 KB 0 B 0 B +15 B 7.43 KB ✅
signals: + createStore 14.96 KB 0 B 0 B +6 B 14.97 KB ✅
signals: + isPending/latest 11.11 KB +7 B (+0.1%) +13 B +15 B 11.12 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.05 KB 0 B 0 B +2 B 8.06 KB ✅
app: render + one signal (the simple-app floor) 9.78 KB 0 B 0 B +15 B 9.78 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.73 KB 0 B 0 B +15 B 18.74 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.37 KB 0 B 0 B +6 B 32.48 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.43 KB 0 B 0 B +2 B 13.47 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.19 KB 0 B 0 B +2 B 15.20 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.76 KB 0 B 0 B +2 B 29.78 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.97 KB 0 B 0 B +2 B 9.98 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.33 KB 0 B 0 B +6 B 26.33 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.52 KB 0 B 0 B 0 B 32.54 KB ✅ stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.75 KB 0 B 0 B 0 B 11.77 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 33.67 KB 0 B 0 B +2 B 33.77 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 38.78 KB +20 B (+0.1%) +13 B +15 B 38.85 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 35.70 KB 0 B 0 B +2 B 35.72 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 9.01 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 42.71 KB +21 B (+0.0%) +13 B +15 B 42.73 KB ✅ eager (counted): web.js 22.75 KB; assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.07 KB, sc-comments.js 0.19 KB, trace.js 9.05 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.23 KB 0 B 0 B 0 B 41.25 KB ✅ assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, server.js 1.03 KB, serverForms.js 3.57 KB, trace.js 9.03 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.42 KB −11 B (−0.0%) +13 B +15 B 48.44 KB ✅ eager (counted): client.js 27.94 KB; assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.03 KB, serverForms.js 3.30 KB, trace.js 9.03 KB, wire.js 3.49 KB
server: floor (getRequestEvent + isServer) 1.27 KB 0 B 0 B 0 B 1.29 KB ✅
server: renderToString (the server-render floor) 22.79 KB 0 B 0 B 0 B 22.80 KB ✅

Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in scripts/size/scenarios.js; the floor and page caps in floor-caps.json are frozen (lower only, or Size-Exception: in the PR body). npm run ratchet lowers caps per RC; it never raises one (scripts/size/README.md).

@coveralls

coveralls commented Oct 30, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41079575274

Coverage remained the same at 78.1%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1362
Covered Lines: 1125
Line Coverage: 82.6%
Relevant Branches: 1090
Covered Branches: 790
Branch Coverage: 72.48%
Branches in Coverage %: Yes
Coverage Strength: 29.8 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 12.63%

1 warning

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
✅ 199 untouched benchmarks
⏩ 5 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ projection derive: write one NESTED field (reference) 2.4 ms 2.2 ms +12.63%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-x1ore2-4429 (ff76ebc) with next (e49b0c7)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Copy link
Copy Markdown
Member Author

I don't think either CodSpeed flag comes from this PR. The base (next cddaa76) recorded both benches fast, and other PRs on that base show the same drops with unrelated diffs.

I'm treating both as base-outlier noise.


Generated by Claude Code

The probe now restores `probing` around a pulled pass, so the entry can
only hide a regression.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants