perf(ios): verify a warm Simulator bridge read's target in the guest

Merged
TH
6h ago
+214-27

Summary

A local Simulator bridge read ran ps after the tree to prove which process it came from. The guest now reads the target's kernel start time before and after the tree, refuses a change as stale_target, and returns the start time as processStartTime. The first read of a generation still checks ps, which ties that start time to the generation; later reads send it as expectedProcessStartTime, and the guest refuses a read when the pid names another process. A tree without the expected start time still gets ps. With no live target (zombies included) the reader answers and the host explains a failed read with ps, as before.

Both readers now share one start-time function; physical and remote devices are otherwise unaffected.

Value

Warm snapshot -i, iPhone 17 Simulator: one ps spawn fewer per read (about 5 ms).

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 -i median 61–73 ms → 38–42 ms; press, fill, flow and batch unchanged or faster, all ops succeeded, identical replies.
  • lifecycle-target-identity.test.ts: learned generation reads no ps (fails on origin/main); a tree without the start time and a new generation get ps.
  • Bridge compiles with -Werror; the runner unit passes -fsyntax-only; native-dupes 57 (no new).
  • CI owns the full gates.

šŸ¤– Generated with Claude Code