fix(apple): stop runner connect retry on signal exit or session drain
Fixes #4265
Cause. When a runner process was terminated by signal (such as SIGTERM/SIGKILL after launch budget expiry), Node.js reported exitCode: null and signalCode: 'SIGTERM'. The runner observation only checked exitCode !== null, so runnerProcessExited remained false and the connect retry loop kept retrying the old port for the full 240 s budget. Additionally, session state transitions to draining or stopped during startup did not fail fast.
Fix. Recognise signalCode != null in observeLocalRunnerLaunch alongside exitCode !== null, and treat draining or stopped session states as exited in runnerProcessExited. Added a patch changeset.
Test. Added unit tests verifying waitForRunner stops retrying immediately and reports xcodebuild_exited_early when the child exits by signal or transitions to draining. Scoped vitest, oxlint, oxfmt, and tsc are clean.
This change was prepared with the assistance of an AI coding agent (GPT-6-astra).
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.