Skip to content

Restore deterministic Lighthouse cache hits - #31

Merged
CS-5 merged 3 commits into
stagingfrom
fix/lighthouse-ci-efficiency
Oct 25, 2026
Merged

CS-5 merged 3 commits into
stagingfrom
fix/lighthouse-ci-efficiency

Conversation

@CS-5

@CS-5 CS-5 commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Random SVG mask IDs made six HTML pages change on every build, preventing Lighthouse's identical-build cache from matching. Use page-scoped counters for stable IDs, and include Chrome's version, runner OS/architecture, and the workflow in the cache key. Explicitly pass the identified Chrome binary to Lighthouse.

same source → same SVG IDs → identical build bytes
matching successful build + audit environment → skip Lighthouse
otherwise → standard lhci autorun, one sample per page

The only new TypeScript file is a 10-line SVG ID helper. The workflow uses ubuntu-latest, the standard Lighthouse CLI, and the existing budgets and sampling policy.

Evidence

  • Before: six HTML files differed across unchanged builds solely because of random oval IDs. After: two complete production/fixture builds produced 469 identical files; all 30 mask IDs were unique within their pages with valid references.
  • pnpm check, build, event fixtures, and page metadata pass. A four-page local Lighthouse run passed the existing budgets with performance scores of 99/99/100/100.
  • This fixes a demonstrated cache miss. It does not establish or claim to fix the cause of the earlier CI blocking-time failure.

Merge Danger

Door: two-way

Blast Radius: caching

Changes generated SVG IDs and Lighthouse cache eligibility. The new key requires one successful audit before it can be reused.

@CS-5 CS-5 added the lighthouse Run Lighthouse audits on pull requests label Oct 25, 2026
@CS-5 CS-5 changed the title Restore Lighthouse cache hits and confirm timing failures selectively Restore deterministic Lighthouse cache hits Oct 25, 2026
@CS-5
CS-5 merged commit 4927cc3 into staging Oct 25, 2026
3 of 4 checks passed
@CS-5
CS-5 deleted the fix/lighthouse-ci-efficiency branch October 25, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lighthouse Run Lighthouse audits on pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant