chore(ios-runner): remove unset env knobs, the dead back wire command, and unreachable paths

Merged
TH
2mo ago
+120-221

Summary

Removes runner code nothing can reach. Commands the daemon sends behave the same. Stacked on https://github.com/callstack/agent-device/pull/2825.

  • Deletes the env knobs DISABLE_READONLY_RETRY, DISABLE_SAFE_MODAL_PROBE and NOOP_STARTUP, plus the now-unused RunnerEnv.isTruthy. git grep confirmed nothing set them. The nightly comment that named NOOP_STARTUP is reworded.
  • Deletes the runner back wire command: TS union member, trait row (the manifest is still runner-command-traits.ts here), Swift case and handler.
  • Deletes selector-keyed type and its element-focus entry point.
  • Deletes the Thread.isMainThread branch in executeDispatched and the prepared-path .snapshot case. Also deletes the main-thread shortcuts only those reached (modal-routing check, post-snapshot mark, snapshot-failure invalidation). The issue did not list these three.
  • The test-only execute(command:) now calls the transport's own inlineResponse/enqueueAccepted, so tests run on the command queue.
  • Custom-action coverage: truncated/blocked are now required.
  • AppleToolProvider.simctl/devicectl are now required; the runXcrun fallback is gone.

Closes #2791. 18 files, +120/āˆ’220.

Validation

Rebased onto main at a913cb222. Signed macOS host lane: 236/236 at b7a4ffbc0. Resolved a conflict with #2822: back is removed from the merged trait table and its test. check:affected --run is green at the stack head 60e533284. The evidence below is from before the rebase.
Tested at d53defc2f.

  • pnpm check:affected --run: all runnable checks passed (59 selected; everything else is GitHub-authoritative).
  • check:production-exports, check:xctest-selection (host reaches 234), check:packaged-runner-swift, typecheck: green.
  • macOS host lane, signed unit-test build: 234 tests, 0 failures.
  • iOS Simulator (iPhone 17 Pro, iOS 27 beta), changed tests that don't launch the host app: pass. Tests that call app.launch() fail the same way on this branch and on the base build ("Application … is not running"), so this host can't give evidence for them. That gap stays open for the ios.yml lane.
  • Live: open Settings, then snapshot, press, back --in-app, back --system, fill. Runner log shows backInApp/backSystem/type/snapshot ok=1. Session closed, daemon stopped --clean.
  • Review (code-review skill, 9 findings): fixed 2 (helper now reuses the transport's routing; standalone expectation). Rejected 7: out of scope (TV-remote env knob, captureSnapshotRootBounded), sibling-owned (shouldRetryCommand → #2786), tests follow production dispatch on purpose, no sender (selector type), existing refusal pattern (.snapshot switch case), file already over 1,000 lines before this PR (#2792 splits it).

šŸ¤– Generated with Claude Code