Skip to content

Commit 3ed4734

Browse files
committed
fix: register boot cutover policy
1 parent 0e59197 commit 3ed4734

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

scripts/layering/runtime-command-cutover-table.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,31 @@ import { recordRuntimeDaemonMechanicsViolations } from './record-runtime-mechani
1111
* mechanism in `runtime-command-cutover-policy.ts` carries one planted-red proof for
1212
* every row, and `cutoverRowDefects` rejects a row that leaves its claims unstated.
1313
*
14-
* Rule ids are per row: the layering report groups violations under R17 devices,
15-
* R14 logs, R15 network, R16 record.
14+
* Rule ids are per row: the layering report groups violations under R18 boot,
15+
* R17 devices, R14 logs, R15 network, R16 record.
1616
*/
1717
export const MIGRATED_COMMAND_CUTOVERS: readonly MigratedCommandCutover[] = [
18+
{
19+
rule: 'R18 boot-runtime-cutover',
20+
command: 'boot',
21+
subject: 'device readiness',
22+
tier: 'request-scoped',
23+
execution: 'device-runtime',
24+
legacyRetirement: {
25+
routeNames: ['ensureAndroidEmulatorBoot', 'resolveAndroidEmulatorAvdName'],
26+
},
27+
admissionMember: {
28+
forms: ['computed-property'],
29+
files: ['src/platforms/apple/plugin.ts'],
30+
message: 'Apple plugin retains legacy boot support or hint closure',
31+
},
32+
runtimeTypeNames: ['DeviceReadinessRuntimeOperations'],
33+
operations: { names: ['bootTarget', 'bootTargetHeadless'] },
34+
singularExecution: {
35+
routes: ['handleSessionStateCommands'],
36+
operations: ['bootTarget', 'bootTargetHeadless'],
37+
},
38+
},
1839
{
1940
rule: 'R17 device-inventory-cutover',
2041
command: 'devices',

src/__tests__/contracts/apple-os-capability-table-parity.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const coreDeviceOnlyPhysicalOperationHint = (device: DeviceInfo): string | undef
6767
? undefined
6868
: 'This command requires a CoreDevice-backed physical iOS device. The selected XCTest backend supports open, close, interactions, snapshots, and screenshots.';
6969
const SUPPORTS_REF: Record<string, (device: DeviceInfo) => boolean> = {
70-
boot: isNotMacOs,
7170
apps: supportsCoreDevicePhysicalOperation,
7271
install: supportsAppInstallation,
7372
reinstall: supportsAppInstallation,

src/core/__tests__/capability-plugin-routing-parity.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ const coreDeviceOnlyPhysicalOperationHint = (device: DeviceInfo): string | undef
131131
// end-to-end assertions cross-check this map against production: a command that
132132
// gains/loses a closure (or whose closure body changes) breaks parity.
133133
const SUPPORTS_REF: Record<string, (device: DeviceInfo) => boolean> = {
134-
boot: isNotMacOs,
135134
apps: supportsCoreDevicePhysicalOperation,
136135
install: supportsAppInstallation,
137136
reinstall: supportsAppInstallation,
@@ -337,8 +336,10 @@ test('(b.2) unsupportedHint closures are verbatim across the full device matrix'
337336
});
338337

339338
test('the capability catalog includes runtime-backed commands without restoring legacy admission', () => {
339+
assert.ok(listCapabilityCommands().includes('boot'));
340340
assert.ok(listCapabilityCommands().includes('logs'));
341341
assert.ok(listCapabilityCommands().includes('network'));
342+
assert.equal(BASE_COMMAND_CAPABILITY_MATRIX['boot'], undefined);
342343
assert.equal(BASE_COMMAND_CAPABILITY_MATRIX['logs'], undefined);
343344
assert.equal(BASE_COMMAND_CAPABILITY_MATRIX['network'], undefined);
344345
});

src/platforms/apple/plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { RunnerContext } from '@agent-device/contracts/interaction';
2020
// the full {command x sample-device} matrix (iOS/iPadOS/tvOS/macOS/visionOS).
2121
// ---------------------------------------------------------------------------
2222

23-
// `install`/`boot`/`reinstall`/`install-from-source`/`push`/`home`/`app-switcher`
23+
// `install`/`reinstall`/`install-from-source`/`push`/`home`/`app-switcher`
2424
// (was `!isMacOs(device)`). Off Apple (caps undefined) the original was
2525
// always true — no non-Apple platform is macOS.
2626
const supportsAppAndDeviceLifecycle = (device: DeviceInfo): boolean => {
@@ -76,7 +76,6 @@ const supportsTvRemote = (device: DeviceInfo): boolean => {
7676
// Per-command support gates the Apple family applies by default, keyed exactly as in
7777
// the command-descriptor registry (a command absent here has no Apple gate).
7878
const APPLE_SUPPORTS_BY_DEFAULT: Record<string, (device: DeviceInfo) => boolean> = {
79-
[PUBLIC_COMMANDS.boot]: supportsAppAndDeviceLifecycle,
8079
[PUBLIC_COMMANDS.apps]: supportsCoreDevicePhysicalOperation,
8180
[PUBLIC_COMMANDS.install]: supportsAppInstallation,
8281
[PUBLIC_COMMANDS.reinstall]: supportsAppInstallation,

0 commit comments

Comments
 (0)