Problem
The simulated-mobile Lighthouse performance check is now showing the homepage consistently around the current hard LCP threshold, and the pass/fail behavior is not obviously consistent with the summary line.
Recent CI examples:
The difference between these runs is only tens of milliseconds. PR #162 does not change homepage rendering, layout, images, or normal-path bundle behavior, so the Turbopack bootstrap patch is not a credible explanation for the regression.
The homepage also carries warning-level pressure:
- JS ~273 KB vs 260 KB warn budget
- total transfer ~774 KB vs 700 KB warn budget
- image transfer ~232 KB
Goal
Determine:
- exactly how
scripts/perf-baseline.mjs aggregates the 3 Lighthouse runs per route,
- why a displayed homepage LCP of 4676 ms could pass while 4693/4712 ms fail,
- whether the hard LCP budget is evaluating median, max, mean, a different run, or another derived value,
- whether the homepage is genuinely regressing or simply living too close to the threshold,
- whether the correct fix is test logic, performance optimization, budget calibration, or some combination.
Do not weaken the 4500 ms budget until the current behavior is understood.
Investigation
Inspect:
scripts/perf-baseline.mjs
- performance-budget configuration
- Lighthouse invocation/config
- all 3 per-route run values, not only the summary line
- aggregation method for score/LCP/TBT/bytes
- pass/fail calculation
- rounding behavior
- retry/rerun behavior
- whether output summary and enforcement use the same statistic
- whether one run can be discarded or treated differently
- whether cold/warm cache state differs between repetitions
- whether CI container/resource contention explains the spread
- whether recent master/PR runs show the same homepage LCP distribution
Use recent GitHub Actions artifacts/logs where useful.
Homepage performance analysis
Separately profile the homepage to identify its actual LCP element and major contributors.
At minimum determine:
- exact LCP element
- image dimensions/format/priority/loading behavior
- preload/fetch priority behavior
- whether hero image decoding/loading dominates
- JS execution contribution
- font contribution
- any render-blocking CSS/script behavior
- whether Sentry adds measurable startup cost
- whether the homepage-specific JS/total-byte warnings point to a real optimization opportunity
- whether recent changes shifted the baseline
Do not optimize unrelated pages in this issue unless the same root cause directly applies.
Important boundaries
Desired outcome
Produce an evidence-based recommendation for one of these paths:
A. Script/aggregation bug
Fix the performance-budget script so displayed metrics and enforcement use the same clearly documented statistic.
B. Real homepage performance issue
Implement a focused homepage optimization with measurable before/after results.
C. Threshold too close to normal variance
Only if supported by enough baseline data, propose a calibrated threshold or statistical method that still catches real regressions without turning normal CI variance into noise.
D. Combination
If both script logic and homepage performance need work, separate the fixes clearly and keep changes scoped.
Validation
If code changes are justified:
- create a focused branch and PR
- do not merge
- run the performance job repeatedly
- compare against current master
- report all 3 run values per route for the homepage
- run the normal repo validation
- ensure no unrelated regressions
For a flake/variance fix, a single green run is not enough. Demonstrate stability across repeated runs.
Acceptance criteria
- Current 4676-pass vs 4693/4712-fail behavior is explained precisely.
- Aggregation/enforcement logic is documented.
- Homepage LCP element and dominant costs are identified.
- Master-vs-branch comparison is made.
- No threshold weakening without evidence.
- Any code change has measurable before/after data.
- CI behavior becomes understandable and intentional.
Final report
Report:
- exact current aggregation method
- exact reason 4676 ms passed while later ~4.7 s runs failed
- per-run homepage LCP values from representative runs
- LCP element
- major contributors
- whether this is primarily test logic, real performance, variance, or a combination
- whether Sentry contributes materially
- recommended remediation
- code changes made, if any
- before/after Lighthouse results
- repeated-run stability results
- PR number/head SHA if created
- whether the 4500 ms budget changed, and why
- any follow-up issue warranted
Problem
The simulated-mobile Lighthouse performance check is now showing the homepage consistently around the current hard LCP threshold, and the pass/fail behavior is not obviously consistent with the summary line.
Recent CI examples:
The difference between these runs is only tens of milliseconds. PR #162 does not change homepage rendering, layout, images, or normal-path bundle behavior, so the Turbopack bootstrap patch is not a credible explanation for the regression.
The homepage also carries warning-level pressure:
Goal
Determine:
scripts/perf-baseline.mjsaggregates the 3 Lighthouse runs per route,Do not weaken the 4500 ms budget until the current behavior is understood.
Investigation
Inspect:
scripts/perf-baseline.mjsUse recent GitHub Actions artifacts/logs where useful.
Homepage performance analysis
Separately profile the homepage to identify its actual LCP element and major contributors.
At minimum determine:
Do not optimize unrelated pages in this issue unless the same root cause directly applies.
Important boundaries
Desired outcome
Produce an evidence-based recommendation for one of these paths:
A. Script/aggregation bug
Fix the performance-budget script so displayed metrics and enforcement use the same clearly documented statistic.
B. Real homepage performance issue
Implement a focused homepage optimization with measurable before/after results.
C. Threshold too close to normal variance
Only if supported by enough baseline data, propose a calibrated threshold or statistical method that still catches real regressions without turning normal CI variance into noise.
D. Combination
If both script logic and homepage performance need work, separate the fixes clearly and keep changes scoped.
Validation
If code changes are justified:
For a flake/variance fix, a single green run is not enough. Demonstrate stability across repeated runs.
Acceptance criteria
Final report
Report: