fix(replay): publish recordings after suite archive copy

Merged
TH
1d ago
+628-96

Summary

Stacked on #5099. Refs #4970 and #5104. Remote test --record-video copies verified recordings into the suite archive before publishing standalone IDs.

Before / after

  • The suite reports IDs for recordings collected before it responds. The producing lease can download them after archive consumption. Detached cleanup leaves its files on the daemon host.
  • Copying starts after close succeeds and releases the device lock. A collection failure rolls back partial copies and adds a warning while preserving the test outcome.
  • Public callers without a destination receive relative or basename-only paths. Remote failure paths use the same projection. Trusted requests with a client destination use a unique archive under the session directory.
  • Attempt results add only recording paths produced during cleanup.

Validation

  • Stacked on #5099 at 9f44fe308b. At 58d16d8c5f, 32 focused tests and typecheck passed. The failed-close regression reproduced copying before the fix and now verifies the export stays on the host. All 13 runnable affected checks passed with exactCommit: true.
  • Live at bfd9e77132 on Android 16. The HTTP suite passed 1/1 and all 229 video frames decoded. The standalone GET returned 401 without the lease and 200 with it after archive consumption. The bytes matched, and both consumed IDs returned RESOURCE_EXPIRED. Direct stop delivered a decodable MP4 and telemetry. The test session and daemon closed, and the emulator shut down.