Skip to content

iOS devices: keep the runner warm across close and open, and retain it on iPad relaunch #5140

Backlog

Description

@thymikee

Purpose

Test suites on remote and cloud iOS devices open and close the app for each test. Each close stops the runner on physical devices, so the next open pays a cold runner start (about 6–7 s plus CoreDevice retries, based on the #2200 measurements). The simulator already keeps the runner across close. Physical iPad also misses relaunch retention.

Paths below were read on main at 9d6059c.

Required behavior

  1. On CoreDevice-backed physical iOS and iPadOS, close does not stop the runner before it terminates the app. Today close calls stopRunnerSession unconditionally for non-simulator Apple devices (packages/platform-apple/src/lifecycle.ts:450-457). Use the existing releaseRunnerOnClose({ retain }) decision (lifecycle.ts:475-478) and the post-replacement lifecycle reset from perf: retain iOS runner across physical relaunch #2200, so that the next open reuses the runner without a stale app target.
  2. shouldRetainRunnerForRelaunch admits ipados as well as ios (lifecycle.ts:436-447).
  3. The XCTest (usbmux-only) backend, tvOS and visionOS keep today's behavior.
  4. Amend ADR 0005 (lines 163-168 and 219 state "until separate evidence"), following docs/adr/FORMAT.md.

Completion conditions

  • Unit tests cover retention on close for CoreDevice iOS/iPadOS and no retention for the excluded backends and OSes.
  • The PR attaches the perf: retain iOS runner across physical relaunch #2200 evidence bar on one physical iPhone and one physical iPad: 8 matched open/close/open cycles, base vs. branch, reporting runner prewarm wait, retries, total wall time, and a correct first snapshot after the target reset.

Dependencies

None. Builds on #2200 (relaunch retention on physical iOS).

Activity

  1. added
    needs-triage
    on Nov 27, 2026
  2. apex-sentinel-staging commented on Nov 27, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: feature

    The issue requests new behavior: keeping the runner warm across close/open on CoreDevice-backed iOS/iPadOS and admitting ipados for relaunch retention, with file locations, ADR changes, tests, and completion criteria. It describes an enhancement rather than a defect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions