@@ -51,6 +51,11 @@ part of that first step. The first reliable win is infrastructure reuse, not dat
5151implementation keeps the existing one-shot instrumentation helper as the fallback for startup,
5252socket, protocol, and request failures.
5353
54+ Android permits only one reliable instrumentation-owned ` UiAutomation ` context per device. Before
55+ starting a different instrumentation helper, such as touch synthesis, the daemon must stop the
56+ persistent snapshot helper session and let the next snapshot restart it lazily. Helper reuse must
57+ never turn process ownership into cross-command interference.
58+
5459For iOS, keep the XCTest runner session as the reference implementation for lifecycle and
5560invalidation behavior. Android does not need to copy iOS internals, but it should reuse the same
5661daemon-side ideas: per-device session manager, readiness checks, structured protocol errors,
@@ -82,7 +87,7 @@ should show meaningful wall-clock improvement on a realistic app state, not just
8287
8388Session managers need more lifecycle tests than one-shot helpers: startup, ready protocol, reuse,
8489timeout, malformed response, helper version mismatch, device disconnect, install invalidation,
85- shutdown, and one-shot fallback.
90+ shutdown, exclusive instrumentation handoff, and one-shot fallback.
8691
8792Observability should report whether a command used a persistent session, started one, reused one,
8893invalidated one, or fell back to one-shot. This keeps CI and user bug reports diagnosable when a
0 commit comments