Skip to content

Commit f2d605a

Browse files
committed
fix(apple): read the device report and exec types through the derived host port
#2689 rewrote the runner host port to derive its types from host-kit and the owning core modules instead of mirroring them, which left this branch naming types that no longer exist there: - Derive `IosDeviceRunnerReadiness` from the control port's own return type rather than restating the device's states and remedies beside them. - Take `IosPhysicalDeviceRunnerControl` from `core/physical-device-routing.ts` and `ExecResult` from `@agent-device/host-kit/command`, which is where the port now points callers.
1 parent 7538d1e commit f2d605a

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎packages/platform-apple/src/core/physical-device-control.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export type IosPhysicalDeviceControl = IosPhysicalDeviceRunnerControl & {
7272
outPath: string,
7373
timeoutMs?: number,
7474
): Promise<void>;
75-
7675
};
7776

7877
const CONTROLS: Record<IosPhysicalDeviceBackend, IosPhysicalDeviceControl> = {

‎packages/platform-apple/src/runner/__tests__/runner-device-readiness.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { beforeEach, test, vi } from 'vitest';
33
import { AppError, normalizeError } from '@agent-device/kernel/errors';
44
import type { DeviceInfo } from '@agent-device/kernel/device';
55
import { appleRunnerTestHost } from '../test-host.ts';
6-
import type { IosDeviceRunnerReadiness, IosPhysicalDeviceRunnerControl } from '../host.ts';
6+
import type { IosPhysicalDeviceRunnerControl } from '../../core/physical-device-routing.ts';
7+
import type { IosDeviceRunnerReadiness } from '../host.ts';
78
import { assertDeviceReadinessForIosRunner } from '../runner-device-readiness.ts';
89
import { RUNNER_DEVICE_READINESS_FAILURE_REASONS } from '../runner-contract.ts';
910
import { IOS_DEVICE, IOS_SIMULATOR, MACOS_DEVICE } from './device-fixtures.ts';

‎packages/platform-apple/src/runner/__tests__/runner-startup-failure-fixtures.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
RunnerStartupFailureReason,
55
} from '../runner-contract.ts';
66
import { RUNNER_DEVICE_READINESS_FAILURE_REASONS } from '../runner-contract.ts';
7-
import type { IosPhysicalDeviceRunnerControl } from '../host.ts';
7+
import type { IosPhysicalDeviceRunnerControl } from '../../core/physical-device-routing.ts';
88

99
/**
1010
* Recorded startup failures for {@link classifyRunnerStartupFailure} (#2680).

‎packages/platform-apple/src/runner/host.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ export type AppleRunnerHost = Pick<
104104
/** The runner's deadline type is the host's read side; the {@link Deadline} shim below builds them. */
105105
export type Deadline = HostRetry.DeadlineClock;
106106

107+
/**
108+
* What an iPhone reports about its own fitness to host development tooling (#2683), read off the
109+
* control port that answers for devices. Derived rather than restated: the states and their remedies
110+
* are owned by `core/physical-device-coredevice.ts`, and a second spelling here is a second thing to
111+
* keep in step with a device.
112+
*/
113+
export type IosDeviceRunnerReadiness = Awaited<
114+
ReturnType<IosPhysicalDeviceRunnerControl['readDeviceReadiness']>
115+
>;
116+
107117
let boundHost: AppleRunnerHost | undefined;
108118

109119
/**

0 commit comments

Comments
 (0)