Skip to content

chore(signals): pin Sparkplug tiering in the signals bench lane - #5216

Merged
ryansolid merged 22 commits into
mainfrom
claude/project-thread-vnjtow
Nov 26, 2026
Merged

ryansolid merged 22 commits into
mainfrom
claude/project-thread-vnjtow

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Summary

This extends #5157's --always-sparkplug pin from the web-server lane to the signals lane. @codspeed/core 5.4.0 passes --no-opt but leaves Sparkplug tiering to V8, so some counts flip between two levels from run to run depending on what else ran in the lane.

The two client lanes stay unpinned. In #5141, pinning made replace-full: 1000 rows vary by 4.6% (under 1% unpinned) and gave web-client-2 an outlier on tail, keyed by fn.

The flag is set only in benchmark mode. The CodSpeed plugin runs benches in forks and appends its own V8 flags to execArgv. The test suite runs in threads, and worker threads reject V8 flags in execArgv (ERR_WORKER_INVALID_EXEC_ARGV), so the suite must not get it.

This shifts the signals lane's baselines once, so this PR's CodSpeed report will show those moves. It should land before #4906 re-measures.

How did you test this change?

  • npx vitest bench --run with a temporary bench that wrote process.execArgv: the bench worker's arguments include --always-sparkplug, next to CodSpeed's --interpreted-frames-native-stack --allow-natives-syntax. The temporary bench is not part of this PR.
  • npx vitest run on three test files still runs in threads and passes (13 tests).
  • Instruction counts need CodSpeed's simulation mode. This PR's CodSpeed job is the first uploaded signals run with the flag.

Generated by Claude Code

claude and others added 22 commits November 18, 2026 11:07
Since #4985, h, html and element version on their own, so a core release
leaves them at a version already on npm. verify-release-artifacts.mjs
dry-run-published every public package, and npm refuses even a dry run over
a published version, so the 2.0.1 release failed before publishing anything.
It now skips a published version the same way release.mjs does, with
packageIsPublished shared from release-packages.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…ding on it

retryReaches counted a dep that is the source itself as a path even after
that source settled, so settleFamily and the re-park sweep in recompute
kept a settled derive node in a reader's pending sources. With an
optimistic store over one async memo and a slower sibling memo whose
re-ask answers unchanged, the reader stayed pending and the action's
transaction never landed. A direct link now counts only while the source
is pending.

Claude-Session: https://claude.ai/code/session_01CP9T3j2CTCEPyTS2bcKsBu
# Conflicts:
#	packages/signals/docs/RULES-INDEX.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
…tream

The top-level abort wrapper for streamed results matched any async
iterable, so a decoded ReadableStream (which is one in Node and Chrome)
was replaced by a plain iterable and lost getReader/pipeTo/tee. Leave a
ReadableStream out of that check; it passes through as it already does
when nested. Test shape from #5175.

