Summary
We have no performance regression detection in CI. Bundle size can bloat, Lighthouse scores can drop, and API latency can regress without anyone noticing until production.
Proposed Change
Add two layers of performance CI:
Layer 1 — Bundle size gate (PR-blocking):
- Add @size-limit to the main app
- Set a bundle budget (e.g., 1024 KB for JS chunks)
- Use andresz1/size-limit-action to comment on PRs with size diffs
- Fails the PR if budget exceeded
- Zero flakiness by design (pure static analysis)
Layer 2 — Lighthouse CI (nightly, not PR-blocking):
- Run lhci autorun on the production build
- Assert performance >= 0.9, accessibility >= 0.9
- Upload to temporary-public-storage for trend tracking
- Run nightly or on merge to main (too noisy for per-PR)
Acceptance Criteria
Summary
We have no performance regression detection in CI. Bundle size can bloat, Lighthouse scores can drop, and API latency can regress without anyone noticing until production.
Proposed Change
Add two layers of performance CI:
Layer 1 — Bundle size gate (PR-blocking):
Layer 2 — Lighthouse CI (nightly, not PR-blocking):
Acceptance Criteria