perf(apple-runner): read an installed package's runner fingerprint once
Summary
Every runner command that reuses a session recomputes the expected runner cache metadata, and its source fingerprint walks and stats every runner source file: about 2.5 ms of synchronous daemon work per command, twice per snapshot (the two surface host appState reads) and more per press/fill. An installed package's runner sources change only with its version, and a new version replaces the daemon (the #2458 identity model), so its fingerprint now holds for the life of the process. A checkout still reads its sources on every reuse, so a runner edit still restarts the runner.
The runner host port gains isSourceCheckoutProjectRoot.
Value
Installed tree, iPhone 17 Simulator: daemon CPU in runner-cache-metadata fell from 5.3 ms to ~0 per snapshot -i.
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). -
index.test.ts: an installed root reads its fingerprint once (fails onorigin/main); the change-detection tests now model checkouts explicitly. -
pnpm exec vitest run --project apple-runner: 1012 passed. -
CI owns the full gates.
š¤ Generated with Claude Code