Skip to content

ci(bench): raise hydrate byte budgets for #1753 - #1754

Merged
trueadm merged 1 commit into
mainfrom
ci/budget-unclosed-hydration-range
Oct 5, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/budget-unclosed-hydration-range

Conversation

@trueadm

@trueadm trueadm commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR only raises byte budgets. It makes room for #1753, which fixes a hydration crash when server HTML loses a range's closing <!--]-->. Some HTML minifiers and proxies strip comments, and the crash throws Cannot read properties of null (reading 'nodeType') and empties the root.

Merge this PR first, then merge main into #1753. CONTRIBUTING "Size budgets" keeps a raise out of the change that needs it, and budget-raises.mjs enforces that.

Why

Why the bytes are worth it. On main, one missing closing comment fails the whole root with an uncaught error and an empty container. A Suspense arm that finishes hydrating after the root commits fails with nothing left to recover it. #1753 makes the nearest Suspense or <Hydrate> boundary around the damaged range, or else the root, render on the client and report one recoverable error (#338).

Why it cannot be smaller.

  • The growth is hydration-only. cli-spa-starter, root-static and suspense-transition are byte-identical to main.
  • About 128 raw bytes are that subclass and the throw in the range walk.
  • About 184 raw bytes are the Suspense-arm recovery. That code is what keeps an arm whose hydration resumes after commit from crashing. Its tests fail when it is removed.
  • Guessing a close position locally instead would be smaller, but it is not correct. Closing the range at the end of its parent discards the static template content after it.

Changes

Measured with node benchmarks/bundle-size/run-minimal.mjs, Node 24, on #1753 merged with main bda419a:

scenario main #1753 Δ
hydrate-root raw / gzip / brotli 173,813 / 55,160 / 48,183 174,125 / 55,244 / 48,283 +312 / +84 / +100
deferred-hydration raw / gzip / brotli 237,321 / 75,020 / 64,779 237,634 / 75,127 / 64,939 +313 / +107 / +160

Each new budget is #1753's measured bytes plus the usual 32 raw and gzip. Only breached metrics are raised; both brotli budgets still hold, so they are unchanged.

file budget old new Δ
minimal-budgets.json hydrate-root.raw 173,820 174,157 +337
minimal-budgets.json hydrate-root.gzip 55,190 55,276 +86
minimal-budgets.json deferred-hydration.raw 237,328 237,666 +338
minimal-budgets.json deferred-hydration.gzip 75,032 75,159 +127

No app or JSX budget changes: none of those apps hydrate, and #1753 adds nothing to client-only bundles.

Validation

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Only updates benchmark budget thresholds in JSON; no runtime or library code changes.

Overview
Raises minimal bundle-size budgets in minimal-budgets.json so CI can pass after the hydration recovery work in #1753 lands.

hydrate-root: raw 173,820 → 174,157, gzip 55,190 → 55,276 (brotli unchanged). deferred-hydration: raw 237,328 → 237,666, gzip 75,032 → 75,159 (brotli unchanged). No other scenarios or metrics in this diff.

Reviewed by Cursor Bugbot for commit 0c46e3e. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 5, 2026 10:59 Inactive
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Oct 5, 2026 10:59am UTC
octane-website-mcp Skipped Skipped Oct 5, 2026 10:59am UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website October 5, 2026 10:59 Inactive
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline labels Oct 5, 2026
@trueadm
trueadm marked this pull request as ready for review October 5, 2026 10:59
@trueadm
trueadm merged commit e3da909 into main Oct 5, 2026
30 of 49 checks passed
@trueadm
trueadm deleted the ci/budget-unclosed-hydration-range branch October 5, 2026 11:01

This branch was previously deployed

2 inactive deployments
Preview – octane-website — 0c46e3ea Deployed Oct 5, 2026 by vercel[bot]
Preview – octane-website-mcp — 0c46e3ea Deployed Oct 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant