Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
) The overlay burn-in re-encoded through AVAssetExportPresetMediumQuality, a fixed-canvas preset that caps the long edge at 480px, collapsing any touch recording to ~220x480 (480x220 landscape) and going all-black on long clips, always with exit 0. --hide-touches and an empty gesture list copy the raw capture through, so only the composited path was affected. Both quality tiers now export through the one geometry-preserving preset (HighestQuality); the hardware encoder makes the full-resolution re-encode cheap. The compositor now verifies its own output against the raw before the caller adopts it — resolved track size must match, and a uniformly black track whose raw had visible content is rejected — and throws on failure so the overlay is dropped, the raw kept, and the choice reported as overlayWarning rather than a broken file. Adds an mp4 transform-aware track-size reader and a device-lane assertion that a touched export equals its --hide-touches control.
3e404ec to
717f9f3
Compare
|
Reviewed at 717f9f3. The change is not proven on the route it touches: nobody has run a real record start, tap, record stop sequence at this head, the #2707 completion matrix in the PR body is still open, and the new e2e case in test/integration/recording-overlay.test.ts#L16 only runs under AGENT_DEVICE_RECORDING_E2E. So two things stay unproven: whether the touched export now matches the packages/capture-kit/src/recording/mp4-track-size.ts#L182 nearly duplicates childAtoms in packages/capture-kit/src/recording/mp4-atoms.ts — same MAX_SIBLINGS_PER_LEVEL, same 64-bit size==1 branch, same safe-integer and container-end checks, just walking a Buffer instead of an fd — and it disagrees with the original on size==0 (extend-to-end vs stop-here). This adds about 290 lines of test-only parser, fixtures, and a new package subpath to production capture-kit, to serve one gated integration test, when test/integration/support/recording-inspect.swift already computes the same transform-applied size via AVFoundation ( Not blocking: the #2707-labeled tests in src/platform-runtime-screen-recording-finalizer-host.test.ts#L84 exercise a catch-to-overlayWarning path already on main, not the new Swift checks, and the "unplayable" test's title says "keeping the raw recording" even though overlay.ts#L98 has already renamed the composite over the raw file, so these could use retitling or a check that's red on the old preset, but that's optional either way. All 21 CI checks are green, but none of them runs the AGENT_DEVICE_RECORDING_E2E device lane, so this green run says nothing about the changed export path. I did not reproduce the claim that the MediumQuality preset collapses the track to 220x480; that rests on an offline harness. The 32px size tolerance and the luma thresholds are not calibrated against real encoder output in any test, and a moov with no tkhd falls back to the stsd coded size without applying the transform, so a rot90 track in that case would come back transposed rather than undefined. Please attach the live device run showing the touched size equals the control with no overlayWarning and the 90s clip is not black, and replace the TS MP4 parser with the size recording-inspect.swift can already provide, before this is ready to merge. |
Summary
A
recordclip collapsed to ~220x480(and went all-black on long captures) whenever the touch overlay drew, while exiting 0. The burn-in re-encoded throughAVAssetExportPresetMediumQuality, a fixed-canvas preset that caps the long edge at 480px. The trigger was the overlay path, notrot90inner-panel tracks.overlayWarningonrecord stopinstead of returning a broken file at exit 0.--qualityno longer changes Apple output (it never affected the raw capture and no longer picks a resolution preset); CLI help and website docs corrected.device-verification.mdrot90 claims corrected.@agent-device/capture-kit/recording-mp4-track-sizereader backs the regression test.Closes #2707. 12 files.
Validation
Commit
3e404ec35.pnpm check:affected --runpassed all runnable checks (fallow complexity, full unit suite 11085, layering, package, bundle-owner, packaged-runner-swift, command-docs).An offline AVFoundation harness reproduced the collapse (
1206x2622→220x480, landscape1310x602→480x220) and confirms the fix preserves geometry and rejects black/truncated output. Unit tests cover the MP4 reader (v0/v1 display-vs-coded,rot90, coded fallback, truncated) and the finalizer drop-and-report path.test/integration/recording-overlay.test.tscompares a touched export to a--hide-touchescontrol, asserting equal track size and that the overlay drew.Open risk: re-measuring the completion-condition matrix on a booted non-rot90 simulator and the iPhone Duo inner panel (
AGENT_DEVICE_RECORDING_E2E) is the device-lane step and has not been run here.