Purpose
Remove unused recording-start trimming and code used only by it. Do not replace it with another media implementation.
On main 508b750fbd9e034e645deffd2ebbf2d62d3cb1f7, completeAppleRecording requests trimming only when both runnerStartedAtUptimeMs and targetAppReadyUptimeMs exist. The current native recordStart response emits neither field, and the simctl path supplies no trim timing. The native recorder timestamps video from its first captured frame. The remaining timing fields are forwarded through contracts and exercised by synthetic tests, with no built-in producer of targetAppReadyUptimeMs found.
The intended behavior was to cut the interval between recorder start and target-app readiness, then shift gesture telemetry by that interval. That operation appears dormant in current built-in paths.
Scope
- Recheck current main and scoped-provider recording implementations for real producers before deletion. Confirm whether any released provider contract relies on these optional fields. If a supported producer exists, document it and resolve that dependency before removing its behavior; do not introduce a speculative compatibility shim.
- Remove the trim branch in
packages/platform-apple/src/recording/completion.ts and src/platform-runtime-screen-recording-finalizer-host.ts.
- Remove
trimRecordingStart, its script resolution/cache variables, and apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift.
- Remove
trimStartMs from internal finalization and telemetry interfaces, and the trim-only event filtering, timestamp shifting and duration clipping in packages/capture-kit/src/recording/telemetry.ts.
- Remove obsolete timing fields and forwarding only after checking their other consumers. In particular, recorder-start timing also participates in gesture-clock calculations; do not delete a live clock anchor merely because trimming used it.
- Remove tests, fixtures, exports, script packaging and documentation references that exist only for the deleted path. Retain recording and telemetry behavior tests.
Keep RecordingExportSupport.swift, swift-cache.ts, native validation, touch overlays and their shared export machinery while they have other callers. Keep output stability, atomic publication, recovery/cleanup ownership and ordinary telemetry normalization.
Acceptance
- No production trim operation or orphaned trim-only contract, helper, fixture, export or packaging entry remains.
- The producer/provider audit is recorded in the PR, with any compatibility decision supported by release evidence.
- Recording start/stop, gesture timing and touch overlays retain current behavior. Validation covers the actual Apple recording paths, including simulator and runner-backed recording where provisioned; record any unavailable target explicitly.
- Focused tests and
pnpm check:affected --run pass; CI supplies required coverage/integration and relevant native evidence. Do not remove tests merely to silence a gate.
Dependencies
Independent of #2566. The proposed Mediabunny work should exclude trimming and should not add a replacement for this dormant feature. If the two changes overlap in finalization or telemetry, land this deletion first or keep edit ownership separate.
Purpose
Remove unused recording-start trimming and code used only by it. Do not replace it with another media implementation.
On main
508b750fbd9e034e645deffd2ebbf2d62d3cb1f7,completeAppleRecordingrequests trimming only when bothrunnerStartedAtUptimeMsandtargetAppReadyUptimeMsexist. The current nativerecordStartresponse emits neither field, and the simctl path supplies no trim timing. The native recorder timestamps video from its first captured frame. The remaining timing fields are forwarded through contracts and exercised by synthetic tests, with no built-in producer oftargetAppReadyUptimeMsfound.The intended behavior was to cut the interval between recorder start and target-app readiness, then shift gesture telemetry by that interval. That operation appears dormant in current built-in paths.
Scope
packages/platform-apple/src/recording/completion.tsandsrc/platform-runtime-screen-recording-finalizer-host.ts.trimRecordingStart, its script resolution/cache variables, andapple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift.trimStartMsfrom internal finalization and telemetry interfaces, and the trim-only event filtering, timestamp shifting and duration clipping inpackages/capture-kit/src/recording/telemetry.ts.Keep
RecordingExportSupport.swift,swift-cache.ts, native validation, touch overlays and their shared export machinery while they have other callers. Keep output stability, atomic publication, recovery/cleanup ownership and ordinary telemetry normalization.Acceptance
pnpm check:affected --runpass; CI supplies required coverage/integration and relevant native evidence. Do not remove tests merely to silence a gate.Dependencies
Independent of #2566. The proposed Mediabunny work should exclude trimming and should not add a replacement for this dormant feature. If the two changes overlap in finalization or telemetry, land this deletion first or keep edit ownership separate.