Skip to content

Studio: re-measure the startup bundle budget, which main is red on by itself - #11013

Merged
danielhanchen merged 8 commits into
mainfrom
studio-bundle-budget-remeasure
Sep 16, 2026
Merged

danielhanchen merged 8 commits into
mainfrom
studio-bundle-budget-remeasure

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

main fails Frontend build + bundle sanity with nothing on a branch to blame. The startup budget's raw half ran out, and the +10,000 byte raise it took in the meantime did not survive one merge.

The measurement

One machine, one build per side, so the numbers are comparable to each other rather than to a runner's.

raw transfer eager chunks
main at f7ab2098f 5,381.0 KB 1,609.0 KB 84
ceiling on main today 5,380.9 KB 1,650.4 KB
ceiling after this PR 5,595.7 KB 1,674.8 KB

Running the checker over that build with main's own ceilings:

over the startup budget: raw 5381.0 KB > 5380.9 KB

So main is red right now, by a tenth of a kilobyte. #10974 raised rawBytes from 5,500,000 to 5,510,000 against its own 5,502,720 measurement, which is 7.1 KB of room, about one locale string, and it was gone before the next merge. 0d9952f8e did the same thing five days earlier. Every completed Frontend CI run on main today has failed.

What moves

The note beside the last raise asked for both halves to come up for one re-measure together, instead of each dragging main red on its own. So both move to the headroom that raise chose:

  • rawBytes to 5,730,000, leaving 214.7 KB spare (3.8 percent)
  • transferBytes to 1,715,000, leaving 65.8 KB spare (3.9 percent)

Nothing became eager

The check exists to catch a new static import dragging something into the first screen, and that is not what happened here. The eager set is still 84 chunks with the same top five (chat, index, chunk-BO2N2NFS, providers-api, katex); the raw total grew inside chunks that were already eager, the locale messages most of all. That is drift, so there is nothing here to lazy-load.

After the change npm run bundle:check reports within budget (65.8 KB transfer, 214.7 KB raw to spare).

…n by itself

The startup budget's raw half ran out and main fails "Frontend build + bundle
sanity" on its own, with nothing on a branch to blame. At 5fbbd61 main
measures 5,377.2 KB raw against a 5,371.1 KB ceiling, 6.1 KB past it.

The note beside the last raise asked for both halves to be re-measured together
rather than each dragging main red on its own, so both move to the same 4.1%
headroom the previous raise chose: 5,730,000 raw leaves 218.5 KB spare and
1,715,000 transfer leaves 66.9 KB.

Nothing became eager that should be lazy. The eager chunk set is still 84 chunks
with the same members and the same top five; the raw total grew inside chunks
that were already eager, which is drift rather than a new static import. Both
numbers come from one machine, one build per side, so they are comparable to
each other rather than to a runner's.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T00:16:41.064753Z fbe1da9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 8215bd3183

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen and others added 3 commits September 15, 2026 22:32
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 15, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 93d9c5499c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 15, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 2f4e7d5dcb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: fbe1da9121

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit a58537e into main Sep 16, 2026
34 of 37 checks passed
@danielhanchen
danielhanchen deleted the studio-bundle-budget-remeasure branch September 16, 2026 01:43
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 23, 2026
… next one, and re-measure the startup budget (unslothai#11676)

prompt-storage-dialog and refresh-context-usage were loaded with import() at five
sites while the startup set already imports both statically, so nothing was
deferred. Rolldown reported both as INEFFECTIVE_DYNAMIC_IMPORT and a build
warning is all it ever was. Importing them statically drops 2.2 KB raw from
the eager set, and the build now throws on that log instead of printing it.

That is not enough on its own: main measures 5,601.9 KB raw against the
5,595.7 KB ceiling. The eager set gained one 303-byte chunk since the last
raise and otherwise grew inside chunks already eager, mostly unslothai#11607 and
unslothai#11648, so the budget is re-measured with the margin unslothai#11013 chose.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
… itself (unslothai#11013)

`main` fails **Frontend build + bundle sanity** with nothing on a branch to blame, and has been bought back twice in one day: unslothai#10974 added 10,000 bytes and did not survive a single merge, and the next raise added 10,000 more. Each leaves a few kilobytes, which is one locale string, and the next PR to cross it pays for drift it did not cause.

Both halves move together to the headroom the earlier raise chose, which is what the note beside it asked for:

- `rawBytes` to 5,730,000
- `transferBytes` to 1,715,000

Verified on a real runner rather than only locally. The staging run of this branch reports:

```
eager startup JS: 5394.1 KB raw, 1612.3 KB transfer, 84 chunks
within budget (62.5 KB transfer, 201.6 KB raw to spare)
```

Nothing became eager. The eager set is still 84 chunks with the same top five (chat, index, chunk-BO2N2NFS, providers-api, katex); the raw total grew inside chunks that were already eager, the locale messages most of all. That is drift, so there is nothing here to lazy-load.

The per-raise ledger in the comment above the constants, which had grown a paragraph per raise, is reduced to the current measurement and the invariant.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
… next one, and re-measure the startup budget (unslothai#11676)

prompt-storage-dialog and refresh-context-usage were loaded with import() at five
sites while the startup set already imports both statically, so nothing was
deferred. Rolldown reported both as INEFFECTIVE_DYNAMIC_IMPORT and a build
warning is all it ever was. Importing them statically drops 2.2 KB raw from
the eager set, and the build now throws on that log instead of printing it.

That is not enough on its own: main measures 5,601.9 KB raw against the
5,595.7 KB ceiling. The eager set gained one 303-byte chunk since the last
raise and otherwise grew inside chunks already eager, mostly unslothai#11607 and
unslothai#11648, so the budget is re-measured with the margin unslothai#11013 chose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant