Repository navigation
ci: a raised package size budget keeps its 5% headroom, so queued changes do not trip it - #8842
Open
miguel-heygen wants to merge 1 commit into
Open
miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
…nges do not trip it
Contributor
Edit accuracy: accurate 273 (base branch 271), smooth 59 of thoseThe gate passes. Newly passing (2)
Not banked yet, reported and not gated (bank a full-grid run's baseline.json) (2)
Quarantined, measured but not gated (0) Unstable (1)
|
vanceingalls
approved these changes
Nov 25, 2026
vanceingalls
left a comment
Collaborator
There was a problem hiding this comment.
Approving at aca4ae5.
- Rule: a budget raised against the base file must be >= ceil(measured x 1.05) (the same
suggest()the other two messages use). A package missing from the base counts as raised from 0.baseBudgetundefined (merge queue, push, local) skips the check, and an unchanged budget is never judged. This matches the stated rule. - Base file:
base-file.shreads the first parent of the merge commit, so it is the base this run measured, not a moving tip. A failed fetch fails the step. It runs onpull_requestonly, so the queue never compares a group's raise against everything queued ahead. - Message: the over-budget error now names the value to raise to.
- Red-first: the three named tests fail on main's script and cover the message, the inspector 933,584 to 945,000 case (names 990,201), and the two-queued-changes case.
- CI: all required checks are green at this head.
Studio: timeline viewport gatefailed (interaction p95 66.7 vs 58.3 ms). It is not a required check, and the PR touches no studio code, so I read it as runner noise.
miguel-heygen
enabled auto-merge
November 25, 2026 13:06
miguel-heygen
disabled auto-merge
November 25, 2026 13:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A pull request that raises a package's size budget now has to raise it to the measured size plus 5%, the headroom the size check is built around. A raise to the bare measured size fails, and the message names the value to use. The "over its budget" message names that value too.
Why
scripts/verify-packed-manifests.mjssets a budget 5% above the measured size and fails a package only when it is more than 1% over, so a change normally has about 6% of room. But raises were going in at roughly the measured size.@hyperframes/inspectorwent from 933,584 to 945,000 when it measured 943,048, leaving 0.2%. The engine went from 511,040 to 511,900, also 0.2%. With no headroom left, the next queued change that grows the same package crosses the 1% line inside the merge group, where its own pull request run never measured it. This morning that failed eight merge groups in about 30 minutes, at 128 bytes over.The over-budget message never said what to raise to, while the no-budget and well-under-budget messages already print measured x1.05.
Related work
None.
How
listPackageSizeIssues(name, sizes, budget, baseBudget): whenbaseBudgetis given and the budget went up from it, the new budget must be at leastsuggest(size)(measured x1.05, the same helper the other two messages use). A package with no base budget counts as raised from 0.baseBudgetundefined (the merge queue, a push, a local run) skips the raise check; sizes are still checked against the 1% line.verifyPackageSizesreads the base's budgets fromSIZE_BUDGETS_BASE_FILEwhen it is set and the file exists.ci.ymlBuild: onpull_requestonly,scripts/ci/base-file.shwrites the budgets file as it was on the base this run measured, and the verify step gets its path. The merge queue doesn't judge raises, because a group's base already holds the changes queued ahead of it. A raise sized for one change would be compared there against the size of all of them.Test plan
New in
scripts/verify-packed-manifests.test.mjs:fails without the fix:
scripts/verify-packed-manifests.test.mjs"names the budget to raise to when a package is over", "refuses a budget a change raised without its 5% headroom" and "lets two queued changes that each grow a package about 1% both pass once the first raise keeps headroom" fail with main'sverify-packed-manifests.mjs(3 of 10 size tests). With the change, all 10 pass, 3 runs in a row.Also run:
merge-queue-workflows,ci-cache-workflows,ci/base-fileandcomments-workflowtests pass.oxlint,oxfmt --check(includingci.yml) and the comment ratchet are clean.Not changed: today's budgets that already sit without headroom. Each one gets its headroom back the next time a change raises it.