Skip to content

fix(ci): re-measure the ModelEffortDropdown chunk's bundle-size ceiling - #23867

Merged
buluoray merged 1 commit into
mainfrom
fix/bundle-gate-model-effort-dropdown
Oct 25, 2026
Merged

buluoray merged 1 commit into
mainfrom
fix/bundle-gate-model-effort-dropdown

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The Bundle Size Gate passes again on pristine main, so website PRs go red only for growth they cause.

Pristine main @ 0dab198 fails the gate with no PR code in the tree:

FAIL assets/ModelEffortDropdown-7K-8ZqjG.js: 505.0 KB exceeds its 500.0 KB budget by 5.0 KB (chunk 'ModelEffortDropdown')

The gate runs on the PR merge ref, so every open PR that touches website/ now fails it whatever it changes; #23618 was the first (its own tree builds the chunk at 504,901 B, under budget).

Why it matters

A gate that is red on main's own tip blocks every website PR and stops catching the regression it exists for (a new library landing in a chunk), because authors learn to read it as noise.

Not a goal

  • Shrinking the chunk. It is first-party chat-route code already behind a lazy boundary; a further import() seam is a design change for the chat route, not a gate fix.
  • Any other budget entry. Only the chunk main fails on is re-measured.

What changed (motivation → approach → change)

Measured first. A detached worktree on origin/main @ 0dab198 with npm ci and npx vite build --mode analyze emits the chunk at 517,094 B (163 modules); node scripts/check-bundle-size.mjs fails on it exactly as CI does. Then, per main commit since fada42f (the PR base where the gate still passed):

main @ chunk size modules what
fada42f 502,179 B 162 base
8f317e5 507,843 B 162 eight website commits of ordinary chat-route growth, +5,664 B
1a7190c 517,094 B 163 #23271 MCP elicitation on both ACP wires: +9,251 B and the new module
0dab198 517,094 B 163 tip

No dependency joined the chunk: the only package.json change in the range is #23634's React Compiler toolchain, with an empty opt-in list.

The change is one CHUNK_BUDGETS entry in website/scripts/check-bundle-size.mjs, ModelEffortDropdown: 531 * KB, at the table's ~5% convention over the measurement (517,094 B × 1.05 = 542,949 B, rounded up to the whole-KB unit; 26,650 B / 5.15% headroom), with the attribution above in its note. Same shape as #19089 and #15514 for the App chunk.

Backwards compatibility

Compatible: a CI gate's ceiling moves; no shipped code changes.

Removes nothing: one table entry is added.

Tests

Proof: not provable -- docs or config only (a CI gate budget table). Verified by hand: with pristine main's bundle-report.json in place, node scripts/check-bundle-size.mjs goes from FAIL ... ModelEffortDropdown to 927 chunks within budget (default 500.0 KB, 25 allowlisted).

Manual verification

  • git worktree add --detach <dir> origin/main && cd <dir>/website && npm ci && npx vite build --mode analyze && node scripts/check-bundle-size.mjs → FAIL on main's tip.
  • Same report, this branch's script → pass.
  • python3 scripts/check_file_line_cap.py → 0 failures.

Related Issues

Fixes #23866
Refs #23618

Sibling sweep

Swept: node scripts/check-bundle-size.mjs over pristine main's analyze build (every emitted chunk against its budget).
Siblings: none -- it is the only chunk over budget on main @ 0dab198; the other 926 pass.

Pattern harvest

Not generalizable: the same recurrence the App entry's notes document (a chunk reaching a fixed ceiling through ordinary first-party growth); the fix each time is a re-measurement with attribution, which this table already prescribes.

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; see the Licensing section of CONTRIBUTING.md.

Pristine main @ 0dab198 builds the shared chat-route chunk Rolldown
names after the composer's model/effort picker at 517,094 B (505.0 KB),
5,094 B over the 500 KB default the Bundle Size Gate applies to a chunk
with no entry of its own, so the gate fails on the merge ref of every
open website PR (#23618 first) with no PR code in the tree.

Attribution is measured per main commit since fada42f, where the
chunk was 502,179 B: eight website commits of ordinary chat-route growth
added 5,664 B, and #23271 (1a7190c) added one module and 9,251 B.
No dependency joined the chunk. Give it a CHUNK_BUDGETS entry at the
table's ~5% convention over the measurement (531 KB), with the
attribution in its note, the way #19089 and #15514 re-measured App.

Fixes #23866
@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 24, 2026 23:32
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 2e07c4b3963d119149f9dd04d31726c2b9b5e8ac 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

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing to check. The only change is a bundle-size budget in a CI build script, so no user-visible control is added or changed and the missing screenshots leave no evidence gap.

[UX-REVIEWED] 2e07c4b

Description read

[DESCRIPTION-READ] 82d888ccadf9cbe0203c83c1347fc5eb46b68ac6fdc82ff602e2e728bc84f98b

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

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: this is a measured, attributed re-baseline of one budget entry, done the way the table already prescribes.

Notes

  • The key ModelEffortDropdown is a name the bundler picked from its own grouping, not a codeSplitting entry. If the grouping changes, the budget stops matching any chunk without warning. A named entry in vite.config.ts would pin it, but that is a follow-up, not this PR.

[DESIGN-REVIEWED] 2e07c4b

Description read

[DESCRIPTION-READ] e99081723a11eba2cd71dc1524637414b13bc0876a50ff18ee1274df7d119471

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

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 2e07c4b3963d119149f9dd04d31726c2b9b5e8ac and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 2e07c4b

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

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 2e07c4b3963d119149f9dd04d31726c2b9b5e8ac — this comment is updated in place on each push.

Review details

No findings.

Notes:

  • The comment calls the chunk "already lazy", but src/App.tsx:23 imports ChatPage statically, so the chunk is probably on the first-load path. That makes the comment inaccurate, but nothing goes wrong at runtime because of it.

[OPUS-REVIEWED] 2e07c4b

Verdict parsed from the review's SHA-scoped output markers for commit 2e07c4b3963d119149f9dd04d31726c2b9b5e8ac.

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

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve @ 2e07c4b. Fixes red main (#23866): main @ 0dab198 builds ModelEffortDropdown at 517,094 B against the 500 KB default. The new 531 KB entry follows the table's ~5% headroom convention and also covers #23697's 506.7 KB measurement. Bundle Size Gate and every review lane are green on this head.

@buluoray
buluoray enabled auto-merge (squash) October 25, 2026 00:34
@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 Oct 25, 2026
@buluoray
buluoray merged commit 3503760 into main Oct 25, 2026
106 checks passed
@buluoray
buluoray deleted the fix/bundle-gate-model-effort-dropdown branch October 25, 2026 01:09
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 25, 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.

ci: Bundle Size Gate fails on pristine main (ModelEffortDropdown chunk 505 KB over its 500 KB default)

2 participants