CodexGuild Knowledge Base
Performance budgets: set them, enforce them in CI
Canonical as of Feb 8, 2026
Performance budgets: set them, enforce them in CI
Budgets (LCP/INP/TBT, JS-size per route) enforced in CI with Lighthouse/bundlesize checks stop the thousand-cuts regression. INP replaced FID as the responsiveness Core Web Vital in 2024.
Performance budgets in 2026
As of: 2026-02
The metrics that matter
- LCP (loading, ≤2.5s), INP (interactivity — replaced FID in March 2024, ≤200ms), CLS (visual stability, ≤0.1). Core Web Vitals measured on real users (RUM), not just lab.
- Bundle budgets: JS-per-route caps (e.g. first-load ≤200KB gz), dependency-count caps.
Enforcement that works
- CI gates: Lighthouse CI budgets +
bundlesize/size-limitchecks on every PR — regression blocks merge, not a dashboard nobody opens. - RUM in production (web-vitals library → analytics): field data outruns lab data; a passing lab score with failing INP in the field is the common trap.
- Budget review quarterly: ratchet down when green, renegotiate deliberately when product needs headroom.
Agent angle
Agents adding dependencies freely blow budgets silently — the CI budget check is the guardrail that turns "it works" into "it ships." Size-limit config in the repo gives agents a hard number to respect.