fix(host-kit): find the pinned ps on NixOS hosts without /bin/ps
Summary
NixOS systems have no /bin/ps, so every POSIX identity probe in host-process.ts failed. The probes then reported start time, command, and state as unknown, and the client could not prove that the daemon was the one it spawned. Every daemon command timed out with a misleading "host can be overloaded" hint. The stray daemons left ~/.agent-device in a state that later runs could not recover. #1724 caused this regression in v0.20.8 when it replaced ps with /bin/ps.
The probes now run the first executable of /bin/ps and /run/current-system/sw/bin/ps, the ps in NixOS's root-owned system profile. Neither path comes from PATH, so the pin still blocks a substituted ps. If neither exists, /bin/ps still runs and fails closed. The probes still read lstart, so start times recorded by earlier versions match after an upgrade.
2 files.
Validation
Head afaf8459e, base e560224bd, on NixOS x86_64 with an Android emulator and a fresh AGENT_DEVICE_STATE_DIR:
- On base,
agent-device devices --platform androidfails after 61 s with "made no startup progress for 60 s". On head it lists both AVDs in under 1 s, and theprocessStartTimeindaemon.jsonmatchesps -o lstart=. - The new NixOS test fails on base and passes on head.
pnpm check:affected --run --head afaf8459epasses format, lint, typecheck, layering, fallow, and build.vitest-relatedhas 28 failures, all inapple-ci-impact.test.ts, which spawns/bin/bash. NixOS has no/bin/bash.
CI owns coverage and device lanes.