Skip to content

test(signals): make two timing-sensitive tests robust on loaded CI runners - #4516

Merged
ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-treeshake-timeout
Oct 30, 2026
Merged

ryansolid merged 2 commits into
nextfrom
claude/project-thread-x1ore2-treeshake-timeout

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Before: two signals tests sometimes fail on CI under full-suite load, without any real regression behind them:

  • tests/treeshake.test.ts › "core floor sheds every optional feature module" hits vitest's 5 s default timeout (5,295 ms on fix(signals): a memo waiting on a held flight is the hold's work at its landing (#4408, #4399) #4510, and on other PRs earlier today). Each test in that file runs a full Vite build, and the first one also pays the bundler's cold start.
  • tests/attribution.test.ts › "measures self-time and aggregates costs by scope and root write" ranks a memo that spins for 10 ms above a cheap effect by wall-clock self-time. On this PR's first CI run, a scheduling pause inside the effect measured 17.9 ms against the memo's 10.1 ms (expected 17.94 to be less than 10.11).

After: the tree-shaking suite has a 30 s timeout, and the attribution memo spins for 40 ms. Both tests still assert the same things, but a slow runner no longer turns them red.

How: describe(name, { timeout: 30_000 }, fn) for the tree-shaking suite, and spin(40) for the attribution memo, each with a comment explaining why. Locally both files pass (treeshake 15/15, attribution 32/32). These are test-only changes: no changeset, no size change.

🤖 Generated with Claude Code

https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2

Every test in treeshake.test.ts runs a full Vite build of a fixture. The
first one pays the bundler's cold start, and under the whole suite's load
on CI it has run past vitest's 5 s default (5,295 ms on #4510, and on
other PRs earlier today) without any assertion failing.

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

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f44d5b4

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

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.41 KB 0 B 0 B −3 B 7.43 KB ✅
signals: + createStore 14.97 KB 0 B 0 B +24 B 14.99 KB ✅
signals: + isPending/latest 11.34 KB 0 B 0 B −3 B 11.35 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.04 KB 0 B 0 B −1 B 8.06 KB ✅
app: render + one signal (the simple-app floor) 9.79 KB 0 B 0 B −3 B 9.80 KB ✅
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.78 KB 0 B 0 B +4 B 18.74 KB ⚠️ over by 43 B, 16 B minified headroom lazy-page.js 0.04 KB
app: hydrating + every store primitive family 32.43 KB 0 B 0 B +49 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 +13 B 13.47 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.18 KB 0 B 0 B +13 B 15.20 KB ✅ lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.78 KB 0 B 0 B +13 B 29.78 KB ⚠️ over by 4 B, 7 B minified headroom lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.98 KB 0 B 0 B −1 B 9.98 KB ✅
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.30 KB 0 B 0 B +32 B 26.36 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.50 KB 0 B 0 B +32 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.80 KB 0 B 0 B +4 B 33.77 KB ⚠️ over by 29 B, 16 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.19 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 39.08 KB 0 B 0 B +4 B 39.10 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.18 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.69 KB 0 B 0 B +4 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.15 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 43.03 KB 0 B 0 B +4 B 43.02 KB ⚠️ over by 11 B, 16 B minified headroom eager (counted): web.js 23.01 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.17 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.10 KB 0 B 0 B −53 B 41.25 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.58 KB, trace.js 9.13 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 48.63 KB 0 B 0 B −69 B 48.67 KB ✅ eager (counted): client.js 28.12 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.13 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.85 KB 0 B 0 B 0 B 22.87 KB ✅

⚠️ Over the brotli cap within the minified allowance (passes)

  • app: hydrating (no stores) with Show/For/Loading/Errored/lazy: over brotli cap by 43 B; minified 53,611 B vs 53,607 B recorded with the cap (+4 B) — 16 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: CSR, observe tier + attribution engine enabled: over brotli cap by 4 B; minified 88,329 B vs 88,316 B recorded with the cap (+13 B) — 7 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • page: base server components (hydrating + dynamic + frames + sf reference): over brotli cap by 29 B; minified 101,710 B vs 101,706 B recorded with the cap (+4 B) — 16 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • page: compiled live server components (the compiled base page + live/GET + action + isPending/latest): over brotli cap by 11 B; minified 126,200 B vs 126,196 B recorded with the cap (+4 B) — 16 B of the 20 B minified allowance left; +0 B minified over this PR's base

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).

"measures self-time and aggregates costs by scope and root write"
ranks a 10 ms memo above a cheap effect by wall-clock self-time. On this
PR's CI run a scheduling pause inside the effect measured 17.9 ms against
the memo's 10.1 ms. A 40 ms spin keeps the ranking meaningful under load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@ryansolid ryansolid changed the title test(signals): give the tree-shaking suite a 30 s timeout test(signals): make two timing-sensitive tests robust on loaded CI runners Oct 30, 2026
@ryansolid
ryansolid merged commit 6bde511 into next Oct 30, 2026
8 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41144279741

Coverage remained the same at 78.108%

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: 1363
Covered Lines: 1126
Line Coverage: 82.61%
Relevant Branches: 1090
Covered Branches: 790
Branch Coverage: 72.48%
Branches in Coverage %: Yes
Coverage Strength: 29.79 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 5.28%

2 warnings

⚠️ 2 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 benchmark with a significant change ran on different hardware

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

Learn more about Macro Runners

See affected benchmarks

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

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ polymorphic-chain mount+clear 1000 rows: compiled 428 ms 406.6 ms +5.28%

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-treeshake-timeout (6fb919e) with next (61bb177)

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. ↩

@ryansolid
ryansolid deleted the claude/project-thread-x1ore2-treeshake-timeout branch November 5, 2026 17:34
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