fix(ios): rn-fast-runner self-builds on first use; gate agent-device install on Android#193
Merged
Merged
Conversation
…install on Android D1219/PR #164 moved iOS device control onto the in-tree rn-fast-runner at the runtime layer but never updated the install layer, leaving it inverted: agent-device was force-installed every session (iOS no longer needs it) while the iOS runner auto-installed for no one — build/ is gitignored and startFastRunner() always spawned `xcodebuild test-without-building`, which requires a manual pre-build fresh machines never ran (B161). - startFastRunner() falls back to a full `xcodebuild test` (build + test) when no .xctestrun exists, so the runner self-builds on first use (ready timeout widened to 360s for the cold path); steady-state stays on test-without-building. Decision extracted to the unit-tested pure fn resolveRunnerXcodebuildArgs() + hasBuiltTestProduct(). - SessionStart hook gates the agent-device global install on a live `adb` device/emulator (mirrors ensure-android-ready.sh). iOS-only macOS users stop paying for an unused dependency. - /setup + /doctor offer the one-time build-for-testing pre-build to move the cold-build cost out of the first interaction. - Docs corrected (rn-setup skill, project CLAUDE.md), incl. an "expected simulator icons" note explaining RnFastRunner / RnFastRunnerUITests-Runner. Refs B161, D1228 (workspace docs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
D1219/PR #164 moved iOS device control onto the in-treern-fast-runner(XCTest rig) at the runtime dispatch layer, but the install layer was never updated — leaving it exactly backwards:agent-devicewas force-installed every RN session (detect-rn-project.sh), even for iOS-only macOS users who never touch it (it's Android-only now).scripts/rn-fast-runner/build/is gitignored (artifacts don't ship), andstartFastRunner()always spawnedxcodebuild test-without-building, which requires a priorbuild-for-testing. On a fresh machine the.xctestrunnever existed → firstdevice_snapshot action=openfailed with "did not become ready" (B161).Surfaced by the maintainer: "we install agent-device, didn't we get rid of it?" + "RnFastRunner isn't installing automatically on another machine."
What
resolveRunnerXcodebuildArgs()+hasBuiltTestProduct(): cold machine → fullxcodebuild test(build + test, ready timeout widened 30s → 360s); warm → fasttest-without-building. Single chokepoint, so thecdp_repair_actionbootstrap (D1220) inherits it.agent-deviceinstall gated on a live Android target (adb devices, mirrorsensure-android-ready.sh)./setup+/doctoroffer the one-time pre-build to move the cold-build cost out of the first interaction (lazy fallback still guarantees correctness).CLAUDE.md), including an "expected simulator icons" note explainingRnFastRunner/RnFastRunnerUITests-Runnerso the XCUITest host apps aren't mistaken for clutter or the legacyAgentDeviceRunnerleak.Tests / verification
test/unit/runners/rn-fast-runner-build-args.test.js.tscclean · 1589/1589 cdp-bridge unit tests pass ·bash -non the hook · changeset present (satisfies the ci: require a changeset when shippable src changes (GH #189 post-mortem) #192 require-changeset guard).xcodebuild testpath — worth confirming live on the second machine.Refs: B161, D1228 (workspace docs); D1219/PR #164, D1220.
🤖 Generated with Claude Code