fix(record): bound a cold video-validator compile by the stop's finalize budget
Summary
Since #4065 moved recording into smoke:capture-close, the iOS smoke lane failed 3 times at record stop with xcrun timed out after 30000ms. It is swiftc doing a cold compile of the AVFoundation video validator, under a fixed 30 s bound.
record stop already has a 70 s finalization budget meant to cover this compile (#3697). The finalizer now hands it to the playability checks. Callers share one compile, each waits within its own budget, and the last to leave cancels it with SIGINT, so swift-driver also stops its frontend jobs (SIGKILL left them running). A spent budget, or a validator run that times out, reads as not playable. The overlay decides on the verdict the wait returns. 9 files.
No-deadline callers keep the fixed 30 s compile wait: Android pullPlayable (platform-runtime-screen-recording-android-host.ts) and the live-device assertions (test/integration/live-device-e2e/assertions.ts) call isPlayableVideo without a deadline.
Validation
pnpm check:affected --run --head a1af133177(rebased on main): passed,exactCommit=true. Earlier unrelated flakes (stale-ref-warning, Revyl strayGET /, fixed on main by #4158) passed on rerun.- New tests fail on reverted source.
- Live, iPhone 17e simulator, cold isolated Swift cache, CPU oversubscribed (see PR comment):
- At
cdf951620a,record stoppassed with a 66.5 s compile (stop 73.2 s). - A forced 5 s abandon returned
video_validator_compile_timeout. No swiftc/swift-frontend,.lockor temp dir was left, and the next stop compiled and passed.
- At
- Self-review: cold reread only.
š¤ Generated with Claude Code