refactor(move): move the runner's inline unit tests into UnitTests/

Merged
TH
2mo ago
+4088-4033

Summary

Part of #2792. Based on main: the #2825–#2845 stack merged, and main fa3b7291f has the same tree as 60e533284.

Pure move: every whole #if AGENT_DEVICE_RUNNER_UNIT_TESTS test block in a production runner source moves to UnitTests/RunnerTests+<Source>Tests.swift under the same guard, with the same test names and bodies. This includes the blocks the rebased base added in RunnerTests+Lifecycle.swift and RunnerTests+SynthesizedGesturePolicy.swift. Production files keep only test seams: overrides, injected failures, the recorder timestamp accessor, and stored test properties. The move widens 20 declarations from private to internal, each read by a moved test. Five fixture loaders step up one more directory. Comments that pointed at the old test locations now point at the new ones. The final chore(gates) commit rewords the declaration-scan comments. 54 files.

git diff -M90% --stat origin/main...HEAD: 54 files, +4088/āˆ’4033. A removed-vs-added line multiset differs only in private→internal, imports, extension RunnerTests { wrappers, and the five // UnitTests path steps.

Validation

Tested at 5785e206b..61fcc6969 (tip 61fcc6969, tree-identical to the originally tested ea85fd32e):

  • macOS host lane, signed: 233 tests, 0 failures before (base 60e533284) and 233, 0 failures after.
  • pnpm check:xctest-selection: host 233, iOS PR list 103, nightly 280, 0 unreachable, green.
  • pnpm check:packaged-runner-swift: green.
  • pnpm check:affected --run: all runnable checks passed. It selected the full set because of the workflow and tooling paths.
  • iOS simulator build-for-testing with the unit-test flag: succeeded.
  • Declared func test names: 285 before and after, with no duplicates.

An adversarial fresh-context review tried to refute the pure move and confirmed test bodies, guards, lane reach, and every access widening. It found three stale comments, which are now fixed.

šŸ¤– Generated with Claude Code