Skip to content

ci: separate bundle size checks from runtime tests - #1889

Merged
domgan-oai merged 1 commit into
octanejs:mainfrom
openai-oss-forks:codex/separate-bundle-size-workflow
Oct 8, 2026
Merged

domgan-oai merged 1 commit into
octanejs:mainfrom
openai-oss-forks:codex/separate-bundle-size-workflow

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A bundle-size regression currently fails test shard 1 before its runtime tests execute, and makes the aggregate test (24) check fail even when runtime behavior is correct. Move the existing size and reachability gates to a dedicated reusable Bundle size workflow, invoked as its own CI job.

Why

Runtime correctness and production bundle growth need separate results. A size failure should retain its own failing check while the runtime suite runs to completion.

Changes

  • Move every public-import/application byte ceiling, budget ratchet, and hydration-free build check out of the runtime shard. Move the budget-only-raise policy out of lint into the same workflow. No budgets or build scenarios change.
  • Reuse the existing authenticated release/lightweight classification. The inexpensive budget-raise policy still runs when production builds inherit prior coverage.
  • Keep the bundle job outside test (24) dependencies, but require its success in CI provenance, preserving the publishing gate. Release merges must inherit complete parent provenance, and generated release PRs receive the separate bundle check alongside their existing metadata checks.
  • Extract the existing bundle workflow contracts into a focused dependency-free test file and test the actual provenance shell against failed, skipped, and cancelled bundle outcomes.

Validation

  • 12 focused tests: node --test scripts/bundle-size-workflow.test.mjs benchmarks/bundle-size/budget-raises.test.mjs.
  • Changed YAML parses; scoped formatting and git diff --check pass.
  • Independent read-only complexity review found no outstanding issues.
  • perf-review: not applicable; no runtime, compiler, binding, or budget changes.
  • Current-head CI at e29e8150b is green: CI and benchmark report. The new bundle size / bundle size checks job and all runtime/browser/parity/static/package lanes passed independently.
  • Local pnpm sync was attempted but stops at the unavailable typescript-native/package.json; broader bundle-gate unit tests also lack local esbuild. The pinned CI toolchain supplied the complete validation above; no generated tracked changes were left behind.

Risk / follow-ups

When adopting this split, make bundle size / bundle size checks required alongside lint, typecheck, and test (24). This PR's CI verified that exact emitted check name. Repository protection settings are not changed by this PR. The existing comparative PR benchmark report remains intact.

Provenance

  • An agent produced this diff (agent-authored)

Codex task · host com-79386


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
CI workflow and documentation only; bundle gates and publishing requirements are preserved via provenance, with no runtime or compiler changes.

Overview
Moves production bundle size enforcement out of the runtime test shards into a dedicated reusable workflow so byte regressions fail their own check without blocking Vitest.

A new bundle_size job calls .github/workflows/bundle-size.yml, which runs the existing budget ratchets, hydration-free reachability builds, and the “budget raises land alone” policy (previously on test shard 1/4 and in lint). Runtime shards no longer use special fetch-depth or bundle steps.

CI provenance, lightweight-change inheritance, and Changesets release-merge authentication now treat bundle size / bundle size checks as required coverage alongside test (24). Generated release PRs get a synthetic passing bundle check with lint and typecheck. CONTRIBUTING.md documents the separate check for branch protection.

Workflow contracts move into scripts/bundle-size-workflow.test.mjs (wired into ci:workflow:test); overlapping assertions are removed from scripts/ci-workflow.test.mjs.

Reviewed by Cursor Bugbot for commit e29e815. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline labels Oct 8, 2026
@trueadm
trueadm marked this pull request as ready for review October 8, 2026 12:26
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No budget breaches, no added work, and no timing changes beyond ±3%.

Compares 8444db8ae, the merge commit's first parent with 98fe41e24 on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.858 2.925 ±0.0% −3.8% … +8.0% ⚪ within noise
octane-tsrx replace 6.758 6.133 +1.9% −8.0% … +7.0% ⚪ within noise
octane-tsrx add 2.467 2.425 −0.0% −7.5% … +4.1% ⚪ within noise
octane-tsrx update 0.126 0.124 +1.5% −1.5% … +4.4% ⚪ within noise
octane-tsrx select 0.005 0.006 ±0.0% −2.0% … +1.3% ⚪ within noise
octane-tsrx swap 0.031 0.030 −0.7% −3.3% … +1.3% ⚪ within noise
octane-tsrx remove 0.016 0.015 −1.2% −6.4% … +1.4% ⚪ within noise
octane-tsrx runlots 26.450 27.117 +1.2% −4.9% … +8.8% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 −0.3% −2.7% … +1.9% ⚪ within noise
octane-tsrx clear 45.542 45.558 +1.2% −1.1% … +4.2% ⚪ within noise
octane-jsx run 3.325 3.300 −0.0% −2.9% … ±0.0% ⚪ within noise
octane-jsx replace 6.383 6.208 −1.6% −7.4% … +3.4% ⚪ within noise
octane-jsx add 3.058 3.042 −2.6% −3.2% … ±0.0% ⚪ within noise
octane-jsx update 0.249 0.254 +1.5% ±0.0% … +4.4% ⚪ within noise
octane-jsx select 0.123 0.124 +0.0% −0.3% … +1.0% ⚪ within noise
octane-jsx swap 0.211 0.213 +1.3% +0.9% … +1.9% ⚪ within noise
octane-jsx remove 0.176 0.181 +0.5% −1.7% … +1.7% ⚪ within noise
octane-jsx runlots 28.167 27.333 −1.1% −3.8% … +0.8% ⚪ within noise
octane-jsx select_lots 1.495 1.452 −1.7% −2.6% … −0.6% ⚪ within noise
octane-jsx clear 45.492 44.042 −1.1% −3.3% … −0.2% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 60 measured values.

