fix(host-kit): pin ps lstart reads to the C locale so daemon stop finds a live daemon

PC
4h ago
+1724-522

Summary

Fixes #4656. On macOS and BSD, a daemon and a client using different locales could read different ps lstart strings for the same process. A stop could then discard registration for a daemon that was still alive.

The shared process identity reader pins LC_ALL=C and TZ=UTC for start-time reads and converts the result to a posix:<epochMs> token. Historical raw strings remain unverified. Command and argument reads retain their existing encoding, and Linux and Windows retain their existing identity sources.

Validation

At 0b301eefcaac49c597faab47667f9c2303fe2de1, the live macOS CLI and SDK checks covered cross-locale stop, cross-timezone stop and reuse, and retention of a live daemon with a legacy record. The iOS Simulator recording test ran through the checkout CLI and confirmed the recorder exited and its resource retired. Lifecycle evidence · Recording evidence

Hosted CI passed with Bundle Size skipped. The local affected gate recorded two unit failures outside the patch. Both passed in isolation.

Disclosure

This change was prepared with the help of an AI coding assistant (Claude Code) and submitted by the account holder.


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