Skip to content

fix(ci): enforce Lighthouse performance budgets - #1081

Merged
OlaGreat merged 1 commit into
OlaGreat:mainfrom
precious-akpan:fix/1034-lighthouse-budget-enforcement
Aug 30, 2026
Merged

fix(ci): enforce Lighthouse performance budgets#1081
OlaGreat merged 1 commit into
OlaGreat:mainfrom
precious-akpan:fix/1034-lighthouse-budget-enforcement

Conversation

@precious-akpan

Copy link
Copy Markdown
Contributor

Summary

  • lighthouserc.js used assert.budgets: "budget.json", which is not a real LHCI config key — LHCI never enforced the budgets.
  • Even with a valid key, the Lighthouse job runs with working-directory: frontend and invokes --config=../lighthouserc.js, so a relative "budget.json" path would resolve to frontend/budget.json, which never existed — only the repo-root budget.json did.
  • Folded budget.json's resourceSizes/resourceCounts limits directly into assert.assertions as resource-summary:*:size/resource-summary:*:count assertions (the real LHCI mechanism for this), converting KB budgets to the bytes resource-summary:*:size audits expect. Deleted the now-redundant budget.json and its stale path-filter entries in the workflow.

Closes #1034

Test plan

  • node -e "require('./lighthouserc.js')" — config parses and the new assertions serialize with the expected byte-converted thresholds.
  • Verified no remaining references to budget.json anywhere in the repo (docs, workflows, code).
  • CI: Lighthouse CI job on this PR will exercise the new budget assertions against a real build/run.

lighthouserc.js used the invalid `assert.budgets: "budget.json"` key —
LHCI has no such key, so the budgets were silently never checked. Even if
it were valid, the Lighthouse job runs with `working-directory: frontend`
and invokes `--config=../lighthouserc.js`, so the relative "budget.json"
path would have resolved to frontend/budget.json, which never existed.

Fold budget.json's resourceSizes/resourceCounts limits directly into the
assert.assertions block as resource-summary:*:size/count assertions, the
real LHCI mechanism for this, and delete the now-redundant budget.json.
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@precious-akpan Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@OlaGreat
OlaGreat merged commit 07b4cdb into OlaGreat:main Aug 30, 2026
2 checks passed
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.

[CI] budget.json performance budgets are still never enforced — no commit ever addressed this

2 participants