Public-import reachability bundles (bytes)

No changes across 111 measured values.

@domgan-oai
domgan-oai merged commit c8f464f into octanejs:main Oct 8, 2026
54 checks passed
trueadm added a commit that referenced this pull request Oct 8, 2026
The bundle-size gates now run in their own job (#1889), so the runtime shards
no longer need the raised budgets to run. The raise lands through #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
Main c0192ec (#1889, #1872, #1883, #1878 landing together) failed the new
"bundle size checks" job: binding-base-ui-vite measures 62,351 gzip, so the
downward ratchet requires its budget to drop from 62,384 to 62,383.
run-minimal.mjs and run.mjs --write-budgets on that head change nothing else.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
…tion (#1864) (#1888)

* fix(octane): commit the pending cue apart from its component's transition (#1864)

When the component that raises isPending also held the transition's own
update, both rendered together in the click's microtask flush: the cue showed
the new state, and the browser could not paint "pending" until the whole
transition render had finished. That is the canonical useTransition pattern
(the docs' ProjectTabs example, the playground's Sort button). React renders
isPending in an urgent lane with the previous state and the transition's
update later, in a Scheduler task.

A pending cue now never renders transition work that waits for the task. When
a transition update flushes for a block already queued for its cue
(flushTransitionActionBatch), or a cue arrives for a block whose transition is
waiting (upgradeTransitionBlock), the block is queued in both places. The
microtask drain renders only the cue (splitTransitionCue), at urgent priority
over the block's committed cells, through the exposure an urgent ancestor
already uses for a child with a queued transition, then leaves the block
pending for the transition task. Suspense holds after the cue, useOptimistic,
urgent updates during the wait (which still render the transition with them),
flushSync, act(), unmount and controlled inputs keep their behavior. A split
cue renders outside a View Transition and leaves addTransitionType types to the
transition's render.

beginUrgentTransitionRender no longer reverts a hook cell whose queue a render
already consumed, which could flash a committed transition value back, and no
longer allocates a slot index or predicate closure per call. An urgent ancestor
that already rendered a split cue spares the block's own queue entry a second
render.

Chromium Event Timing on the Sort pattern (memoized 40 ms list, 5 clicks):
main 5/5 slow clicks (40-80 ms); now 1/5 (first, cold), matching React 19.2.7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: temporarily carry #1887's budgets so the test shards run

Shard 1/4 fails its byte budgets until #1887 merges, and fail-fast then cancels
shards 2-4. This commit only lets those shards report; it is reverted before
merge, and the raise lands through #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(octane): keep committed plain cells out of a later split cue

FLUSHED_TRANSITION_UPDATES is retained while any block waits for the
transition task, so a block's already-rendered updates can still be listed
when a later pending cue splits on that block. Hook cells were guarded by
their consumed renderTransition, but plain cells (useDeferredValue's swap,
useLinkedState) were reverted to their pre-transition base: the cue flashed
the deferred value from before the swap.

When a block that is not queued is scheduled at transition priority, a render
has consumed every update retained for it, so queueTransitionBlock marks them
rendered and the cue's committed-cell exposure skips them. A hold that takes
the entries clears the mark, so hold and promotion behave as before.

Reported by Cursor Bugbot on #1888.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: update the temporary #1887 budget carry for the plain-cell fix

Reverted with fdb2de9 before merge; the raise lands through #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(octane): a same-component Action cue now commits before its transition's capture

#1872 pinned the old same-root order, where the Action cue and the explicit
transition state in one component rendered together in the microtask flush and
shared its native capture. The cue now renders apart from that state, as in the
separate-root case: it commits without a capture, and the state is captured when
its task renders it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: drop the temporary #1887 budget carry

The bundle-size gates now run in their own job (#1889), so the runtime shards
no longer need the raised budgets to run. The raise lands through #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant