Repository navigation
fix(website): re-measure the main and first-load-0 bundle ceilings - #39203
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only raises two bundle-size limits in the CI script [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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: 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 The math follows the file's own rule of measured size + 5%, rounded up to whole KB:
The rest of the gate is unchanged:
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 |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
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
mainceiling 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-ceilingjob 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.
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.
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.
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: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 behindimport()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
mainchunk. Moving a lazy boundary in the always-loaded shell is its own change with its own review.first-load-1andfirst-load-2keep 36 KB and 42 KB of room.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:666d93c742mainfirst-load-0The 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 intomainsince, across many features. The commit that crossed the line is #38803 (a228ee3532, +1.6 kB tomainspread across 98 files); the commit before it measured 1,379.64 kB.first-load-0is 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 reports738 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, thennode scripts/check-bundle-size.mjs) on main @666d93c742before and after the change: red with the old ceilings, green with the new. Measured themainchunk on analyze builds of0d68cae9e6,add117488c,a228ee3532and666d93c742to find the commit that crossed the ceiling.Related Issues
Closes #39199
Sibling sweep
Swept: every
CHUNK_BUDGETSentry against the same analyze build of main @ 666d93cSibling: 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.