Public: anyone can read this; the crew can change it.

The looks run records performance entries in the browser it already drives and hands them to the summary #3058

Closed opened this
Closed without merging

The look now records performance entries in the browser it already drives and hands them to the check summary. I made no code change this round: the failure that parked the last attempt looks like a timing flake. The branch is merged with current main and pushed.

Notes

stopped closed without shipping deploy 6aa2d45

opened this

The look now records performance entries in the browser it already drives and hands them to the check summary. I made no code change this round: the failure that parked the last attempt looks like a timing flake. The branch is merged with current main and pushed.

  • Capture (src/looks/capture.ts): a PerformanceObserver is installed before navigation. After load it reads lcp, layout-shift and longtask entries and returns them with the look. An entry type the browser lacks comes back as an empty list.
  • Summary (src/looks/service.ts, src/checks/looks.ts): the entries feed the per-look web-vitals table. Where no browser is found, the summary says skipped: no browser and the check stays green. Vitals are filed under the commit, so a check made after the look still shows them.
  • Constraints: no Lighthouse, no new dependency, no new Bun.spawn. test/spawn-pipes.test.ts is untouched.
  • Tests: test/looks.test.ts has a fake capture proving entries flow from the look to the summary.
  • The earlier failure, /map on the forge-sized fixture, warm: nothing in this branch touches /map. test/map-cache.test.ts passed three runs in a row on the merged branch, with a stranger p95 of about 40 ms. I read the failure as machine load.
  • Tests run here: test/map-cache.test.ts, test/looks.test.ts, test/tui-size.test.ts, test/spawn-pipes.test.ts and test/front.test.ts.
    • Results: test/tui-size.test.ts passes. The only failure is "a real capture through the grant door, with /usr/bin/chromium". It fails the same way on plain origin/main here, because the sandbox cannot run the real browser. The forge's check runs it with a browser.
  • Not run: bun x tsc --noEmit could not run in the sandbox (bun cannot write to its temp directory), so the type check is left to the forge's check.

I did not touch test/map-cache.test.ts or loosen its budgets. If the forge's check fails it again, that points to a real /map regression on main rather than this change.

Closes #3010

2 earlier comments
commented

The look now records performance entries in the browser it already drives and hands them to the check summary. I made no code change this round: the failure that parked the last attempt looks like a timing flake. The branch is merged with current main and pushed.

  • Capture (src/looks/capture.ts): a PerformanceObserver is installed before navigation. After load it reads lcp, layout-shift and longtask entries and returns them with the look. An entry type the browser lacks comes back as an empty list.
  • Summary (src/looks/service.ts, src/checks/looks.ts): the entries feed the per-look web-vitals table. Where no browser is found, the summary says skipped: no browser and the check stays green. Vitals are filed under the commit, so a check made after the look still shows them.
  • Constraints: no Lighthouse, no new dependency, no new Bun.spawn. test/spawn-pipes.test.ts is untouched.
  • Tests: test/looks.test.ts has a fake capture proving entries flow from the look to the summary.
  • The earlier failure, /map on the forge-sized fixture, warm: nothing in this branch touches /map. test/map-cache.test.ts passed three runs in a row on the merged branch, with a stranger p95 of about 40 ms. I read the failure as machine load.
  • Tests run here: test/map-cache.test.ts, test/looks.test.ts, test/tui-size.test.ts, test/spawn-pipes.test.ts and test/front.test.ts.
    • Results: test/tui-size.test.ts passes. The only failure is "a real capture through the grant door, with /usr/bin/chromium". It fails the same way on plain origin/main here, because the sandbox cannot run the real browser. The forge's check runs it with a browser.
  • Not run: bun x tsc --noEmit could not run in the sandbox (bun cannot write to its temp directory), so the type check is left to the forge's check.

I did not touch test/map-cache.test.ts or loosen its budgets. If the forge's check fails it again, that points to a real /map regression on main rather than this change.

commented

Nothing to change: the branch is clean, level with origin/scout/3010-the-looks-run-records-performance-entrie and not behind main. The forge has already re-checked the pull. I ran no tests this round.

The /map on the forge-sized fixture, warm failure was a shared timing flake under check load, as @trevato said. I left test/map-cache.test.ts and its budgets alone.

  • Capture: src/looks/capture.ts installs a PerformanceObserver before navigation in the browser the look already drives. It reads lcp, layout-shift and longtask entries after load and returns them with the look. An entry type the browser lacks comes back as an empty list.
  • Summary: the entries reach the check summary's per-look web-vitals table, filed under the commit. With no browser, the summary says skipped: no browser and the check stays green.
  • Constraints: no Lighthouse, no new dependency, no new Bun.spawn. test/spawn-pipes.test.ts is untouched.
  • Test: test/looks.test.ts has a fake capture proving entries flow from the look to the summary.
  • Last run: test/tui-size.test.ts passes. In test/looks.test.ts, the real-Chromium capture test cannot run in the sandbox and fails the same way on plain main. The forge's check runs it with a browser.
  • Not done: I did not touch the /map budget, and I did not run the type check here because bun cannot write its temp directory in the sandbox.

To try it, run bun test test/looks.test.ts. Or push a pull and read the web-vitals table in the check summary.

commented

Closed by the crew: superseded, its change is already on main in 1bbce1df.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs