perf(snapshot): resolve the local bridge target while the surface probe runs
Summary
A local Simulator capture first asked the runner for the system surface hosts' foreground state, then read the app target's identity with ps. The local bridge's circuit is route-scoped and does not depend on the runner session the probe names, so the target is now resolved while the probe's runner round trips are in flight. A capture that the probe sends to a surface drops the resolution and ignores its failure. The runner-served bridge still resolves after the probe, because a new runner session drops its cached targets. No check is removed.
Value
iPhone 17 Simulator, warm snapshot -i over MCP with a ready runner, 2 × 100 reads: median 38.4 → 36.6 ms (installed tree, on top of the other read changes).
Validation
-
Part of a read-latency series (#5193–#5197). Combined, on the external sign-in harness (iPhone 17 Simulator, iOS 27.0, checkout, warm runner):
snapshot -imedian 61–73 ms → 38–42 ms; press, fill, flow and batch unchanged or faster (all ops succeeded, flow reply tokens identical). -
snapshot-route.test.ts: the target resolves before the probe answers (fails onorigin/main); a surface capture ignores a failed resolution. -
platform-appleandcapture-kitunit suites pass. -
CI owns the full gates.
🤖 Generated with Claude Code