Skip to content

fix(website): re-measure the main and first-load-0 bundle ceilings - #39203

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/bundle-gate-main-ceiling
Nov 18, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/bundle-gate-main-ceiling

Conversation

@dodgeblaster

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Make the Bundle Size Gate pass on main again, so a pull request that touches website/ is not failed by a budget main itself already exceeds.

Pristine main fails its own bundle-size gate. An analyze build of main @ 666d93c742, with no PR code in the tree, gives:

$ node ./node_modules/vite/bin/vite.js build --mode analyze
$ node scripts/check-bundle-size.mjs
FAIL assets/main-_AxZGfIL.js: 1.31 MB exceeds its 1.31 MB budget by 1016 B (chunk 'main')

Why it matters

Every open PR that touches website/ and builds on today's main goes red on a chunk it did not grow, and the gate tells its author to shrink it. #35618 is one: with its own code behind import() it still fails on main's overage. Main's own CI runs over the last day were cancelled by later pushes, so main never showed the red itself.

Not a goal

  • Shrinking the main chunk. Moving a lazy boundary in the always-loaded shell is its own change with its own review.
  • Re-measuring the other first-load entries. first-load-1 and first-load-2 keep 36 KB and 42 KB of room.
  • Changing how the gate measures, reports, or what it runs on.

What changed (motivation → approach → change)

Two ceilings in CHUNK_BUDGETS (website/scripts/check-bundle-size.mjs) are re-measured at 5% over today's analyze build of main, the rule every entry and #33665 use:

Chunk Measured on main @ 666d93c742 Old ceiling New ceiling
main 1,374,200 B 1341 KB (1,016 B over) 1410 KB
first-load-0 1,026,869 B 1003 KB (203 B left) 1053 KB

The growth is not one module that could move behind a lazy boundary. #37015 set both ceilings on main @ c275f70106, and the first load has grown about 66 KB into main since, across many features. The commit that crossed the line is #38803 (a228ee3532, +1.6 kB to main spread across 98 files); the commit before it measured 1,379.64 kB. first-load-0 is re-measured with it because the four layers are cut by size, so the next growth anywhere lands a quarter in each, and 203 B is no room at all. The first-load total (9.19 MB against 9.43 MB) is unchanged and still checked.

Backwards compatibility

Compatible: only two numeric ceilings in a CI gate rise; no runtime code changes.

Removes nothing: the diff raises two numbers and adds a comment.

Tests

Proof: not provable -- docs or config only

The gate's own tests pass (src/test/checkBundleSize.test.ts, src/test/bundleReport.test.ts, 43 tests). On the same analyze build of main the gate reports 738 chunks within budget ... first load: 11 chunks, 9.19 MB (budget 9.43 MB), where it failed before.

Manual verification

Ran CI's two steps (vite build --mode analyze, then node scripts/check-bundle-size.mjs) on main @ 666d93c742 before and after the change: red with the old ceilings, green with the new. Measured the main chunk on analyze builds of 0d68cae9e6, add117488c, a228ee3532 and 666d93c742 to find the commit that crossed the ceiling.

Related Issues

Closes #39199

Sibling sweep

Swept: every CHUNK_BUDGETS entry against the same analyze build of main @ 666d93c
Sibling: website/scripts/check-bundle-size.mjs -- changed here
Sibling: website/vite.config.ts -- not affected -- the first-load layers it defines are unchanged; first-load-1, first-load-2 and first-load-shared keep 36 KB, 42 KB and 86 KB of room

Pattern harvest

Not generalizable: a ceiling set with 5% headroom is used up by ordinary growth over time; the gate already names the re-measure path, and the rule for doing it is unchanged.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • 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.

@dodgeblaster
dodgeblaster requested review from a team and KiroCrewCaptain as code owners November 18, 2026 19:12
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

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

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Main fails its own bundle gate, and this re-measures the two ceilings with the same 5% rule. It is a small CI threshold change that is easy to revert, and the first-load total stays checked.

[DESIGN-REVIEWED] 6c28c8f

Description read

