Repository navigation
Description
Purpose
An Android recorder can exit while its process-table entry remains unreaped. Its command line is empty and its state is Z. The transport reports ownership-lost; ordinary record stop then throws before collecting the completed clip.
A listed writer can disappear between its first presence probe and identity reads. A failed or empty/unparseable identity read currently leaves the scan uncertain even when a fresh probe could confirm absence. Reading stat before command line also allows a reused PID to pass an outdated start-time check. Interrupted presence probes must not establish absence.
Required behavior
- Treat a valid zombie as an exited recorder without signalling it.
- After failed or unparseable identity reads, accept absence only when a fresh presence probe conclusively confirms it. Keep present, inaccessible or interrupted candidates uncertain.
- Read current start time after command line and retain exact executable/output-path checks before signalling a live writer.
- Let ordinary daemon recording stop collect an unreaped recorder's completed video.
Verification
Candidate 481db79 retains the original base 2deb909. Full focused suites pass 24 transport and 10 daemon tests. New review regressions reproduce three failures on prior candidate c228017; a deliberately skipped writer candidate now fails coverage, passes when only the new observations are removed, and passes after restoration.
The exact clean unchanged affected gate passes all 11 runnable checks: 19,186 unit passes with three existing skips, 330 related and 12 command-docs passes. Latest upstream main merges cleanly.
A fresh built CLI/daemon case starts a real recorder through a pinned native parent. Production start attests its actual PID/start time. After successful native exit, real ADB sees that same unreaped process in Z with empty cmdline immediately before ordinary record stop. Candidate stop returns stopped/confirmed/retired and collects the unchanged original video. Neither daemon nor fixture cleanup signals the exited child, which its parent then reaps. Close and daemon stop succeed. The baseline fails ordinary stop with the ownership error; a later close can recover export after parent reaping and is recorded separately.
Executed commands, generic identity attestations, model/API, source/build pins, selected receipts and all original footage. Actual process, device and state identifiers and raw logs remain private. The native launcher and parent lifetime are controlled; SDK process reads, ordinary stop, pull, export and cleanup are unmodified. All preceding harness/setup failures and clips remain classified. Earlier c228017 source-only evidence remains unchanged, with its temporal and fixture-cleanup limitations.
No public API or wire change is needed.
Dependencies
No blocking prerequisite.
Activity