`scripts/app-sweep-probe/wait-for-desktop.sh`. Host-side x86 harness.
The branch that types the password fired on `stat -f%Su /dev/console` being
exactly `root`. That is the usual answer before anyone logs in, but it is not the
only one: the macos-11 guest whose WindowServer had aborted answered
`_windowserver`, measured live over ssh alongside `who` returning nothing and
`pgrep -x Dock` failing. Against that guest the branch could never have fired, so
the helper would have waited out its whole timeout on exactly the state it was
written to fix.
The test is now "is this an account a person could log in as" rather than "is it
root": `root` and any leading-underscore daemon account count as nobody being
logged in. An empty answer is treated as an ssh that did not land — it retries
rather than typing a password at a guest it cannot see, which the previous
`case` arm did by accident and this one does on purpose.
Also corrects the reported state to name the console account, so a timeout says
which login window it timed out at.
Verified: `bash -n`. **Not verified against a live login window**, and the run
that prompted this change is not evidence either way: four macos-12 boots with
the helper wired in all reached a desktop, but their logs show it reported
`desktop up (console user aneesiqbal)` every time — the guest autologged in on all
four and the password branch never executed. The earlier 2-of-4 timeout rate is
therefore still unexplained, and 4/4 must not be read as this helper fixing it.
No Rust changed.