Skip to content

Commit 2371ba2

Browse files
committed
fix(coverage): repoint hover evidence off the retired runtime.ts source line
The touch family's additive-facts refactor dropped every owner's explicit hover: unavailable cell in favor of the family-level unsupported fallback, so the coverage manifests' literal-substring checks against packages/platform-apple/src/runtime.ts and packages/platform-linux/src/runtime.ts broke: that source line no longer exists. Point the macOS, iOS, tvOS, and Linux hover rows at new tests that assert the typed unavailable denial directly against each owner's bound facts, instead of re-adding a hand-written denial line the refactor was meant to retire. Refs #2412
1 parent 36f5a22 commit 2371ba2

6 files changed

Lines changed: 54 additions & 14 deletions

File tree

‎packages/platform-apple/src/runtime.test.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { listIosApps } from './core/app-resolution.ts';
99
import type { DeviceBinding, RuntimeFacts } from '@agent-device/contracts/platform-runtime';
1010
import type { PlatformRuntimeOperations } from '@agent-device/contracts/platform-runtime-operations';
1111
import type { SnapshotRuntimeHost } from '@agent-device/contracts/snapshot-runtime';
12+
import { HOVER_UNAVAILABLE_HINT } from '@agent-device/contracts/touch-runtime';
1213
import type { AppleOS, DeviceInfo } from '@agent-device/kernel/device';
1314
import { createApplePlatformRuntime } from './runtime.ts';
1415
import { platformRuntimeHostFixture } from './runtime.fixtures.ts';
@@ -220,6 +221,29 @@ test.each(Object.entries(leaves))(
220221
},
221222
);
222223

224+
test('hover has no Apple interactor route on macOS, iOS, or tvOS; the touch family reports its typed denial', async () => {
225+
for (const device of [leaves.macos, leaves.ios, leaves.tvos]) {
226+
const binding = await createApplePlatformRuntime(platformRuntimeHostFixture()).bind({
227+
device,
228+
intent: { kind: 'ordinary' },
229+
scope: {
230+
signal: new AbortController().signal,
231+
diagnostics: { emit: () => {} },
232+
progress: { report: () => {} },
233+
},
234+
});
235+
const hoverDenial = {
236+
available: false,
237+
reason: 'unsupported-platform-leaf',
238+
hint: HOVER_UNAVAILABLE_HINT,
239+
};
240+
expect(binding.facts.operations.hoverPoint).toEqual(hoverDenial);
241+
expect(binding.facts.operations.hoverRef).toEqual(hoverDenial);
242+
expect(binding.operations.hoverPoint).toBeTypeOf('undefined');
243+
expect(binding.operations.hoverRef).toBeTypeOf('undefined');
244+
}
245+
});
246+
223247
/** Both the fact and the bound operation function agree on availability, for one operation. */
224248
function expectOperationAvailability(
225249
binding: DeviceBinding<PlatformRuntimeOperations>,

‎packages/platform-linux/src/runtime.test.ts‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
PlatformRuntimeOperations,
66
} from '@agent-device/contracts/platform-runtime-operations';
77
import type { SnapshotRuntimeHost } from '@agent-device/contracts/snapshot-runtime';
8+
import { HOVER_UNAVAILABLE_HINT } from '@agent-device/contracts/touch-runtime';
89
import type { DeviceInfo } from '@agent-device/kernel/device';
910
import { createLinuxPlatformRuntime } from './runtime.ts';
1011

@@ -306,6 +307,24 @@ test.each([
306307
expect(facts.operations.gestureViewport.available).toBe(false);
307308
});
308309

310+
test('hover has no Linux interactor route; the touch family reports its typed denial', async () => {
311+
const facts = await createLinuxPlatformRuntime(lifecycleHost()).inspectFacts({
312+
platform: 'linux',
313+
id: 'linux',
314+
name: 'Linux',
315+
kind: 'device',
316+
target: 'desktop',
317+
booted: true,
318+
});
319+
const hoverDenial = {
320+
available: false,
321+
reason: 'unsupported-platform-leaf',
322+
hint: HOVER_UNAVAILABLE_HINT,
323+
};
324+
expect(facts.operations.hoverPoint).toEqual(hoverDenial);
325+
expect(facts.operations.hoverRef).toEqual(hoverDenial);
326+
});
327+
309328
test('binds the Linux coordinate-fling tier without a frame read', async () => {
310329
const binding = await createLinuxPlatformRuntime(lifecycleHost()).bind({
311330
device: {

‎test/integration/ios-simulator-e2e/coverage-manifest.ts‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,11 @@ export const IOS_SIMULATOR_E2E_COVERAGE = {
195195
'smoke:form-input',
196196
'AX-independent first-responder typing appends and is read back from a focused fixture field',
197197
),
198-
[C.hover]: {
199-
assertion: 'the Apple runtime fact rejects hover, a pointer-only web contract',
200-
level: 'command-contract',
201-
owner: {
202-
path: 'packages/platform-apple/src/runtime.ts',
203-
test: 'hover: unavailable',
204-
},
205-
},
198+
[C.hover]: contract(
199+
'packages/platform-apple/src/runtime.test.ts',
200+
'hover has no Apple interactor route on macOS, iOS, or tvOS; the touch family reports its typed denial',
201+
'the Apple runtime fact rejects hover, a pointer-only web contract',
202+
),
206203
[C.viewport]: contract(
207204
'src/daemon/__tests__/viewport-runtime.test.ts',
208205
'rejects an unavailable exact-owner fact before binding',

‎test/integration/linux-e2e/coverage-manifest.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ export const LINUX_PLATFORM_COVERAGE = {
200200
'Linux provider scenario executes a coordinate long press',
201201
),
202202
[C.hover]: contract(
203-
'packages/platform-linux/src/runtime.ts',
204-
'hover: unsupportedPlatformLeaf',
203+
'packages/platform-linux/src/runtime.test.ts',
204+
'hover has no Linux interactor route; the touch family reports its typed denial',
205205
'the Linux runtime fact rejects pointer-only hover input',
206206
),
207207
[C.press]: contract(

‎test/integration/macos-e2e/coverage-manifest.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ export const MACOS_PLATFORM_COVERAGE = {
172172
[C.fill]: gap('No command-specific macOS fill evidence exists yet'),
173173
[C.longPress]: gap('No command-specific macOS long-press evidence exists yet'),
174174
[C.hover]: contract(
175-
'packages/platform-apple/src/runtime.ts',
176-
'hover: unavailable',
175+
'packages/platform-apple/src/runtime.test.ts',
176+
'hover has no Apple interactor route on macOS, iOS, or tvOS; the touch family reports its typed denial',
177177
'the Apple runtime fact rejects pointer-only hover input on macOS',
178178
),
179179
[C.press]: live(

‎test/integration/tvos-e2e/coverage-manifest.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ export const TVOS_PLATFORM_COVERAGE = {
155155
[C.fill]: gap('No tvOS-specific fill command evidence exists yet'),
156156
[C.longPress]: gap('No tvOS-specific long-press command evidence exists yet'),
157157
[C.hover]: contract(
158-
'packages/platform-apple/src/runtime.ts',
159-
'hover: unavailable',
158+
'packages/platform-apple/src/runtime.test.ts',
159+
'hover has no Apple interactor route on macOS, iOS, or tvOS; the touch family reports its typed denial',
160160
'the Apple runtime fact rejects pointer-only hover input on tvOS',
161161
),
162162
[C.press]: gap('No tvOS-specific press command evidence exists yet'),

0 commit comments

Comments
 (0)