|
8 | 8 | outlive its budget while the device is healthy — the shape of #2553 — so the helper process was |
9 | 9 | already gone and the command still failed with `Android automation helper is still holding device |
10 | 10 | automation ownership`. Ownership is read off the device now: `adb shell pidof |
11 | | - com.callstack.agentdevice.snapshothelper` says `occupied` only while it names a process, `released` |
12 | | - when the device answers that nothing is running, and `unknown` when adb could not carry the call, |
13 | | - so a `device offline` stderr no longer counts as a release either. A refusal requires two reads that |
14 | | - both name the process, which keeps a helper still inside Android's exit path from costing a |
15 | | - command. Scripts that match the failure reason see `android_snapshot_helper_runtime_occupied`, |
16 | | - which replaces `android_snapshot_helper_retirement_unconfirmed`. |
| 11 | + com.callstack.agentdevice.snapshothelper` says `occupied` while it names a process, and says |
| 12 | + `released` only on the shell's own no-process answer — a non-zero exit with nothing on either |
| 13 | + stream. Anything else, including `error: closed`, `cannot connect to daemon` and `device offline`, |
| 14 | + is `unknown`: those describe the transport, not who holds the runtime, and a release is never |
| 15 | + cleared on a description of the transport. A refusal requires two reads that both name the process, |
| 16 | + which keeps a helper still inside Android's exit path from costing a command. Scripts that match the |
| 17 | + failure reason see `android_snapshot_helper_runtime_occupied`, which replaces |
| 18 | + `android_snapshot_helper_retirement_unconfirmed`. |
17 | 19 | - Changed (android): a snapshot helper session that reaches ready settles a release the previous |
18 | | - teardown could not prove, because Android hands UiAutomation to one connection at a time and that |
19 | | - helper owns it now; the next command no longer force-stops the session it has just started while |
20 | | - `pidof` happens to be unreadable. A helper start that fails is also retried after a backoff scaled |
21 | | - to how long it spent failing (10 s to 60 s) instead of on every command, which had roughly doubled |
22 | | - command time on hosts where the helper never starts, and the wait for a started helper to announce |
23 | | - itself now takes a share of the caller's own helper-command budget — half of `--timeout`, never |
24 | | - less than one session command is worth — so a device that needs longer than a capture to bring the |
25 | | - helper up stays on the persistent path when the caller budgeted for it. On a host where the helper |
26 | | - took 12 s to announce itself, `--timeout 60000` used to answer with the one-shot transport and now |
27 | | - answers from the session. |
| 20 | + teardown could not prove. `am instrument` force-stops whatever is already instrumenting the helper |
| 21 | + package, so a session that reported itself ready is the only helper process the device has left, |
| 22 | + and the unproven release went away with the process that owed it; the next command no longer |
| 23 | + force-stops the session it has just started because `pidof` happens to be unreadable. A helper start |
| 24 | + that fails is also retried after a backoff scaled to how long it spent failing (10 s to 60 s) |
| 25 | + instead of on every command, which had roughly doubled command time on hosts where the helper never |
| 26 | + starts. And the wait for a started helper to announce itself no longer uses a fixed 10 s: it takes |
| 27 | + half of the helper-command budget the capture was built with, 15 s today, which is what had been |
| 28 | + pushing devices slower than a capture off the persistent path. On a host where the helper took 12 s |
| 29 | + to announce itself, the command used to answer with the one-shot transport and now answers from the |
| 30 | + session. The CLI's `--timeout` reaches that wait as its deadline aborting it, not as the number. |
28 | 31 |
|
29 | 32 | - Fixed: an iOS snapshot whose XCTest query-sweep tier cannot read the screen no longer ends the |
30 | 33 | runner process. On a live React Native feed (Bluesky Home, images re-rendering) the AX server |
|
0 commit comments