fix(android): recognize exited screenrecord processes

Merged
SH
7h ago
+199-67

Summary

Android record stop can reject a finished clip while screenrecord remains unreaped. This four-file fix recognizes valid zombies as exited, confirms disappearance after failed or unparseable identity reads, and keeps interrupted probes uncertain. Read current start time after command line before signalling a live writer.

The daemon scenario covers running and zombie recorders. Transport coverage retains exact-path/PID-reuse guards and proves the disappearing writer candidate is actually inspected. One documentation sentence is added.

Fixes #4449.

Validation

Tested 481db79 against 2deb909:

  • Ordinary built CLI/daemon stop on a real unreaped recorder: baseline fails ownership confirmation; candidate returns stopped/confirmed/retired and collects its original video. The actual PID/start time remain consistent through start, real Z/empty-argv pre-stop inspection and cleanup; neither daemon nor parent signals the exited child, which is reaped afterward.
  • Separate healthy built CLI and real-ADB source-transport controls pass. Full focused suites: 24 transport and 10 daemon passes. New tests reproduce three failures on prior c228017; the writer-scan mutant fails and restored coverage passes.
  • Exact clean unchanged affected gate: all 11 runnable checks pass; 19,186 unit passes, three existing skips, 330 related and 12 command-docs passes.

Commands, source/build pins, receipts and original footage. Footage shows the completed Android artifact; typed real CLI/ADB results establish subsequent host stop/collection. All failed setup attempts are retained and classified. All 16 checks at 481db79 are terminal: 14 successes and two conditional skips.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.