Co-authored-by: Marve10s <igrimanigroman@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
The instanceof check with its typeof guard cost +59 B minified on every
server-function page and put three page scenarios over their caps. A
decoded ReadableStream is told apart from an async generator's result by
its getReader method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMpyUtA1ZFwzKmr1sg
Send `,` in one header write when the joined keys are only whitespace,
and digest `X-Revalidate` with empty keys filtered, so an empty
declaration reads as `[]` on the outcome instead of `[""]` or
`["", ""]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
…hing it

The 2.0.4 publish stopped at `gh run watch`: `gh workflow run` printed
the new run's URL, and watching it one second later returned 404 because
the run was not readable yet. Poll `gh run view` until it resolves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
The 2.0.4 re-run got past the run lookup, then `gh run watch` failed on
the run's jobs (HTTP 404) before GitHub had created them. Poll
`gh run view --json status,conclusion` until the run completes, retrying
failed reads, and check the conclusion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
After the 11-24 fix batch and 2.0.4, six scenarios sat over their brotli
caps with 9-14 B of minified allowance left (warnings on main, but the
next ~10 B client fix would fail the gate). Caps move to CI's measure on
5420b4a + 10 B and recorded minified resets to the measure. No floors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
Same flag as the web server lane (#5157). In #5141's fork runs it took
the signals lane from one benchmark varying by more than 5% across
fresh runners to none, and #4906's omit ownKeys -63% reads 226k vs 235k
instructions pinned (673k vs 237k unpinned). Benchmark mode only: the
test suite runs in worker threads, which reject V8 flags in execArgv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 61a81bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

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.50 KB 0 B 0 B −212 B 7.56 KB ✅
signals: + createStore 15.15 KB 0 B 0 B 0 B 15.16 KB ✅
signals: + isPending/latest 13.39 KB 0 B 0 B −65 B 13.43 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.22 KB 0 B 0 B −14 B 8.23 KB ✅
app: render + one signal (the simple-app floor) 9.76 KB 0 B 0 B −514 B 9.85 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 19.10 KB 0 B 0 B −184 B 19.14 KB ✅ lazy-page.js 0.04 KB
app: hydrating + every store primitive family 35.19 KB 0 B 0 B −672 B 35.45 KB ✅ lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.75 KB 0 B 0 B −297 B 13.86 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.49 KB 0 B 0 B −297 B 15.59 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 30.07 KB 0 B 0 B −376 B 30.22 KB ✅ lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.94 KB 0 B 0 B −586 B 10.03 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.78 KB 0 B 0 B 0 B 26.80 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 33.08 KB 0 B 0 B 0 B 33.10 KB ✅ stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.78 KB 0 B 0 B +20 B 11.80 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 34.19 KB 0 B 0 B +12 B 34.21 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.32 KB, wire.js 3.48 KB
page: live server components (base + live/GET + action + isPending/latest) 41.61 KB 0 B 0 B +5 B 41.66 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.33 KB, wire.js 3.48 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 36.16 KB 0 B 0 B 0 B 36.17 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 9.29 KB, wire.js 3.48 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 45.85 KB 0 B 0 B 0 B 45.87 KB ✅ eager (counted): web.js 24.30 KB; assets.js 0.78 KB, decode.js 7.41 KB, regions.js 1.08 KB, sc-comments.js 0.19 KB, trace.js 9.29 KB, wire.js 3.48 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.67 KB 0 B 0 B +12 B 41.75 KB ✅ assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, server.js 1.05 KB, serverForms.js 3.58 KB, trace.js 9.29 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 51.50 KB 0 B 0 B 0 B 51.52 KB ✅ eager (counted): client.js 29.52 KB; assets.js 0.78 KB, decode.js 7.41 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.05 KB, serverForms.js 3.31 KB, trace.js 9.28 KB, wire.js 3.50 KB
server: floor (getRequestEvent + isServer) 1.31 KB 0 B 0 B 0 B 1.33 KB ✅
server: renderToString (the server-render floor) 23.59 KB 0 B 0 B −2 B 23.62 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

Copy link
Copy Markdown

Coverage Report for CI Build 45776161779

Coverage remained the same at 79.815%

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: 1379
Covered Lines: 1163
Line Coverage: 84.34%
Relevant Branches: 1108
Covered Branches: 822
Branch Coverage: 74.19%
Branches in Coverage %: Yes
Coverage Strength: 31.0 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Nov 26, 2026

Copy link
Copy Markdown

Merging this PR will regress 5 benchmarks

3 warnings

⚠️ Upgrade your CodSpeed plugin for Node.js 24

@codspeed/* 5.4.0 is only tested on Node.js 18, 20, and 22, so your Node.js 24 measurements may be inaccurate. Upgrade your @codspeed/* packages to 6.0.0 or later.

See affected benchmarks

⚠️ 1 benchmark is 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

⚠️ 35 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 30 improved benchmarks
❌ 5 regressed benchmarks
✅ 166 untouched benchmarks
⏩ 5 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ createStore setter: delete + set one root key (#3044 overlay) 533.1 µs 2,468.9 µs -78.41%
❌ enumerate:leafRead 1000 rows x 30 fields 41.9 ms 47.9 ms -12.38%
❌ memo + sync render effect + user effect over a ref signal (#3350) 19.6 ms 21 ms -6.57%
❌ fresh stores: create + first write + first commit (reporter shape) 14.8 ms 15.8 ms -6.1%
❌ createRenderEffects:create1to1 73.2 ms 77.2 ms -5.24%
⚡ readAllowed 349.6 µs 22.2 µs ×16
⚡ hasAllowed 37.6 µs 20.9 µs +79.72%
⚡ build 138.7 µs 91.9 µs +50.88%
⚡ merge 39.5 µs 26.5 µs +49.26%
⚡ build + consume 696.3 µs 481.2 µs +44.68%
⚡ propagation:avoidable 686.7 µs 510 µs +34.64%
⚡ omit 25.2 µs 18.8 µs +33.96%
⚡ omit 24.2 µs 18.2 µs +33.37%
⚡ construct 30.5 µs 24.2 µs +26.41%
⚡ construct 33.1 µs 27.1 µs +22.33%
⚡ reconcile: read-once untracked tree, 10 of ~12k paths subscribed 6.5 ms 5.4 ms +20.74%
⚡ readBlocked 16.2 µs 14.1 µs +14.67%
⚡ read 27.6 µs 24.1 µs +14.4%
⚡ read 27.6 µs 24.2 µs +14.18%
⚡ read 23.2 µs 20.7 µs +12.14%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-vnjtow (61a81bf) with main (ad1f561)

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

The red CodSpeed check is the one-time baseline shift this PR describes, not a code change. The PR touches only the signals bench config, and pinning --always-sparkplug moves 35 counts, 30 faster and 5 slower. The large createStore setter: delete + set one root key (#3044 overlay) move (533 µs → 2,469 µs) is in projection-root-write.bench.ts. An earlier flip in that file was traced to whether a GC sweep lands in its single measured run, so that row may keep moving after the pin.


Generated by Claude Code

@ryansolid
ryansolid merged commit 395d24e into main Nov 26, 2026
13 of 14 checks passed
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.

5 participants