[DESCRIPTION-READ] 28a3bf18294e840cff527f732582369202683df2d12cb8f6aef89157aab68f42

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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing to check. The diff only raises two bundle-size limits in the CI script website/scripts/check-bundle-size.mjs. It adds or changes no user-visible control, so there are no evidence gaps and no screenshot is needed.

[UX-REVIEWED] 6c28c8f

Description read

[DESCRIPTION-READ] 62f728ef747d3c41e12613f685bc810b2e8ac1085e6d31b826e49fbfe98bc2c2

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 6c28c8fdbb47f3fae423b3e8c03d32b360f97ad0 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 6c28c8f

Verdict parsed from the review's SHA-scoped output markers for commit 6c28c8fdbb47f3fae423b3e8c03d32b360f97ad0.

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

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 6c28c8fdbb47f3fae423b3e8c03d32b360f97ad0 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6c28c8f

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 6c28c8fdbb47f3fae423b3e8c03d32b360f97ad0 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 18, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

The PR raises two numbers in CHUNK_BUDGETS and adds a comment saying why. The main ceiling goes from 1341 KB to 1410 KB, and first-load-0 goes from 1003 KB to 1053 KB.

The math follows the file's own rule of measured size + 5%, rounded up to whole KB:

  • main: 1,374,200 × 1.05 / 1024 ≈ 1409.1, which rounds up to 1410 KB.
  • first-load-0: 1,026,869 × 1.05 / 1024 ≈ 1052.9, which rounds up to 1053 KB.
  • Overage: the old main ceiling is 1,373,184 B, so 1,374,200 B is 1,016 B over. That matches the failure quoted in the description.
  • Growth: 1,374,200 − 1,307,743 ≈ 66 KB, which matches the comment.

The rest of the gate is unchanged:

  • First-load total: it is still checked against FIRST_LOAD_BUDGET_BYTES (9656 KB, about 9.43 MB).
  • Shipped-allowlist tests: they only require keys to be logical chunk names and ceilings to be above the 500 KB default. Both still hold.
  • Other readers: the main-ratchet-audit bundle-ceiling job runs the same script, so there is no second copy of these numbers to fall out of sync.

The file's header says raising a ceiling must be justified in the PR. This one justifies it: main fails its own gate, the growth is spre

Tier: 1, every tier gate passed.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 6c28c8fdbb · 9 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 18, 2026 20:20

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved automatically by the code change approver, not by a person. The decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and the change has at most 400 changed lines.

The PR raises two numbers in CHUNK_BUDGETS and adds a comment saying why. The main ceiling goes from 1341 KB to 1410 KB, and first-load-0 goes from 1003 KB to 1053 KB.

The math follows the file's own rule of measured size + 5%, rounded up to whole KB:

  • main: 1,374,200 × 1.05 / 1024 ≈ 1409.1, which rounds up to 1410 KB.
  • first-load-0: 1,026,869 × 1.05 / 1024 ≈ 1052.9, which rounds up to 1053 KB.
  • Overage: the old main ceiling is 1,373,184 B, so 1,374,200 B is 1,016 B over. That matches the failure quoted in the description.
  • Growth: 1,374,200 − 1,307,743 ≈ 66 KB, which matches the comment.

The rest of the gate is unchanged:

  • First-load total: it is still checked against FIRST_LOAD_BUDGET_BYTES (9656 KB, about 9.43 MB).
  • Shipped-allowlist tests: they only require keys to be logical chunk names and ceilings to be above the 500 KB default. Both still hold.
  • Other readers: the main-ratchet-audit bundle-ceiling job runs the same script, so there is no second copy of these numbers to fall out of sync.

The file's header says raising a ceiling must be justified in the PR. This one justifies it: main fails its own gate, the growth is spread across many features rather than one movable module, and the cut-by-size layering is the reason first-load-0 is raised alongside main. Changing a CI threshold does not change runtime behaviour, so no new test is expected. CI is green, including the Bundle Size Gate.

Tier: 1, every tier gate passed.
Criteria: no merge conflict, no owner block, no change request, the default branch, no security-sensitive path, no design document to agree on, the readiness status, the review lanes, the P0 history, the linked issues' tier, the review lessons, no concern label, the file count, a safe change category, not its own change, the decider, the security checklist, the change matches its title, no competing change.

