Skip to content

NAT-490: Integrate DirectUpload standardization - #148

Merged
eugene-mux merged 5 commits into
feature/nat-335-hevc-standard-ingestfrom
em/nat-490-direct-upload-integration
Aug 24, 2026
Merged

eugene-mux merged 5 commits into
feature/nat-335-hevc-standard-ingestfrom
em/nat-490-direct-upload-integration

Conversation

@eugene-mux

@eugene-mux eugene-mux commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • integrate inspection, planning, conversion, generated-output validation, fallback, and transport startup into DirectUpload
  • replace lock-based inspection and preparation lifecycle coordination with actors and an ordered async command boundary
  • preserve completion-versus-cancellation arbitration and attempt-scoped stale-cancellation protection
  • add storage preflight and owned temporary-output cleanup
  • require explicit conversion intent and probe real source decodability before planning conversion
  • keep AVFoundation sample transfer isolated and serialize reader cancellation with sample consumption

Impact

Eligible inputs can now pass through, convert with the planned codec/HDR behavior, or fall back to the original upload according to the existing confirmation handler contract. Generated output is re-inspected and validated before transport. Cancellation cannot advance a stale attempt or delete files outside the configured temporary-output provider.


Note

High Risk
Changes the core upload preparation path, concurrency model, and media I/O/cancellation behavior; incorrect lifecycle or validation could upload wrong files or leak/delete temp outputs.

Overview
DirectUpload preparation is reworked around Standard Input planning instead of separate rescale-only and non-standard conversion branches. After inspection, the SDK probes device/source capabilities, runs StandardInputPlanner, then either uploads the original, converts with an explicit StandardInputConversion, or fails into the existing nonStandardInputHandler fallback path.

Conversion always receives a non-optional conversion plan; generated files are re-inspected and validated with StandardInputOutputValidator (including new timeline facts from StandardInputTimelineInspector) before transport. Temporary storage preflight reserves space and owned standardized outputs are deleted on cancel, validation failure, or transport failure.

Concurrency moves from locks to actors for inspection operations/registry and preparation lifecycle, plus an ordered DirectUploadLifecycleCommandQueue and DirectUploadTransportCommitCoordinator so start/cancel/commit stay serialized and URL de-duplication stays atomic. AVFoundationUploadInputInspector and sample/timeline readers are async, with reader cancellation coordinated on the consuming task rather than concurrent cancelReading().

Reviewed by Cursor Bugbot for commit c47e2ff. Bugbot is set up for automated code reviews on this repo. Configure here.

@eugene-mux
eugene-mux marked this pull request as ready for review August 19, 2026 21:41
@eugene-mux
eugene-mux requested a review from a team as a code owner August 19, 2026 21:41

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 41af308. Configure here.

@eugene-mux
eugene-mux merged commit 8be8a71 into feature/nat-335-hevc-standard-ingest Aug 24, 2026
6 checks passed
@eugene-mux
eugene-mux deleted the em/nat-490-direct-upload-integration branch August 24, 2026 21:29
eugene-mux added a commit that referenced this pull request Sep 16, 2026
* NAT-481: Add HEVC/4K public API and lock compatibility behavior (#135)

* NAT-481: Add HEVC and 4K public API

* Handle missing iOS simulators

* NAT-482: Add standard input policy evaluator (#136)

* NAT-484: Inspect standard input metadata (#137)

* NAT-485: Inspect GOP and keyframe characteristics (#139)

* NAT-485: Inspect GOP and keyframe characteristics

* NAT-485: Synchronize inspection cancellation

* NAT-486: Plan and validate input standardization (#141)

* NAT-486: Plan and validate input standardization

* Remove ticket references from validation code

* NAT-486: Fix aspect ratio alignment tolerance

* Serialize upload cancellation and transport start

* Refine cancellation lifecycle synchronization

* Isolate upload lifecycle attempts

* Scope inspection cancellation to upload attempts

* NAT-487: Build the codec-preserving reader/writer conversion pipeline (#143)

* NAT-487: Build codec-preserving conversion pipeline

* Coordinate conversion cancellation and failures

* Modernize input standardization concurrency

* Scope standardization cancellation to attempts

* Remove ticket references from test fixtures

* Improve conversion cancellation coverage

* NAT-488: Add Standard Input encoder controls (#145)

* NAT-488: Add Standard Input encoder controls

* Fix edit-list inspection and simulator conversion

* NAT-489: Add HDR tone mapping (#146)

* NAT-490: Integrate DirectUpload standardization (#148)

* NAT-490: Integrate DirectUpload standardization

* Stabilize direct upload fallback test

* Make direct upload lifecycle tests deterministic

* Isolate asynchronous direct upload tests

* Clean up standardized output after upload failure

* NAT-491: Add standardization diagnostic logging (#149)

* NAT-492: Fix acceptance-discovered timeline and pause defects (#151)

* NAT-492: Fix timeline validation and preparation pause

* NAT-492: Archive external fixture test hooks

* Fix deferred inspection test synchronization

* NAT-335: Restart uploads when forceRestart is requested

* NAT-335: Isolate forced restarts from shared upload workers

* NAT-493: Update README and sample app for HEVC and 4K (#153)

* NAT-493: Update README and sample app

* NAT-493: Update DocC API reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants