What happened
agent-device 0.21.1 (also 0.20.10), macOS, iOS simulator. During an Xcode build on the same host (load average around 350), agent-device record stop failed with:
/bin/ps timed out after 1000ms
exit 1, empty output. The same ps -ax -o pid=,ppid=,command= takes 0.09 s from a shell when the host is idle. After the failure the recording resource stayed in cleanup-pending, record start refused with "recording already in progress" for the rest of the session, and the only way out was to SIGINT the simctl recordVideo process by hand and record with simctl io recordVideo directly.
Where
dist/src/owner-identity.js: every /bin/ps -p <pid> -o lstart=|command=|state= probe runs with timeoutMs: 1000 (the m=1e3 constant). The daemon uses those probes to confirm the recorder's identity (pid + start time) before signalling it; when ps exceeds a second the stop refuses instead of signalling.
Proposal
Scale the probe timeout with load, or retry once with a longer budget before refusing; and when identity cannot be confirmed within the budget, say so and leave the recording in a state record stop can retry, rather than cleanup-pending.
What happened
agent-device 0.21.1 (also 0.20.10), macOS, iOS simulator. During an Xcode build on the same host (load average around 350),
agent-device record stopfailed with:exit 1, empty output. The same
ps -ax -o pid=,ppid=,command=takes 0.09 s from a shell when the host is idle. After the failure the recording resource stayed incleanup-pending,record startrefused with "recording already in progress" for the rest of the session, and the only way out was to SIGINT thesimctl recordVideoprocess by hand and record withsimctl io recordVideodirectly.Where
dist/src/owner-identity.js: every/bin/ps -p <pid> -o lstart=|command=|state=probe runs withtimeoutMs: 1000(them=1e3constant). The daemon uses those probes to confirm the recorder's identity (pid + start time) before signalling it; whenpsexceeds a second the stop refuses instead of signalling.Proposal
Scale the probe timeout with load, or retry once with a longer budget before refusing; and when identity cannot be confirmed within the budget, say so and leave the recording in a state
record stopcan retry, rather thancleanup-pending.