Decider v3c (217fe607). To overrule it, request changes or dismiss this review.

@KiroCrewCaptain
KiroCrewCaptain merged commit 8a548c8 into main Nov 18, 2026
97 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/bundle-gate-main-ceiling branch November 18, 2026 20:20
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 18, 2026
CrysisDeu pushed a commit that referenced this pull request Nov 18, 2026
The IAM Identity Center choice reads "Company SSO — I have an
…awsapps.com/start URL", so it no longer reads the same as the
organization choice beside it. The organization choice is named "Work
account" on its button ("Work account — sign in with my work email"),
its form heading, the waiting screen and the stored-account label, with
"Signs in directly with your organization's identity provider, not
through AWS IAM Identity Center" as the helper line under the button and
the form heading (new key organization_idp_hint, in every catalog; en-XA
regenerated). It names no provider, so it does not repeat the Okta and
Microsoft Entra names in the Company SSO hint. Each open form carries
a heading with its choice's name, and the browser instruction under the
organization form is its own line.

- The organization form moves to KasOrganizationForm.tsx and loads
  through lazyRetry (block layout, no agent hand-off beside its unsaved
  fields): a failed chunk shows inline with Try Again, and the clicked
  choice holds its row while the chunk loads; the slot is focusable and
  takes focus once (never from a field the person moved to) only while
  the stand-in or the failure notice shows, so the loaded form's own
  autoFocus places focus.
- No bundle budget change. This change adds 1,988 B to the `main` chunk
  (analyze builds of 5ca36e7 with and without it: 1,372,551 B and
  1,374,539 B), which fits under the 1410 KB ceiling main set in #39203.
- The external-IdP URL and issuer checks use the shared validators in
  connections.l0_probe (_https_url, _validate_issuer, same_issuer)
  instead of their own copies, and the domain check is _is_domain in
  place of _DOMAIN_RE.
- The external-IdP profile listing passes viewer_cps_url, so a relay
  viewer's control plane is asked first, as the other sign-ins do.
- Tests, capture scripts and docs (kas-auth.md, learn-cron-dashboard.md,
  feature-map README) name the new labels.
@rubencu rubencu mentioned this pull request Nov 18, 2026
5 tasks done
CrysisDeu pushed a commit that referenced this pull request Nov 18, 2026
The IAM Identity Center choice reads "Company SSO — I have an
…awsapps.com/start URL", so it no longer reads the same as the
organization choice beside it. The organization choice is named "Work
account" on its button ("Work account — sign in with my work email"),
its form heading, the waiting screen and the stored-account label, with
"Signs in directly with your organization's identity provider, not
through AWS IAM Identity Center" as the helper line under the button and
the form heading (new key organization_idp_hint, in every catalog; en-XA
regenerated). It names no provider, so it does not repeat the Okta and
Microsoft Entra names in the Company SSO hint. Each open form carries
a heading with its choice's name, and the browser instruction under the
organization form is its own line.

- The organization form moves to KasOrganizationForm.tsx and loads
  through lazyRetry (block layout, no agent hand-off beside its unsaved
  fields): a failed chunk shows inline with Try Again, and the clicked
  choice holds its row while the chunk loads; the slot is focusable and
  takes focus once (never from a field the person moved to) only while
  the stand-in or the failure notice shows, so the loaded form's own
  autoFocus places focus.
- No bundle budget change. This change adds 1,988 B to the `main` chunk
  (analyze builds of 5ca36e7 with and without it: 1,372,551 B and
  1,374,539 B), which fits under the 1410 KB ceiling main set in #39203.
- The external-IdP URL and issuer checks use the shared validators in
  connections.l0_probe (_https_url, _validate_issuer, same_issuer)
  instead of their own copies, and the domain check is _is_domain in
  place of _DOMAIN_RE.
- The external-IdP profile listing passes viewer_cps_url, so a relay
  viewer's control plane is asked first, as the other sign-ins do.
- Tests, capture scripts and docs (kas-auth.md, learn-cron-dashboard.md,
  feature-map README) name the new labels.
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.

Main fails its own Bundle Size Gate: the 'main' chunk is 1,016 B over its ceiling

3 participants