Skip to content

fix(website): re-measure the App chunk's bundle-size ceiling - #33669

Closed
Pearcekieser wants to merge 1 commit into
mainfrom
pearcekieser/app-chunk-budget-remeasure
Closed

Pearcekieser wants to merge 1 commit into
mainfrom
pearcekieser/app-chunk-budget-remeasure

Conversation

@Pearcekieser

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The per-chunk Bundle Size Gate passes on main again, so PRs that touch website/ stop failing it for main's own growth.

On main at f08ae0d, the analyze build emits the App chunk at 2,253,662 B. Its ceiling is 2200 KB (2,252,800 B), so main alone is 862 B over, and every PR that touches website/ inherits the red check on its merge ref. The Main Ratchet Audit tracks the same lane in #32956.

Why it matters

A gate that fails on main blocks unrelated PRs and teaches authors to rerun or ignore it, which hides a real regression when one comes. The gate exists to catch a new library or surface landing in the always-loaded chunk, not 29 days of spread-out growth.

Not a goal

  • Making the App chunk smaller. The growth is spread across the always-loaded shell and chat route, and the route-only pages are already lazy, so no single import() boundary moves it out.
  • Changing any other chunk's budget or the default 500 KB budget.

What changed (motivation → approach → change)

CHUNK_BUDGETS in website/scripts/check-bundle-size.mjs set App to 2200 KB from a 2,144,668 B measurement on 2026-10-11 (#19089), about 5% headroom. Since then, first-party growth added 108,994 B and 77 modules to that chunk, so the headroom is spent and main's tip is over.

The ceiling is re-measured on main's tip with the same ~5% convention the comment block prescribes: 2,253,662 B * 1.05 = 2,366,346 B, rounded up to the table's whole-KB unit, which is 2311 KB (2,366,464 B, 112,802 B or 5.01% of headroom). A new paragraph in the comment block records the measurement, the commit, the module count and why no lazy boundary applies, in the same form as the earlier re-measurements.

Backwards compatibility

Compatible. Only the App ceiling changes. No product code changes, and every other budget stays as it is.

Tests

The gate itself is the test. On a clean worktree at f08ae0d:

  • node --max-old-space-size=6144 ./node_modules/vite/bin/vite.js build --mode analyze, then node scripts/check-bundle-size.mjs, fails with "exceeds its 2.15 MB budget by 862 B (chunk 'App')" before this change.
  • The same check passes after it: "1017 chunks within budget".

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

N/A. The gate run above is the verification.

Screenshots / video

N/A. No user-visible change.

Related Issues

The Main Ratchet Audit reports the same bundle-ceiling lane in #32956. The last re-measurement was #19089.

Sibling sweep

Swept: node scripts/check-bundle-size.mjs on main @ f08ae0d
Siblings: none -- the gate run lists App as the only chunk over its budget on main

Pattern harvest

Not generalizable: a per-chunk ceiling with a fixed headroom is spent by ordinary growth by design, and the comment block already documents the re-measure step.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

Fixes #33668

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners November 9, 2026 03:57
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The diff only changes a build script's bundle-size ceiling, with no user-visible control, so the missing blind read leaves no evidence gap.

[UX-REVIEWED] 9bccbe0

Description read

[DESCRIPTION-READ] ad87bb041295e03e748ad74b63eaad630ff2d405312acb5dfcaad5b3cde46bcd

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. This is a budget re-measure that follows the convention the comment block already sets, it renders nothing new, and a revert undoes it cleanly.

Notes

  • Two of these re-measures in about a month suggests a fixed 5% headroom will run out again in about 30 days. A lower-risk follow-up would be a ceiling the ratchet audit re-measures itself, or a bigger headroom figure that is written down. That belongs in Main ratchet drift detected #32956, not this PR.

[DESIGN-REVIEWED] 9bccbe0

Description read

[DESCRIPTION-READ] 4b22a03e4b08eec9487119223eb2940f21a082f859338f4aa99d40811ea190c9

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 9bccbe0

Verdict parsed from the review's SHA-scoped output markers for commit 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9bccbe0

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9bccbe0e942f32429247e5536aeac5ebc9bd9f4f false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 9, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Superseded by #33665, which merged the same App ceiling (2311 KB) at 456d804.

@Pearcekieser
Pearcekieser deleted the pearcekieser/app-chunk-budget-remeasure branch November 9, 2026 04:42
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 9, 2026
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.

Bundle Size Gate fails on main: the App chunk is 862 B over its 2200 KB ceiling

1 participant