fix(logs): disclose the physical iOS device app relaunch on logs start

Merged
XI
9d ago
+107-6

Summary

On physical iOS devices, logs start captures console output through devicectl device process launch --console --terminate-existing, which relaunches the session app. logs stop signals devicectl, which forwards the signal to the app and ends it. Neither effect was disclosed.

  • AppLogStartResult gains relaunched?: true. The Apple runtime sets it only for the ios-device backend.
  • logs start reports relaunched: true, and text output prints relaunched=true, following restarted.
  • The logs description (help and MCP), help debugging and the commands docs say that start relaunches the app and stop ends it.

15 files, 8 of them non-test (+20/-4).

Fixes #4688

Validation

Head 06568d1d4 on base aa600e980.

  • check:quick passed. Focused vitest passed. The 5 new tests fail on base and pass on head.
  • check:affected --run --head 06568d1d4 (exactCommit): format, lint, typecheck, layering, fallow, build and vitest-related passed. unit failed only in test/repo-guards/android-sdk-setup-action.test.ts (2 tests). They fail the same way on aa600e980 on this host, where a local Android SDK path leaks into the expected path.
  • iOS 27.2 simulator, base vs head: logs start --json is unchanged and carries no relaunched. stop, appstate and close behave as before.
  • Not verified on a physical iPhone. The relaunch flag and "stop ends the app" rest on unit tests, the devicectl launch arguments, and devicectl device process launch --help ("Catchable signals sent to devicectl are forwarded to the app").

🤖 Generated with Claude Code


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