GoogleChrome / GoogleChrome/lighthouse
PSI Lighthouse 13.0.1: cumulative-layout-shift displayValue does not match newEngineResult (drops Performance score)
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Description
## Issue summary
PSI (PageSpeed Insights) Lighthouse **13.0.1** returns conflicting values for `cumulative-layout-shift` audit:
- `displayValue` and `numericValue` show a non-zero value (e.g. `0.993`)
- `details.items[0].newEngineResult.cumulativeLayoutShift` shows `0` (the actual correct value)
- `newEngineResultDiffered: false` (engine confirms results match)
This drops the Performance score by ~20 points despite the page actually having no layout shift.
## Steps to reproduce
1. Pick any production page that local Lighthouse 13.3 reports CLS = 0 for
2. Run PSI mobile audit on the same page (via API or UI)
3. Inspect the JSON: `lighthouseResult.audits["cumulative-layout-shift"]`
## Current behavior (PSI Lighthouse 13.0.1)
```json
{
"id": "cumulative-layout-shift",
"displayValue": "0.993",
"numericValue": 0.993,
"score": 0.16,
"details": {
"type": "debugdata",
"items": [{
"cumulativeLayoutShiftMainFrame": 0,
"newEngineResultDiffered": false,
"newEngineResult": {
"cumulativeLayoutShift": 0,
"cumulativeLayoutShiftMainFrame": 0
}
}]
}
}
```
The new engine reports CLS = 0 (correct, page has no shift), but `displayValue`/`numericValue` show 0.993 and the score reflects that incorrect value.
## Expected behavior
When `newEngineResultDiffered: false`, the top-level `displayValue` and `numericValue` should agree with `newEngineResult.cumulativeLayoutShift`. Or: the score calculation should use the new engine result.
## Comparison: local Lighthouse vs PSI for the same URL
Local Lighthouse 13.3.0 (`--form-factor=mobile --throttling-method=simulate`):
```
CLS displayValue: 0
CLS numericValue: 0
CLS score: 1.0
Performance: 94
```
PSI Google (Lighthouse 13.0.1, US datacenter):
```
CLS displayValue: 0.993
CLS numericValue: 0.993
CLS audit details newEngineResult.cumulativeLayoutShift: 0
Performance: 73
```
Both runs target the same public URL with no changes between them.
## Impact
Pages with CLS that is actually 0 are penalized by ~20 Performance points in PSI mobile due to `displayValue` not reflecting `newEngineResult`. Real users (CrUX) report no CLS, but PSI lab data tells a different story. This causes:
- False alarms in monitoring/dashboards
- Misleading SEO reports
- Manual workarounds in tooling (read CLS from `details.items[0].newEngineResult.cumulativeLayoutShift` instead of the documented audit fields)
## Suggested fix
Either:
1. Sync `displayValue`/`numericValue` with `newEngineResult.cumulativeLayoutShift` when `newEngineResultDiffered: false`, OR
2. Update PSI's deployed Lighthouse to **13.3.0+** (which already returns the correct values, verified by local runs)
## Environment
- **Affected**: PSI Web/API running Lighthouse **13.0.1**
- **Not affected**: Local Lighthouse CLI **13.3.0** (same audit returns CLS = 0, score = 1.0 for the same page)
Contributor guide
Assessment
This issue has not been assessed yet.