`formFactor: 'desktop'` changes which thresholds a metric is scored against and
NOTHING else. Throttling and the user agent keep their defaults, which are mobile
— so every desktop run was a desktop-sized window on a 4x-slowed CPU over slow 4G,
announced as a moto-g.
It read 86 where the same page reads 100. That gap was reported repeatedly as
network latency to the host. It was not latency; it was this. Measured after the
fix: desktop 100, LCP 0.4s against 2.2s.
Nine more from the same review:
runtimeError was never checked, so a page that failed to load reported
"nothing failing" — the most reassuring possible output for a site that is down
--json exited 0 before the gate, so the documented non-zero exit was true for a
person reading the table and false for the only caller that could act on it
scoreDisplayMode 'error' was filtered out while still nulling its category, so
a category could read 0 with an empty findings list
a missing metric serialised as 0, which a script reads as a perfect measurement
`source` is a string on some audits and an object on others; String() on the
object printed [object Object]
the watchdog's surrender was permanent — the health branch sat below the check,
so once it stopped trying it also stopped noticing, and a server fixed by hand
left it asleep until the platform restarted
a failed restart leaves no process at all, because startServer deletes before
it starts. status null then reads as "somebody stopped it", which the watchdog
leaves alone — one bad restart would have turned it off and taken the server
with it, silently
the skill claimed the panel uses this engine. Nothing but the CLI does
and gave `bun run build:site` with no cwd, which only works from the website
checkout — api/static-site.ts documents that and the skill did not
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every performance decision here was made from a Lighthouse run somebody did by
hand in DevTools and typed into a conversation. That loop is slow and it is
lossy: nothing measured after a build, so three real defects sat live for weeks
— a `sizes` that overstated a column by 48px, font preloads that had gone
missing, an LCP image left lazy by a rename.
api/lighthouse.ts runs it: both form factors in about 20 seconds, four
categories, the five metrics, and every failing audit with the resources it
names. A finding that says "Improve image delivery — 32 KiB" is not actionable;
the same finding with the URL and the size served is a one-line fix.
The browser is looked for in three places before anything is downloaded —
CHROME_PATH, chrome-launcher's own search, then the Chrome-family binaries by
name, which is what finds the Brave already on this machine. chrome-launcher
THROWS rather than returning null when it finds nothing, so an unguarded call
never reaches the fallback; that is caught. Only if all three miss does
@puppeteer/browsers fetch one, as a library call rather than a postinstall,
because bun does not run postinstall for an untrusted package and a silent no-op
there would surface as a failure at the first audit.
First result: Total Blocking Time is 0 ms on both form factors, down from 130.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>