Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Keep iOS simulator runner hot across session close #1013

Description

@thymikee

Problem

#1010/#1011 made the XCUITest runner survive open --relaunch and daemon restarts, but session close still tears it down: src/daemon/session-teardown.tsstopIosRunnerSession. Closing a session and opening a new one on the same simulator pays the full ~5s xcodebuild test-without-building ramp for no benefit — the runner is device-scoped, app-agnostic infrastructure; the session is a logical construct.

Proposal

Let a healthy simulator runner outlive session close (same daemon), reusing the existing readiness-preflight + invalidate/restart recovery for staleness — the identical argument that carried the relaunch keep-hot change.

Constraints (from the #1011 review/verification)

  • Proxy lease expiry flows through the same teardown (cleanupExpiredLeasedSession → session teardown). Decide explicitly whether expired-tenant cleanup keeps killing the runner (conservative) or can also keep it hot given lease admission gates device access anyway.
  • Scoped simulator-set runners must keep their teardown — the XCTestDevices redirect symlink/lock lifetime is session-bound (see the scoped-set fix in perf: overlap iOS runner prewarm, seed booted-memo, hand runners off across daemon restarts #1011).
  • Consider an idle policy for a runner left behind after close (the runner self-expires via XCTWaiter after 24h; that may be enough).

This changes what close means operationally, so it deserves its own semantics discussion — filing separately from the perf PRs on purpose.

Activity

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

    enhancementNew feature or requestready-for-humanValid work that needs human implementation, judgment, or maintainer merge

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions