Skip to content

ci: track tree-shaken scenario sizes per PR with size-limit (#2883)#2891

Merged
ryansolid merged 5 commits into
nextfrom
ci/size-limit
Jul 15, 2026
Merged

ci: track tree-shaken scenario sizes per PR with size-limit (#2883)#2891
ryansolid merged 5 commits into
nextfrom
ci/size-limit

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Re-lands the size tracking that was committed to the phase-3 branch after #2890 had already merged (the commit was stranded on the closed branch).

Five import-cost scenarios in .size-limit.json with ~5% headroom limits as the tree-shaking regression gate — a re-coupled feature module costs hundreds of bytes against that headroom, so a breach means shaking broke (or a deliberate feature: bump the ceiling in the same PR with a reason). The render+one-signal simple-app scenario is pinned at 10 KB (brotli), making that mark a CI invariant. The size-limit GitHub action comments base-vs-head deltas per scenario on every PR; pnpm size runs the same gate locally. The retained-module-graph test in solid-signals remains the which-module-re-coupled diagnostic underneath.

Current numbers: signals floor 6.76 KB (limit 7.1) · +createStore 11.05 (11.6) · +isPending/latest 8.32 (8.75) · simple app 9.42 (10) · CSR app 11.41 (12), all brotli.

Companion guard for the runtime side: ryansolid/dom-expressions#545.

🤖 Generated with Claude Code

Five import-cost scenarios (signals floor / +createStore / +isPending,
latest; the render+signal simple-app floor; a representative CSR app)
with ~5% headroom limits as the tree-shaking regression gate — a
re-coupled feature module costs hundreds of bytes against that headroom.
The simple-app ceiling is pinned at 10 KB (brotli) deliberately. The
size-limit action comments base-vs-head deltas on every PR; the
retained-module-graph test in solid-signals stays the precise
which-module diagnostic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ee84dd1

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

@coveralls

coveralls commented Jul 15, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29453133491

Warning

No base build found for commit d0b9c91 on next.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 74.74%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 596
Covered Lines: 477
Line Coverage: 80.03%
Relevant Branches: 461
Covered Branches: 313
Branch Coverage: 67.9%
Branches in Coverage %: Yes
Coverage Strength: 14.29 hits per line

💛 - Coveralls

…lta comment

The size-limit action compares against the base branch, which fails on
any PR whose base lacks the size-limit setup (including this bootstrap
PR) with 'Unexpected end of JSON input'. The hard gate is now its own
job — install, build, pnpm size on the head only — and the base-vs-head
comment job is continue-on-error, so it informs when it can and never
blocks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks
⏩ 113 skipped benchmarks1


Comparing ci/size-limit (ee84dd1) with next (d0b9c91)

Open in CodSpeed

Footnotes

  1. 113 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 and others added 3 commits July 15, 2026 14:10
Adding solid-js/@solidjs/* as root devDeps re-keyed pnpm's peer graph
(vitest and vite-plugin-solid instances gained new peer contexts),
relocating the benchmark harness's physical dependencies — which CodSpeed
reports as instruction-count regressions despite zero code changes.
Aliases in .size-limit.js point bare specifiers at the built browser-prod
artifacts instead; the lockfile now only adds size-limit's own isolated
tree. Same measured numbers on every scenario.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Any change to the workspace dependency graph re-keys pnpm peer instances
— removing the workspace devDeps still moved @codspeed/vitest-plugin and
vite instance keys (vite's optional terser peer context) — and relocating
the benchmark harness shows up as phantom CodSpeed regressions. size/ is
now a plain npm package outside the pnpm workspace with its own lockfile;
the root package.json and pnpm-lock.yaml are byte-identical to next.
Fixtures resolve bare specifiers via esbuild aliases to the built
browser-prod artifacts. Same measured numbers on every scenario.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same isolated-from-the-workspace setup, less top-level clutter; README
documents why it must stay outside the pnpm workspace graph.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ryansolid ryansolid merged commit ca82433 into next Jul 15, 2026
5 checks passed
@ryansolid ryansolid deleted the ci/size-limit branch July 15, 2026 21:56
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.

2 participants