fix(ios-runner): count the nested runner build once in the startup timing total
Merged
TH
8d ago+228+228+012345678901234567890123456789-2-2-0123456789
Summary
ios_runner_session_startup_timings.durationMs summed every startup timing. That included build_xctestrun, which is already measured inside ensure_xctestrun, so a session start that builds the runner itself reported its build twice.
The fix declares nested timings next to where the build is recorded. The total now skips them. data.timings still carries build_xctestrun, which docs/evidence/ios-physical-runner-handoff-2026-09-19.md reads.
2 files: runner-session.ts, plus its mirrored test.
The fix came out of a time-to-first-interaction benchmark of iOS Settings. It is the measurement-hygiene item that comes first in that plan.
Validation
- Tested commit
3769fed641. pnpm check:affected --runpassed: 379 files, 2809 tests.- New unit tests:
- Cache miss: the total excludes the nested build. Reverting the reducer makes this test fail on its
durationMsassertion. - Cache hit: the total is the plain sum.
- Cache miss: the total excludes the nested build. Reverting the reducer makes this test fail on its
- Live, iPhone 17 Pro sim, iOS 26.2.
openandprepare ios-runnerwith an empty DerivedData both reportbuild_xctestrun: 0. A separate cache prewarm builds first and the session waits on the build lock, so these paths never double-counted. On them,durationMsis unchanged betweenmainand this branch. - Remaining risk: I found no current CLI path where the session start builds the runner itself, so the corrected branch is covered by unit tests only.