Skip to content

chore(ci): make bundle budget resilient to runtime chunk changes - #51

Draft
ClodoCapeo wants to merge 1 commit into
mainfrom
forge/solar-5-bundle-budget
Draft

chore(ci): make bundle budget resilient to runtime chunk changes#51
ClodoCapeo wants to merge 1 commit into
mainfrom
forge/solar-5-bundle-budget

Conversation

@ClodoCapeo

Copy link
Copy Markdown
Contributor

Problem

Solar's bundle-size gate required runtime-owned chunk prefixes (index, tree, broadcast, control, test, status-pill). A runtime minor rename or merge could fail CI even when the emitted ESM graph and budgets were valid.

Change

  • derive the library bundles from the emitted ESM import graph rooted at dist/solar.js;
  • identify mode entries from the stable BroadcastMode / ControlMode / TestMode loader exports, not emitted filenames;
  • count each reachable emitted file once per mode, including merged runtime chunks;
  • retain per-mode gzip budgets and the host budget;
  • retain a graph-based broadcast -> distinct overlay-entry guard;
  • add a Node regression test with renamed chunks and a control/test merged chunk;
  • run the regression test as part of npm test.

Evidence

  • npm run lint — passed
  • npm run typecheck — passed
  • npm test — 112 Vitest tests + 2 bundle-graph tests passed
  • npm run build — passed
  • npm run check:bundle — passed
    • broadcast: 41,254 B gz
    • control: 43,247 B gz
    • test: 44,813 B gz
    • host: 143,201 B gz
  • signed commit: dfe282cbad92508af872bba679d34d2ecfa48a4f

npm run test:e2e was attempted but could not launch because this workstation lacks the Playwright Chromium and Headless Shell executables; the CDN install did not complete. No application assertion ran or failed.

Refs #5

Replace runtime-owned chunk-name assumptions with a graph walk rooted at Solar's emitted ESM entry. Preserve per-mode and host budgets, count merged chunks once, and retain a semantic broadcast overlay guard. Add a regression fixture for renamed and merged runtime chunks.

Refs #5

Agent-Role: Eleven
Agent-Thread: codex-solar-advance-2026-08-15
Work-Unit: SOLAR-5-BUNDLE-GRAPH
Issue: #5
Evidence: npm run lint; npm run typecheck; npm test; npm run build; npm run check:bundle
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.

1 participant