From 493c4298078fa2b6c1c9d2bd920ef78d31d6be3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 22 Jul 2026 17:14:38 +0200 Subject: [PATCH 1/2] chore: remove dead type re-exports and gate unused-types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clears the 72 `unused-types` findings left by #1363 and flips `rules.unused-types` from `warn` to `error` so new ones cannot creep in. Every fallow detector is now at zero. 71 of the findings were re-export lines (`export type { X } from './y.ts'` with no importer of X through that path); one was a direct declaration (`HelpTopicName`, zero references anywhere). Removing them cascaded, which is the point: imports that existed only to feed a re-export became unused (8 of them, caught by `noUnusedLocals`), and clearing those exposed a further chain through `command-projection.ts` -> `batch/index.ts` -> `batch/projection.ts`. Also updated a comment in `batch-policy.ts` that described the `command-surface.ts` re-export path this removes, and dropped two `export type {}` husks left where every name in a block was dead. One finding was NOT what it looked like: fallow flagged `DebugSymbolsOptions` and `DebugSymbolsResult` in `apple/core/debug-symbols/types.ts`, but removing them broke `apple/core/debug-symbols.ts`, which re-exported them from there. Both ends were dead — every real consumer imports from `contracts/debug-symbols.ts` — so the fix was removing the intermediate re-export too, not restoring the leaf. Safety: the published type surface is unchanged. All 11 entry points in package.json#exports export exactly the same names before and after. Two chunk files differ only because `AndroidSnapshotBackendMetadata` relocated between internal code-splitting chunks, which is not a consumer-visible boundary. --- .fallowrc.json | 2 +- src/batch-policy.ts | 5 ++--- src/cli-schema/command-schema.ts | 7 +++---- src/cli/commands/router.ts | 6 +----- src/cli/parser/cli-help.ts | 2 -- src/commands/batch/index.ts | 1 - src/commands/capture/runtime/snapshot.ts | 2 -- src/commands/cli-grammar/flag-types.ts | 2 +- src/commands/cli-grammar/types.ts | 6 +----- src/commands/command-projection.ts | 4 +--- src/commands/command-surface.ts | 3 +-- src/commands/index.ts | 9 +-------- src/commands/interaction/runtime/interactions.ts | 4 +--- src/commands/interaction/runtime/resolution.ts | 2 +- src/compat/maestro/daemon-runtime-port.ts | 6 +----- src/daemon/handlers/record-trace-recording.ts | 2 -- src/daemon/lease-context.ts | 3 +-- src/daemon/types.ts | 4 ---- src/kernel/contracts.ts | 7 ------- src/metro/client-metro.ts | 5 +---- src/platforms/android/perf-frame.ts | 1 - src/platforms/android/perf-native.ts | 12 +----------- src/platforms/android/perf.ts | 6 ------ src/platforms/android/snapshot-helper-types.ts | 3 --- src/platforms/android/snapshot-helper.ts | 4 ---- src/platforms/apple/core/debug-symbols.ts | 8 -------- src/platforms/apple/core/debug-symbols/types.ts | 3 --- src/platforms/apple/core/runner/runner-xctestrun.ts | 2 -- src/remote/remote-config.ts | 5 ----- src/runtime.ts | 3 --- src/screenshot-diff/screenshot-diff-regions.ts | 2 -- src/selectors/index.ts | 4 ++-- 32 files changed, 20 insertions(+), 115 deletions(-) diff --git a/.fallowrc.json b/.fallowrc.json index 3c95238b55..252772caea 100644 --- a/.fallowrc.json +++ b/.fallowrc.json @@ -183,7 +183,7 @@ "isExpired" ], "rules": { - "unused-types": "warn", + "unused-types": "error", "duplicate-exports": "off" }, "production": { diff --git a/src/batch-policy.ts b/src/batch-policy.ts index 60a056b93c..49ebaa91a6 100644 --- a/src/batch-policy.ts +++ b/src/batch-policy.ts @@ -10,9 +10,8 @@ import { AppError } from './kernel/errors.ts'; * literal `batchable`. Extracting the entries whose `batchable` is `true` and * indexing their `name` reconstructs this union from the same single source the * runtime allowlist below is built from — no hand-maintained list to drift. The - * downstream contracts (`BatchCommandName`, re-exported from `command-surface.ts`, - * and the `satisfies readonly DaemonCommandName[]` guard in - * `commands/batch/projection.ts`) are still enforced by `tsc`. + * downstream contracts (`BatchCommandName` in `commands/batch/projection.ts` and + * its `satisfies readonly DaemonCommandName[]` guard) are still enforced by `tsc`. */ export type StructuredBatchCommandName = Extract< (typeof commandDescriptors)[number], diff --git a/src/cli-schema/command-schema.ts b/src/cli-schema/command-schema.ts index c8b9c7fcfa..b1297a59f9 100644 --- a/src/cli-schema/command-schema.ts +++ b/src/cli-schema/command-schema.ts @@ -1,6 +1,6 @@ import type { CliCommandName } from '../command-catalog.ts'; import { listCommandMetadata } from '../commands/command-metadata.ts'; -import type { CommandSchema, CommandSchemaOverride } from './types.ts'; +import type { CommandSchema } from './types.ts'; import { getCliCommandOverride, getSchemaOnlyCliCommandSchema } from './command-overrides.ts'; import { getFlagDefinition, getFlagDefinitions } from '../commands/cli-grammar/flag-registry.ts'; import { @@ -9,13 +9,12 @@ import { } from '../commands/cli-grammar/flag-groups.ts'; import { type CliFlags, - type DaemonExcludedCliFlag, type FlagDefinition, type FlagKey, } from '../commands/cli-grammar/flag-types.ts'; -export type { CliFlags, DaemonExcludedCliFlag, FlagDefinition, FlagKey }; -export type { CommandSchema, CommandSchemaOverride }; +export type { CliFlags, FlagDefinition, FlagKey }; +export type { CommandSchema }; export { getFlagDefinition, getFlagDefinitions, GLOBAL_FLAG_KEYS }; const COMMAND_SCHEMA_BASES = new Map( diff --git a/src/cli/commands/router.ts b/src/cli/commands/router.ts index 2b491825fb..ea9b86a527 100644 --- a/src/cli/commands/router.ts +++ b/src/cli/commands/router.ts @@ -10,11 +10,7 @@ import { replayCommand } from './replay.ts'; import { screenshotCommand, diffCommand } from './screenshot.ts'; import type { ClientCommandHandlerMap, ClientCommandParams } from './router-types.ts'; -export type { - ClientCommandHandler, - ClientCommandHandlerMap, - ClientCommandParams, -} from './router-types.ts'; +export type { ClientCommandParams } from './router-types.ts'; const dedicatedCliCommandHandlers = { connect: connectCommand, diff --git a/src/cli/parser/cli-help.ts b/src/cli/parser/cli-help.ts index 30f2fc79cb..8a2e75160d 100644 --- a/src/cli/parser/cli-help.ts +++ b/src/cli/parser/cli-help.ts @@ -1097,8 +1097,6 @@ Report: }, } as const satisfies Record; -export type HelpTopicName = keyof typeof HELP_TOPICS; - function formatCommandListArg(commandName: string, schema: CommandSchema, arg: string): string { const optional = arg.endsWith('?'); const name = optional ? arg.slice(0, -1) : arg; diff --git a/src/commands/batch/index.ts b/src/commands/batch/index.ts index 0bd7d82ad5..6b2066c5b8 100644 --- a/src/commands/batch/index.ts +++ b/src/commands/batch/index.ts @@ -47,7 +47,6 @@ export const batchCommandFamily = defineCommandFamilyFromFacets({ }); export { createBatchDaemonWriter }; -export type { BatchCommandName } from './projection.ts'; function toBatchOptions(input: BatchInput): BatchRunOptions { return { diff --git a/src/commands/capture/runtime/snapshot.ts b/src/commands/capture/runtime/snapshot.ts index 5dc6ee6ecd..8e54d03d85 100644 --- a/src/commands/capture/runtime/snapshot.ts +++ b/src/commands/capture/runtime/snapshot.ts @@ -34,8 +34,6 @@ import type { } from '../../runtime-types.ts'; import { now } from '../../runtime-common.ts'; -export type { SnapshotDiffLine, SnapshotDiffSummary } from '../../../snapshot/snapshot-diff.ts'; - export type SnapshotCommandResult = { nodes: SnapshotNode[]; truncated: boolean; diff --git a/src/commands/cli-grammar/flag-types.ts b/src/commands/cli-grammar/flag-types.ts index a6004078de..979186d4b0 100644 --- a/src/commands/cli-grammar/flag-types.ts +++ b/src/commands/cli-grammar/flag-types.ts @@ -1,6 +1,6 @@ import type { CliFlags } from '../../contracts/cli-flags.ts'; -export type { CliFlags, DaemonExcludedCliFlag } from '../../contracts/cli-flags.ts'; +export type { CliFlags } from '../../contracts/cli-flags.ts'; export type FlagKey = keyof CliFlags; type FlagType = 'boolean' | 'int' | 'enum' | 'string' | 'booleanOrString'; diff --git a/src/commands/cli-grammar/types.ts b/src/commands/cli-grammar/types.ts index 1bcf8159c5..d37e85e450 100644 --- a/src/commands/cli-grammar/types.ts +++ b/src/commands/cli-grammar/types.ts @@ -1,9 +1,7 @@ -import type { InteractionTarget, InternalRequestOptions } from '../../client/client-types.ts'; +import type { InternalRequestOptions } from '../../client/client-types.ts'; import type { CommandFlags } from '../../core/dispatch-context.ts'; import type { CliFlags } from './flag-types.ts'; import type { ClickButton } from '../../core/click-button.ts'; -import type { DecodedFillTarget } from '../../core/interaction-positionals.ts'; -import type { WaitParsed } from '../../core/wait-positionals.ts'; export type DaemonCommandRequest = { command: string; @@ -88,5 +86,3 @@ export type SelectionOptions = { export type CliInput = Record; export type CliReader = (positionals: string[], flags: CliFlags) => CliInput; export type DaemonWriter = (input: CommandInput) => DaemonCommandRequest; - -export type { DecodedFillTarget, InteractionTarget, WaitParsed }; diff --git a/src/commands/command-projection.ts b/src/commands/command-projection.ts index 26b9bd9845..e131b33343 100644 --- a/src/commands/command-projection.ts +++ b/src/commands/command-projection.ts @@ -1,4 +1,4 @@ -import { createBatchDaemonWriter, type BatchCommandName } from './batch/index.ts'; +import { createBatchDaemonWriter } from './batch/index.ts'; import type { CommandInput, DaemonCommandRequest, DaemonWriter } from './cli-grammar/types.ts'; import { findCommandMetadata } from './command-metadata.ts'; import { readMetadataCommandFlags } from './command-flags.ts'; @@ -12,8 +12,6 @@ const daemonWriters: Record = { export type DaemonCommandName = keyof typeof daemonWriters; -export type { BatchCommandName }; - function prepareBatchDaemonCommandRequest( command: string, input: CommandInput, diff --git a/src/commands/command-surface.ts b/src/commands/command-surface.ts index fe680a35df..2a707fafde 100644 --- a/src/commands/command-surface.ts +++ b/src/commands/command-surface.ts @@ -1,11 +1,10 @@ import type { AgentDeviceClient } from '../client/client-types.ts'; import { listCommandFamilyDefinitions, type CommandFamilyDefinition } from './family/registry.ts'; -import type { BatchCommandName } from './command-projection.ts'; import type { CommandName } from './command-metadata.ts'; const commandSurface = listCommandFamilyDefinitions(); -export type { BatchCommandName, CommandName }; +export type { CommandName }; type CommandDefinitionFor = Extract< CommandFamilyDefinition, diff --git a/src/commands/index.ts b/src/commands/index.ts index 4a48ef689c..27b4790f17 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -44,14 +44,7 @@ import { type SystemCommands, } from './system/runtime/index.ts'; -export type { - BoundRuntimeCommand, - CommandResult, - DiffSnapshotCommandOptions, - RuntimeCommand, - ScreenshotCommandOptions, - SnapshotCommandOptions, -} from './runtime-types.ts'; +export type { ScreenshotCommandOptions } from './runtime-types.ts'; export type AgentDeviceCommands = { capture: CaptureCommands; diff --git a/src/commands/interaction/runtime/interactions.ts b/src/commands/interaction/runtime/interactions.ts index e33e2c6dce..b6905c4829 100644 --- a/src/commands/interaction/runtime/interactions.ts +++ b/src/commands/interaction/runtime/interactions.ts @@ -35,14 +35,12 @@ export { focusCommand, longPressCommand, scrollCommand } from './gestures.ts'; export type { FocusCommandOptions, FocusCommandResult, - GestureDirection, LongPressCommandOptions, LongPressCommandResult, ScrollCommandOptions, ScrollCommandResult, - ScrollTarget, } from './gestures.ts'; -export type { InteractionTarget, PointTarget, ResolvedInteractionTarget } from './resolution.ts'; +export type { InteractionTarget } from './resolution.ts'; export type PressCommandOptions = CommandContext & RepeatedInput & { diff --git a/src/commands/interaction/runtime/resolution.ts b/src/commands/interaction/runtime/resolution.ts index 81ee20034f..5194eb6448 100644 --- a/src/commands/interaction/runtime/resolution.ts +++ b/src/commands/interaction/runtime/resolution.ts @@ -48,7 +48,7 @@ import { type ReplayTargetGuardDenotation, } from '../../../replay/target-identity-node.ts'; -export type { InteractionTarget, PointTarget, ResolvedInteractionTarget }; +export type { InteractionTarget, ResolvedInteractionTarget }; /** * ADR 0012 migration step 4, post-resolution guard: the LOCAL identity AND diff --git a/src/compat/maestro/daemon-runtime-port.ts b/src/compat/maestro/daemon-runtime-port.ts index 01cb68224c..d78802714f 100644 --- a/src/compat/maestro/daemon-runtime-port.ts +++ b/src/compat/maestro/daemon-runtime-port.ts @@ -61,11 +61,7 @@ import type { MaestroPublicOperation, } from './daemon-runtime-public-operation.ts'; -export type { DaemonMaestroRuntimeDependencies } from './daemon-runtime-port-observation.ts'; -export type { - CreateDaemonMaestroRuntimeOperationsOptions, - DaemonMaestroRuntimeBaseRequest, -} from './daemon-runtime-port-support.ts'; +export type { CreateDaemonMaestroRuntimeOperationsOptions } from './daemon-runtime-port-support.ts'; function createDaemonMaestroRuntimeParts(options: CreateDaemonMaestroRuntimeOperationsOptions): { operations: MaestroRuntimeOperations; diff --git a/src/daemon/handlers/record-trace-recording.ts b/src/daemon/handlers/record-trace-recording.ts index b04e12afba..e3ae700197 100644 --- a/src/daemon/handlers/record-trace-recording.ts +++ b/src/daemon/handlers/record-trace-recording.ts @@ -42,8 +42,6 @@ const IOS_DEVICE_RECORD_MIN_FPS = 1; const IOS_DEVICE_RECORD_MAX_FPS = 120; const IOS_SIMULATOR_RECORDING_TAIL_SETTLE_MS = 350; -export type { RecordTraceDeps, RecordingBase } from './record-trace-types.ts'; - type StartRecordingParams = { req: DaemonRequest; sessionName: string; diff --git a/src/daemon/lease-context.ts b/src/daemon/lease-context.ts index 2928694faf..25ecfa01f0 100644 --- a/src/daemon/lease-context.ts +++ b/src/daemon/lease-context.ts @@ -8,12 +8,11 @@ import { findMissingProxyLeaseFields, isProxyLeaseScope, leaseScopeFromRequest, - type LeaseDiagnosticsContext, type LeaseScope, } from '../core/lease-scope.ts'; export { DEFAULT_PROXY_LEASE_TTL_MS, findMissingProxyLeaseFields, isProxyLeaseScope }; -export type { LeaseDiagnosticsContext, LeaseScope }; +export type { LeaseScope }; export type SessionLease = { tenantId: string; diff --git a/src/daemon/types.ts b/src/daemon/types.ts index c986f2217f..b1482b9bd1 100644 --- a/src/daemon/types.ts +++ b/src/daemon/types.ts @@ -34,13 +34,9 @@ import type { import type { AudioProbeSource } from '../audio-probe-result.ts'; import type { SnapshotDiagnosticsState } from '../snapshot-diagnostics.ts'; export type { - ReplaySuiteAttemptFailure, ReplaySuiteResult, ReplaySuiteTestFailed, - ReplaySuiteTestPassed, ReplaySuiteTestResult, - ReplaySuiteTestSkipped, - ReplaySuiteTestSkipReason, } from '../contracts/replay.ts'; export type DaemonInstallSource = PublicDaemonInstallSource; diff --git a/src/kernel/contracts.ts b/src/kernel/contracts.ts index f0dc07f010..a225df1309 100644 --- a/src/kernel/contracts.ts +++ b/src/kernel/contracts.ts @@ -1,12 +1,5 @@ export type { AppErrorCode } from './errors.ts'; export { defaultHintForCode, normalizeError } from './errors.ts'; -export type { - DebugSymbolsCrashFrame, - DebugSymbolsCrashSummary, - DebugSymbolsImage, - DebugSymbolsOptions, - DebugSymbolsResult, -} from '../contracts/debug-symbols.ts'; import type { PlatformSelector } from './device.ts'; export type SessionRuntimeHints = { diff --git a/src/metro/client-metro.ts b/src/metro/client-metro.ts index a9a8e6faf6..c3642c0583 100644 --- a/src/metro/client-metro.ts +++ b/src/metro/client-metro.ts @@ -34,10 +34,7 @@ type ResolvedMetroKind = Exclude; type EnvSource = NodeJS.ProcessEnv | Record; type RepackBundlerKind = 'rspack' | 'webpack'; -export type { - CompanionTunnelScope, - MetroBridgeScope, -} from '../client/client-companion-tunnel-contract.ts'; +export type { MetroBridgeScope } from '../client/client-companion-tunnel-contract.ts'; type PackageManagerConfig = { command: string; diff --git a/src/platforms/android/perf-frame.ts b/src/platforms/android/perf-frame.ts index 4ec2c788a6..56dc03963e 100644 --- a/src/platforms/android/perf-frame.ts +++ b/src/platforms/android/perf-frame.ts @@ -6,7 +6,6 @@ import { parseAndroidFramePerfSample, type AndroidFramePerfSample } from './perf export { ANDROID_FRAME_SAMPLE_DESCRIPTION, ANDROID_FRAME_SAMPLE_METHOD, - type AndroidFrameDropWindow, type AndroidFramePerfSample, } from './perf-frame-parser.ts'; diff --git a/src/platforms/android/perf-native.ts b/src/platforms/android/perf-native.ts index d2038046ac..50b288c2f6 100644 --- a/src/platforms/android/perf-native.ts +++ b/src/platforms/android/perf-native.ts @@ -5,14 +5,4 @@ export { stopAndroidSimpleperfProfile, writeAndroidSimpleperfReport, } from './perf-native-simpleperf.ts'; -export type { - AndroidNativePerfKind, - AndroidNativePerfOptions, - AndroidNativePerfFrameHealthSummary, - AndroidNativePerfSession, - AndroidNativePerfStartResult, - AndroidNativePerfStopResult, - AndroidNativePerfStopSummary, - AndroidNativePerfType, - AndroidSimpleperfReportResult, -} from './perf-native-types.ts'; +export type { AndroidNativePerfKind, AndroidNativePerfSession } from './perf-native-types.ts'; diff --git a/src/platforms/android/perf.ts b/src/platforms/android/perf.ts index 3d63ce79c3..c421bcd674 100644 --- a/src/platforms/android/perf.ts +++ b/src/platforms/android/perf.ts @@ -16,8 +16,6 @@ export { ANDROID_FRAME_SAMPLE_METHOD, resetAndroidFramePerfStats, sampleAndroidFramePerf, - type AndroidFrameDropWindow, - type AndroidFramePerfSample, } from './perf-frame.ts'; export { cleanupAndroidNativePerfSession, @@ -28,10 +26,6 @@ export { writeAndroidSimpleperfReport, type AndroidNativePerfKind, type AndroidNativePerfSession, - type AndroidNativePerfStartResult, - type AndroidNativePerfStopResult, - type AndroidNativePerfType, - type AndroidSimpleperfReportResult, } from './perf-native.ts'; export const ANDROID_CPU_SAMPLE_METHOD = 'adb-shell-dumpsys-cpuinfo'; diff --git a/src/platforms/android/snapshot-helper-types.ts b/src/platforms/android/snapshot-helper-types.ts index e85f6c427e..2fb115da97 100644 --- a/src/platforms/android/snapshot-helper-types.ts +++ b/src/platforms/android/snapshot-helper-types.ts @@ -1,5 +1,4 @@ import type { AndroidAdbExecutor, AndroidAdbProvider } from './adb-executor.ts'; -import type { AndroidSnapshotBackendMetadata } from './snapshot-types.ts'; export type AndroidSnapshotHelperTransport = 'instrumentation' | 'persistent-session'; export type AndroidSnapshotCaptureMode = 'interactive-windows' | 'active-window'; @@ -99,5 +98,3 @@ export type AndroidSnapshotHelperOutput = { xml: string; metadata: AndroidSnapshotHelperMetadata; }; - -export type { AndroidSnapshotBackendMetadata }; diff --git a/src/platforms/android/snapshot-helper.ts b/src/platforms/android/snapshot-helper.ts index 5af886b356..7b0f6f548b 100644 --- a/src/platforms/android/snapshot-helper.ts +++ b/src/platforms/android/snapshot-helper.ts @@ -15,11 +15,7 @@ export { ANDROID_SNAPSHOT_HELPER_WAIT_FOR_IDLE_TIMEOUT_MS } from './snapshot-hel export type { AndroidAdbExecutor, AndroidSnapshotHelperArtifact, - AndroidSnapshotHelperCaptureOptions, AndroidSnapshotHelperInstallPolicy, AndroidSnapshotHelperInstallResult, - AndroidSnapshotHelperManifest, - AndroidSnapshotHelperMetadata, AndroidSnapshotHelperOutput, } from './snapshot-helper-types.ts'; -export type { AndroidSnapshotBackendMetadata } from './snapshot-types.ts'; diff --git a/src/platforms/apple/core/debug-symbols.ts b/src/platforms/apple/core/debug-symbols.ts index e297ad1074..b8e6326ec6 100644 --- a/src/platforms/apple/core/debug-symbols.ts +++ b/src/platforms/apple/core/debug-symbols.ts @@ -7,14 +7,6 @@ import { resolveAppleTools, symbolicateAddresses } from './debug-symbols/symboli import type { DebugSymbolsOptions, DebugSymbolsResult } from '../../../contracts/debug-symbols.ts'; import { AppError } from '../../../kernel/errors.ts'; -export type { - DebugSymbolsCrashFrame, - DebugSymbolsCrashSummary, - DebugSymbolsImage, - DebugSymbolsOptions, - DebugSymbolsResult, -} from './debug-symbols/types.ts'; - const MAX_CRASH_ARTIFACT_BYTES = 64 * 1024 * 1024; export async function symbolicateCrashArtifact( diff --git a/src/platforms/apple/core/debug-symbols/types.ts b/src/platforms/apple/core/debug-symbols/types.ts index 512b397b06..6d9653bd89 100644 --- a/src/platforms/apple/core/debug-symbols/types.ts +++ b/src/platforms/apple/core/debug-symbols/types.ts @@ -1,9 +1,6 @@ export type { DebugSymbolsCrashFrame, DebugSymbolsCrashSummary, - DebugSymbolsImage, - DebugSymbolsOptions, - DebugSymbolsResult, } from '../../../../contracts/debug-symbols.ts'; export type AppleImage = { diff --git a/src/platforms/apple/core/runner/runner-xctestrun.ts b/src/platforms/apple/core/runner/runner-xctestrun.ts index 8d4f5c7fc9..7d19f11b29 100644 --- a/src/platforms/apple/core/runner/runner-xctestrun.ts +++ b/src/platforms/apple/core/runner/runner-xctestrun.ts @@ -9,7 +9,6 @@ export { } from './runner-artifact.ts'; export { markRunnerXctestrunArtifactBadForRun, - type ExistingXctestrunState, type RunnerXctestrunCacheKind, } from './runner-cache.ts'; export { @@ -17,6 +16,5 @@ export { resolveExpectedRunnerCacheMetadata, resolveRunnerAppBundleId, resolveRunnerDerivedPath, - type RunnerXctestrunCacheMetadata, } from './runner-cache-metadata.ts'; export { acquireXcodebuildSimulatorSetRedirect } from './runner-device-set.ts'; diff --git a/src/remote/remote-config.ts b/src/remote/remote-config.ts index 2cdf1c4122..376bcd5d41 100644 --- a/src/remote/remote-config.ts +++ b/src/remote/remote-config.ts @@ -1,6 +1 @@ -export type { - RemoteConfigProfile, - RemoteConfigProfileOptions, - ResolvedRemoteConfigProfile, -} from './remote-config-schema.ts'; export { resolveRemoteConfigProfile } from './remote-config-core.ts'; diff --git a/src/runtime.ts b/src/runtime.ts index 8863621217..634df009fb 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -10,12 +10,9 @@ import type { export type { AgentDeviceRuntime, AgentDeviceRuntimeConfig, - CommandClock, - CommandContext, CommandPolicy, CommandSessionRecord, CommandSessionStore, - DiagnosticsSink, } from './runtime-contract.ts'; export type AgentDevice = AgentDeviceRuntime & BoundAgentDeviceCommands; diff --git a/src/screenshot-diff/screenshot-diff-regions.ts b/src/screenshot-diff/screenshot-diff-regions.ts index a29cbc4d1f..055391bb0b 100644 --- a/src/screenshot-diff/screenshot-diff-regions.ts +++ b/src/screenshot-diff/screenshot-diff-regions.ts @@ -5,8 +5,6 @@ import { findConnectedMaskComponents } from './screenshot-diff-components.ts'; import { splitLargeDiffRegions } from './screenshot-diff-region-split.ts'; import type { MutableDiffRegion } from './screenshot-diff-region-types.ts'; -export type { MutableDiffRegion } from './screenshot-diff-region-types.ts'; - type ScreenshotDiffColor = { r: number; g: number; diff --git a/src/selectors/index.ts b/src/selectors/index.ts index 6365a8ff3b..37a670ba23 100644 --- a/src/selectors/index.ts +++ b/src/selectors/index.ts @@ -1,5 +1,5 @@ -export type { Selector, SelectorChain } from './arguments.ts'; -export type { SelectorDiagnostics, SelectorResolution, SelectorChainMatchList } from './resolve.ts'; +export type { Selector } from './arguments.ts'; +export type { SelectorDiagnostics, SelectorResolution } from './resolve.ts'; export { parseSelectorChain, From f1275ea8bd243937e473097b375e8e2ebdcc9f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 22 Jul 2026 17:40:41 +0200 Subject: [PATCH 2/2] chore: prune fallow suppressions that no longer suppress anything The whole point of this arc was that fallow looked clean mainly because of its own ignore list, so the list itself deserved an audit. Emptying `ignoreExports` and re-running shows most entries no longer match a real finding: 20 blocks collapse to 5, with no change in what either fallow invocation reports. Removed 8 fully-stale blocks. They went stale for three different reasons: - code moved (`assertSafeDerivedCleanup` is exported from runner-cache.ts, not the runner-xctestrun.ts the suppression named), - the exports became genuinely used (apps.ts, runner-contract.ts, runner-session.ts, cloud-webdriver.ts, the test-utils fixtures), - and `installAndroidInstallablePath` was suppressed in two places at once. `app-lifecycle.ts` needed a code fix rather than a suppression: it re-exported three `parseAndroid*` helpers from app-parsers.ts that nothing imports through it, so the re-export is dropped and the block goes away. The two type re-exports on that statement ARE consumed and stay. The seven `src/daemon/handlers/*` blocks are KEPT, collapsed into one documented glob. They are not stale: those handlers are reached only through the dynamic `import()` table in request-handler-chain.ts, which the --production analysis behind `check:production-exports` cannot follow. A first pass removed them because the staleness probe only exercised the default config; the repo runs fallow twice, and `check:production-exports` caught it. --- .fallowrc.json | 109 ++----------------------- src/platforms/android/app-lifecycle.ts | 8 +- 2 files changed, 9 insertions(+), 108 deletions(-) diff --git a/.fallowrc.json b/.fallowrc.json index 252772caea..c1961e7724 100644 --- a/.fallowrc.json +++ b/.fallowrc.json @@ -36,12 +36,6 @@ "@theme" ], "ignoreExports": [ - { - "file": "src/__tests__/test-utils/index.ts", - "exports": [ - "*" - ] - }, { "comment": "Authoritative supported-command list; sole consumer is the conformance oracle (scripts/maestro-conformance, an ignored tooling tree).", "file": "src/compat/maestro/program-ir-command-parser.ts", @@ -50,102 +44,15 @@ ] }, { - "file": "src/__tests__/test-utils/device-fixtures.ts", - "exports": [ - "LINUX_DEVICE", - "ANDROID_TV_DEVICE", - "TVOS_SIMULATOR" - ] - }, - { - "file": "src/platforms/android/app-lifecycle.ts", - "exports": [ - "parseAndroidForegroundApp", - "parseAndroidLaunchablePackages", - "parseAndroidUserInstalledPackages", - "installAndroidInstallablePath" - ] - }, - { - "file": "src/platforms/android/index.ts", - "exports": [ - "installAndroidInstallablePath" - ] - }, - { - "file": "src/platforms/apple/core/apps.ts", - "exports": [ - "listSimulatorApps", - "uninstallIosApp" - ] - }, - { - "file": "src/platforms/apple/core/runner/runner-contract.ts", - "exports": [ - "resolveRunnerEarlyExitHint" - ] - }, - { - "file": "src/platforms/apple/core/runner/runner-session.ts", - "exports": [ - "stopAllIosRunnerSessions" - ] - }, - { - "file": "src/platforms/apple/core/runner/runner-xctestrun.ts", - "exports": [ - "resolveRunnerBuildDestination", - "resolveRunnerAppBundleId", - "resolveRunnerSigningBuildSettings", - "resolveRunnerBundleBuildSettings", - "assertSafeDerivedCleanup" - ] - }, - { - "file": "src/cloud-webdriver.ts", - "exports": [ - "CLOUD_WEBDRIVER_PROVIDERS" - ] - }, - { - "file": "src/daemon/handlers/lease.ts", - "exports": [ - "handleLeaseCommands" - ] - }, - { - "file": "src/daemon/handlers/session.ts", - "exports": [ - "handleSessionCommands" - ] - }, - { - "file": "src/daemon/handlers/snapshot.ts", - "exports": [ - "handleSnapshotCommands" - ] - }, - { - "file": "src/daemon/handlers/react-native.ts", - "exports": [ - "handleReactNativeCommands" - ] - }, - { - "file": "src/daemon/handlers/record-trace.ts", - "exports": [ - "handleRecordTraceCommands" - ] - }, - { - "file": "src/daemon/handlers/find.ts", - "exports": [ - "handleFindCommands" - ] - }, - { - "file": "src/daemon/handlers/interaction.ts", + "comment": "Daemon route handlers are reached only through the dynamic `import()` table in request-handler-chain.ts, which --production analysis cannot follow to a consumer.", + "file": "src/daemon/handlers/{lease,session,snapshot,react-native,record-trace,find,interaction}.ts", "exports": [ + "handleLeaseCommands", + "handleSessionCommands", + "handleSnapshotCommands", + "handleReactNativeCommands", + "handleRecordTraceCommands", + "handleFindCommands", "handleInteractionCommands" ] }, diff --git a/src/platforms/android/app-lifecycle.ts b/src/platforms/android/app-lifecycle.ts index d64169b7dd..267acdba0e 100644 --- a/src/platforms/android/app-lifecycle.ts +++ b/src/platforms/android/app-lifecycle.ts @@ -28,13 +28,7 @@ import { type AndroidForegroundApp, } from './app-parsers.ts'; -export { - parseAndroidForegroundApp, - parseAndroidLaunchablePackages, - parseAndroidUserInstalledPackages, - type AndroidBlockingDialogFocus, - type AndroidForegroundApp, -} from './app-parsers.ts'; +export type { AndroidBlockingDialogFocus, AndroidForegroundApp } from './app-parsers.ts'; const ALIASES: Record = { settings: { type: 'intent', value: 'android.settings.SETTINGS' },