From c18cf22ea535310ade61ca79141d66108416e224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 13:24:33 +0200 Subject: [PATCH 1/2] refactor(tests): name capture-kit tests for the module they test Pure moves and renames. Import changes are specifier-only: self-package and barrel imports become the defining module, and the moved freshness and action-shelf tests drop their cross-directory prefixes. The transitions and rows fixtures move with the tests that use them; the transitions fixture export follows its file. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/macos.yml | 2 +- docs/adr/0026-scroll-clip-authority.md | 2 +- packages/capture-kit/package.json | 4 ++-- ...ts => durable-capture-resource-boundary-faults.test.ts} | 0 .../ios => ios-snapshot-engine}/action-shelf.test.ts | 2 +- .../{conformance.test.ts => engine-conformance.test.ts} | 3 ++- ...ty-parity.test.ts => engine-eligibility-parity.test.ts} | 2 +- .../{properties.test.ts => engine-properties.test.ts} | 3 ++- packages/capture-kit/src/ios-snapshot-engine/projection.ts | 2 +- .../ios => ios-snapshot-engine}/rows.fixtures.ts | 0 .../ios => ios-snapshot-engine}/rows.test.ts | 2 +- .../{mapping.test.ts => semantic-index-mapping.test.ts} | 2 +- ...ntation.test.ts => semantic-index-presentation.test.ts} | 2 +- .../ios => ios-snapshot-engine}/transitions.fixtures.ts | 0 ...ripts.test.ts => swift-cache-recording-scripts.test.ts} | 0 ....ts => snapshot-occlusion-sibling-sized-chrome.test.ts} | 0 ...tity.test.ts => snapshot-diff-actions-identity.test.ts} | 0 ...-digest.test.ts => snapshot-evidence-ax-digest.test.ts} | 0 .../android.test.ts} | 4 ++-- .../recovery.test.ts} | 7 ++----- .../{warnings.test.ts => quality-warnings.test.ts} | 0 21 files changed, 18 insertions(+), 19 deletions(-) rename packages/capture-kit/src/capture-admission/__tests__/{screen-recording-boundary-faults.test.ts => durable-capture-resource-boundary-faults.test.ts} (100%) rename packages/capture-kit/src/{snapshot/snapshot-presentation/ios => ios-snapshot-engine}/action-shelf.test.ts (94%) rename packages/capture-kit/src/ios-snapshot-engine/{conformance.test.ts => engine-conformance.test.ts} (98%) rename packages/capture-kit/src/ios-snapshot-engine/{eligibility-parity.test.ts => engine-eligibility-parity.test.ts} (99%) rename packages/capture-kit/src/ios-snapshot-engine/{properties.test.ts => engine-properties.test.ts} (98%) rename packages/capture-kit/src/{snapshot/snapshot-presentation/ios => ios-snapshot-engine}/rows.fixtures.ts (100%) rename packages/capture-kit/src/{snapshot/snapshot-presentation/ios => ios-snapshot-engine}/rows.test.ts (90%) rename packages/capture-kit/src/ios-snapshot-engine/{mapping.test.ts => semantic-index-mapping.test.ts} (93%) rename packages/capture-kit/src/ios-snapshot-engine/{presentation.test.ts => semantic-index-presentation.test.ts} (99%) rename packages/capture-kit/src/{snapshot/snapshot-presentation/ios => ios-snapshot-engine}/transitions.fixtures.ts (100%) rename packages/capture-kit/src/recording/__tests__/{recording-scripts.test.ts => swift-cache-recording-scripts.test.ts} (100%) rename packages/capture-kit/src/{snapshot-sibling-sized-chrome.test.ts => snapshot-occlusion-sibling-sized-chrome.test.ts} (100%) rename packages/capture-kit/src/snapshot/__tests__/{snapshot-actions-identity.test.ts => snapshot-diff-actions-identity.test.ts} (100%) rename packages/capture-kit/src/snapshot/__tests__/{ax-digest.test.ts => snapshot-evidence-ax-digest.test.ts} (100%) rename packages/capture-kit/src/snapshot/{__tests__/snapshot-freshness.test.ts => snapshot-freshness/android.test.ts} (97%) rename packages/capture-kit/src/snapshot/{__tests__/snapshot-freshness-recovery.test.ts => snapshot-freshness/recovery.test.ts} (96%) rename packages/capture-kit/src/snapshot/snapshot-presentation/{warnings.test.ts => quality-warnings.test.ts} (100%) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 38d3deff41..fb49425a1c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -171,7 +171,7 @@ jobs: packages/platform-apple/src/snapshot-source/native-runtime.test.ts \ packages/platform-apple/src/foldable/fold-helper-cache.test.ts \ packages/platform-apple/src/foldable/simulator-hid-native.test.ts \ - packages/capture-kit/src/recording/__tests__/recording-scripts.test.ts + packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts pnpm check:package -- --verify-snapshot-bridge-preparation - name: Upload macOS artifacts diff --git a/docs/adr/0026-scroll-clip-authority.md b/docs/adr/0026-scroll-clip-authority.md index f265b4dab1..e8c2916534 100644 --- a/docs/adr/0026-scroll-clip-authority.md +++ b/docs/adr/0026-scroll-clip-authority.md @@ -104,7 +104,7 @@ ledger is the shape to extend; a second parallel ledger would be a second source compaction — the Settings tree legitimately drops rows under the chrome — or sit loose enough to wave through a 74 → 20 collapse. The differential already asserts interactive ⊆ regular ⊆ raw; what it lacks is coverage of the runner stage, since `assertProjectionSubsets` - (`ios-snapshot-engine/properties.test.ts`) builds acquired inputs only and the Swift differential drops + (`ios-snapshot-engine/engine-properties.test.ts`) builds acquired inputs only and the Swift differential drops interactive cases. Extending it to `stage: 'presented'` is what makes any future shrinkage visible. ## Consequences and open evidence diff --git a/packages/capture-kit/package.json b/packages/capture-kit/package.json index 49a974cfd9..722d2c51bc 100644 --- a/packages/capture-kit/package.json +++ b/packages/capture-kit/package.json @@ -303,8 +303,8 @@ "default": "./src/snapshot/snapshot-presentation/android/helper.ts" }, "./snapshot-presentation-ios-transitions-fixtures": { - "types": "./src/snapshot/snapshot-presentation/ios/transitions.fixtures.ts", - "default": "./src/snapshot/snapshot-presentation/ios/transitions.fixtures.ts" + "types": "./src/ios-snapshot-engine/transitions.fixtures.ts", + "default": "./src/ios-snapshot-engine/transitions.fixtures.ts" }, "./snapshot-quality-backend-capabilities": { "types": "./src/snapshot-quality-backend-capabilities.ts", diff --git a/packages/capture-kit/src/capture-admission/__tests__/screen-recording-boundary-faults.test.ts b/packages/capture-kit/src/capture-admission/__tests__/durable-capture-resource-boundary-faults.test.ts similarity index 100% rename from packages/capture-kit/src/capture-admission/__tests__/screen-recording-boundary-faults.test.ts rename to packages/capture-kit/src/capture-admission/__tests__/durable-capture-resource-boundary-faults.test.ts diff --git a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/action-shelf.test.ts b/packages/capture-kit/src/ios-snapshot-engine/action-shelf.test.ts similarity index 94% rename from packages/capture-kit/src/snapshot/snapshot-presentation/ios/action-shelf.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/action-shelf.test.ts index 6caa949e96..ef53902b77 100644 --- a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/action-shelf.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/action-shelf.test.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { buildIosInteractiveSnapshotPresentation } from '../../../ios-snapshot-engine/index.ts'; +import { buildIosInteractiveSnapshotPresentation } from './semantic-index.ts'; import { closedComposerWithRetainedActionShelfNodes, closedComposerWithRetainedRegularTreeActionNodes, diff --git a/packages/capture-kit/src/ios-snapshot-engine/conformance.test.ts b/packages/capture-kit/src/ios-snapshot-engine/engine-conformance.test.ts similarity index 98% rename from packages/capture-kit/src/ios-snapshot-engine/conformance.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/engine-conformance.test.ts index cd4b4b858d..7382bf307c 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/conformance.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/engine-conformance.test.ts @@ -2,7 +2,8 @@ import fs from 'node:fs'; import assert from 'node:assert/strict'; import path from 'node:path'; import { test } from 'vitest'; -import { IosSnapshotEngineError, presentIosSnapshot, publishIosSnapshot } from './index.ts'; +import { presentIosSnapshot, publishIosSnapshot } from './engine.ts'; +import { IosSnapshotEngineError } from './types.ts'; import { canonicalNodes, runTypeScriptCase, diff --git a/packages/capture-kit/src/ios-snapshot-engine/eligibility-parity.test.ts b/packages/capture-kit/src/ios-snapshot-engine/engine-eligibility-parity.test.ts similarity index 99% rename from packages/capture-kit/src/ios-snapshot-engine/eligibility-parity.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/engine-eligibility-parity.test.ts index 6fda0b4ad5..e55bfe2b29 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/eligibility-parity.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/engine-eligibility-parity.test.ts @@ -12,7 +12,7 @@ import { deriveIosCaptureHint, } from '@agent-device/capture-kit/ios-snapshot-planning'; import type { RawSnapshotNode, Rect } from '@agent-device/kernel/snapshot'; -import { presentIosSnapshot } from './index.ts'; +import { presentIosSnapshot } from './engine.ts'; // ADR 0026: `REGULAR_ELIGIBLE_TYPES` (TypeScript) and `eligibleInteractiveTypes` (Swift) are one // fact in two languages — the set that lets a scroll host survive regular projection so the diff --git a/packages/capture-kit/src/ios-snapshot-engine/properties.test.ts b/packages/capture-kit/src/ios-snapshot-engine/engine-properties.test.ts similarity index 98% rename from packages/capture-kit/src/ios-snapshot-engine/properties.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/engine-properties.test.ts index db1113008e..d949058ed5 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/properties.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/engine-properties.test.ts @@ -16,7 +16,8 @@ import { import { canonicalNodes, runTypeScriptCase } from './conformance-harness.ts'; import { differentialBatchArbitrary } from './conformance-generator.ts'; import { acquisitionForGoldenCase, readIosSnapshotEngineFixture } from './conformance-fixture.ts'; -import { IosSnapshotEngineError, presentIosSnapshot, publishIosSnapshot } from './index.ts'; +import { presentIosSnapshot, publishIosSnapshot } from './engine.ts'; +import { IosSnapshotEngineError } from './types.ts'; test('property: regular effective geometry stays within the viewport and actionability fails closed', () => { fc.assert(fc.property(differentialBatchArbitrary, assertRegularCases), { diff --git a/packages/capture-kit/src/ios-snapshot-engine/projection.ts b/packages/capture-kit/src/ios-snapshot-engine/projection.ts index 04c07e7753..49c8def792 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/projection.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/projection.ts @@ -3,7 +3,7 @@ import { normalizeType } from '@agent-device/contracts/snapshot'; import type { IosSnapshotFoldPolicy, IosSnapshotPresentationNode } from './types.ts'; // Kept in step with `eligibleInteractiveTypes` in SnapshotPresentationProjection.swift by -// ios-snapshot-engine/eligibility-parity.test.ts. Excludes `scrollarea`, which `isScrollableSnapshotType` +// ios-snapshot-engine/engine-eligibility-parity.test.ts. Excludes `scrollarea`, which `isScrollableSnapshotType` // accepts but the iOS runner never emits (ADR 0026; macOS decision recorded in that test). const REGULAR_ELIGIBLE_TYPES = new Set([ 'button', diff --git a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/rows.fixtures.ts b/packages/capture-kit/src/ios-snapshot-engine/rows.fixtures.ts similarity index 100% rename from packages/capture-kit/src/snapshot/snapshot-presentation/ios/rows.fixtures.ts rename to packages/capture-kit/src/ios-snapshot-engine/rows.fixtures.ts diff --git a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/rows.test.ts b/packages/capture-kit/src/ios-snapshot-engine/rows.test.ts similarity index 90% rename from packages/capture-kit/src/snapshot/snapshot-presentation/ios/rows.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/rows.test.ts index 8217e89b9f..3b78e84a2c 100644 --- a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/rows.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/rows.test.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest'; import { elementClassicRoomListNodes, legitimatelyLabeledCellNodes } from './rows.fixtures.ts'; -import { buildIosInteractiveSnapshotPresentation } from '../../../ios-snapshot-engine/index.ts'; +import { buildIosInteractiveSnapshotPresentation } from './semantic-index.ts'; test('iOS row presentation associates generic room cells with their descendant titles', () => { const nodes = buildIosInteractiveSnapshotPresentation(elementClassicRoomListNodes).nodes; diff --git a/packages/capture-kit/src/ios-snapshot-engine/mapping.test.ts b/packages/capture-kit/src/ios-snapshot-engine/semantic-index-mapping.test.ts similarity index 93% rename from packages/capture-kit/src/ios-snapshot-engine/mapping.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/semantic-index-mapping.test.ts index f265f274fd..8d17814e5b 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/mapping.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/semantic-index-mapping.test.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest'; import type { RawSnapshotNode } from '@agent-device/kernel/snapshot'; -import { buildIosInteractiveSnapshotPresentation } from '@agent-device/capture-kit/ios-snapshot-engine'; +import { buildIosInteractiveSnapshotPresentation } from './semantic-index.ts'; test('publishes an exact representative for every semantic source index', () => { const nodes: RawSnapshotNode[] = [ diff --git a/packages/capture-kit/src/ios-snapshot-engine/presentation.test.ts b/packages/capture-kit/src/ios-snapshot-engine/semantic-index-presentation.test.ts similarity index 99% rename from packages/capture-kit/src/ios-snapshot-engine/presentation.test.ts rename to packages/capture-kit/src/ios-snapshot-engine/semantic-index-presentation.test.ts index d7d8ac9bd8..738b0977d6 100644 --- a/packages/capture-kit/src/ios-snapshot-engine/presentation.test.ts +++ b/packages/capture-kit/src/ios-snapshot-engine/semantic-index-presentation.test.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest'; import { attachRefs, type RawSnapshotNode } from '@agent-device/kernel/snapshot'; -import { buildIosInteractiveSnapshotPresentation } from '@agent-device/capture-kit/ios-snapshot-engine'; +import { buildIosInteractiveSnapshotPresentation } from './semantic-index.ts'; function buildSnapshotState(data: { nodes?: RawSnapshotNode[]; backend?: 'xctest' }) { return { diff --git a/packages/capture-kit/src/snapshot/snapshot-presentation/ios/transitions.fixtures.ts b/packages/capture-kit/src/ios-snapshot-engine/transitions.fixtures.ts similarity index 100% rename from packages/capture-kit/src/snapshot/snapshot-presentation/ios/transitions.fixtures.ts rename to packages/capture-kit/src/ios-snapshot-engine/transitions.fixtures.ts diff --git a/packages/capture-kit/src/recording/__tests__/recording-scripts.test.ts b/packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts similarity index 100% rename from packages/capture-kit/src/recording/__tests__/recording-scripts.test.ts rename to packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts diff --git a/packages/capture-kit/src/snapshot-sibling-sized-chrome.test.ts b/packages/capture-kit/src/snapshot-occlusion-sibling-sized-chrome.test.ts similarity index 100% rename from packages/capture-kit/src/snapshot-sibling-sized-chrome.test.ts rename to packages/capture-kit/src/snapshot-occlusion-sibling-sized-chrome.test.ts diff --git a/packages/capture-kit/src/snapshot/__tests__/snapshot-actions-identity.test.ts b/packages/capture-kit/src/snapshot/__tests__/snapshot-diff-actions-identity.test.ts similarity index 100% rename from packages/capture-kit/src/snapshot/__tests__/snapshot-actions-identity.test.ts rename to packages/capture-kit/src/snapshot/__tests__/snapshot-diff-actions-identity.test.ts diff --git a/packages/capture-kit/src/snapshot/__tests__/ax-digest.test.ts b/packages/capture-kit/src/snapshot/__tests__/snapshot-evidence-ax-digest.test.ts similarity index 100% rename from packages/capture-kit/src/snapshot/__tests__/ax-digest.test.ts rename to packages/capture-kit/src/snapshot/__tests__/snapshot-evidence-ax-digest.test.ts diff --git a/packages/capture-kit/src/snapshot/__tests__/snapshot-freshness.test.ts b/packages/capture-kit/src/snapshot/snapshot-freshness/android.test.ts similarity index 97% rename from packages/capture-kit/src/snapshot/__tests__/snapshot-freshness.test.ts rename to packages/capture-kit/src/snapshot/snapshot-freshness/android.test.ts index 7a07719d73..d4cd87bbc7 100644 --- a/packages/capture-kit/src/snapshot/__tests__/snapshot-freshness.test.ts +++ b/packages/capture-kit/src/snapshot/snapshot-freshness/android.test.ts @@ -7,8 +7,8 @@ import { buildSnapshotSignatures, isLikelySnapshotStuckOnPreviousRoute, isLikelyStaleSnapshotDrop, -} from '../snapshot-freshness/android.ts'; -import type { SnapshotFreshnessWindow } from '../snapshot-freshness/index.ts'; +} from './android.ts'; +import type { SnapshotFreshnessWindow } from './index.ts'; function labeledNodes(count: number, prefix = 'item'): RawSnapshotNode[] { return Array.from({ length: count }, (_, index) => ({ diff --git a/packages/capture-kit/src/snapshot/__tests__/snapshot-freshness-recovery.test.ts b/packages/capture-kit/src/snapshot/snapshot-freshness/recovery.test.ts similarity index 96% rename from packages/capture-kit/src/snapshot/__tests__/snapshot-freshness-recovery.test.ts rename to packages/capture-kit/src/snapshot/snapshot-freshness/recovery.test.ts index 14b0174b76..2e66afa4a7 100644 --- a/packages/capture-kit/src/snapshot/__tests__/snapshot-freshness-recovery.test.ts +++ b/packages/capture-kit/src/snapshot/snapshot-freshness/recovery.test.ts @@ -2,11 +2,8 @@ import assert from 'node:assert/strict'; import { test, vi } from 'vitest'; import type { SnapshotCaptureAnnotations } from '@agent-device/contracts/capture'; import { makeSnapshotState } from '../../snapshot-state.fixtures.ts'; -import { captureFreshnessRecoveredAttempt } from '../snapshot-freshness/recovery.ts'; -import type { - SnapshotFreshnessReason, - SnapshotFreshnessWindow, -} from '../snapshot-freshness/types.ts'; +import { captureFreshnessRecoveredAttempt } from './recovery.ts'; +import type { SnapshotFreshnessReason, SnapshotFreshnessWindow } from './types.ts'; type Attempt = { snapshot: ReturnType; diff --git a/packages/capture-kit/src/snapshot/snapshot-presentation/warnings.test.ts b/packages/capture-kit/src/snapshot/snapshot-presentation/quality-warnings.test.ts similarity index 100% rename from packages/capture-kit/src/snapshot/snapshot-presentation/warnings.test.ts rename to packages/capture-kit/src/snapshot/snapshot-presentation/quality-warnings.test.ts From 991ab1a2901abef35999ffb075591c2943949a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 13:24:48 +0200 Subject: [PATCH 2/2] refactor(capture-kit): split the host-support checks out of the recording scripts test The overlay and contact-sheet unsupported-host checks cover overlay.ts and contact-sheet-frames.ts; they now sit beside those modules' tests. The Swift typecheck and overlay export cases stay in swift-cache-recording-scripts. Co-Authored-By: Claude Opus 5.5 --- .../contact-sheet-frames-host-support.test.ts | 19 ++++++++++++++ .../__tests__/overlay-host-support.test.ts | 11 ++++++++ .../swift-cache-recording-scripts.test.ts | 26 ------------------- 3 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 packages/capture-kit/src/recording/__tests__/contact-sheet-frames-host-support.test.ts create mode 100644 packages/capture-kit/src/recording/__tests__/overlay-host-support.test.ts diff --git a/packages/capture-kit/src/recording/__tests__/contact-sheet-frames-host-support.test.ts b/packages/capture-kit/src/recording/__tests__/contact-sheet-frames-host-support.test.ts new file mode 100644 index 0000000000..f2a0148af5 --- /dev/null +++ b/packages/capture-kit/src/recording/__tests__/contact-sheet-frames-host-support.test.ts @@ -0,0 +1,19 @@ +import { test } from 'vitest'; +import assert from 'node:assert/strict'; +import { AppError } from '@agent-device/kernel/errors'; +import { CONTACT_SHEET_UNSUPPORTED_HOST_REASON } from '../contact-sheet-report.ts'; +import { assertContactSheetHostSupport } from '../contact-sheet-frames.ts'; + +test('contact sheets are explicitly unsupported on non-macOS hosts', () => { + assert.throws( + () => assertContactSheetHostSupport('linux'), + (error: unknown) => { + return ( + error instanceof AppError && + error.code === 'UNSUPPORTED_OPERATION' && + error.details?.reason === CONTACT_SHEET_UNSUPPORTED_HOST_REASON + ); + }, + ); + assert.doesNotThrow(() => assertContactSheetHostSupport('darwin')); +}); diff --git a/packages/capture-kit/src/recording/__tests__/overlay-host-support.test.ts b/packages/capture-kit/src/recording/__tests__/overlay-host-support.test.ts new file mode 100644 index 0000000000..1fb0affc74 --- /dev/null +++ b/packages/capture-kit/src/recording/__tests__/overlay-host-support.test.ts @@ -0,0 +1,11 @@ +import { test } from 'vitest'; +import assert from 'node:assert/strict'; +import { getRecordingOverlaySupportWarning } from '../overlay.ts'; + +test('recording overlays are explicitly unsupported on non-macOS hosts', () => { + assert.equal( + getRecordingOverlaySupportWarning('linux'), + 'touch overlay burn-in is only available on macOS hosts; returning raw video plus gesture telemetry', + ); + assert.equal(getRecordingOverlaySupportWarning('darwin'), undefined); +}); diff --git a/packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts b/packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts index 0c89771a35..4e369b67fc 100644 --- a/packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts +++ b/packages/capture-kit/src/recording/__tests__/swift-cache-recording-scripts.test.ts @@ -5,10 +5,6 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { PNG } from 'pngjs'; import { runCmd } from '@agent-device/host-kit/command'; -import { AppError } from '@agent-device/kernel/errors'; -import { CONTACT_SHEET_UNSUPPORTED_HOST_REASON } from '../contact-sheet-report.ts'; -import { assertContactSheetHostSupport } from '../contact-sheet-frames.ts'; -import { getRecordingOverlaySupportWarning } from '../overlay.ts'; import { mkdtempForTest } from '../../tmp-dir.fixtures.ts'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -220,25 +216,3 @@ function assertTypechecked(outcomes: readonly TypecheckOutcome[], basename: stri assert.ok(outcome, `${basename} was never typechecked`); assert.equal(outcome.exitCode, 0, `${basename} should typecheck\n${outcome.stderr}`); } - -test('recording overlays are explicitly unsupported on non-macOS hosts', () => { - assert.equal( - getRecordingOverlaySupportWarning('linux'), - 'touch overlay burn-in is only available on macOS hosts; returning raw video plus gesture telemetry', - ); - assert.equal(getRecordingOverlaySupportWarning('darwin'), undefined); -}); - -test('contact sheets are explicitly unsupported on non-macOS hosts', () => { - assert.throws( - () => assertContactSheetHostSupport('linux'), - (error: unknown) => { - return ( - error instanceof AppError && - error.code === 'UNSUPPORTED_OPERATION' && - error.details?.reason === CONTACT_SHEET_UNSUPPORTED_HOST_REASON - ); - }, - ); - assert.doesNotThrow(() => assertContactSheetHostSupport('darwin')); -});