perf(remote): hash staged iOS runner app files once per lease
Summary
Each remote iOS runner launch rewrote Runner.xctestrun, then walked the staged tree and hashed every file again, although the app files never change there.
Staging now returns the app-file manifest with the staged-products handle. Each upload reuses it and describes only the current configuration. Outgoing manifests stay complete, the full-payload recovery still streams every file, and disposal drops the manifest with the staged tree.
The regular-file check moves from the first upload to staging, so a runner containing a symbolic link fails before any request. Hashing moves with it, under its own 300 s deadline (operation_deadline_expired); caller and lease cancellation still stop it.
Validation
At 60caeed2d5, which adds that deadline, limrun-ios-runner-products.test.ts: 15 passed.
Tested at 91c2109f0c:
limrun-ios-runner-products.test.tsandlimrun-ios-runner.test.ts: 55 passed.- Mutations at the pre-review commit e8a1b1d809: re-hashing app files on upload fails the new count test (8 reads, expected 2); removing the regular-file check fails the symlink test.
- Typecheck, oxlint and oxfmt on the changed files: clean.
Per-launch selective sync, real simulator runner app (7 files, 5.9 MB), stubbed network, 40 interleaved samples per side, loaded host:
| files hashed | bytes hashed | median | p90 | |
|---|---|---|---|---|
| base 47e3fbe275 | 8 | 5,894,971 | 43.7 ms | 93.1 ms |
| e8a1b1d809 | 1 | 1,513 | 8.7 ms | 14.7 ms |
91c2109f0c only adds an abort check. CI checks are pending. No live remote-instance run.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.