Repository navigation
NAT-546: Validate generated media before upload - #169
Merged
eugene-mux merged 12 commits intoOct 16, 2026
Merged
eugene-mux merged 12 commits into
eugene-mux merged 12 commits into
Conversation
daytime-em
approved these changes
Oct 14, 2026
eugene-mux
force-pushed
the
em/nat-546-output-validation
branch
3 times, most recently
from
October 16, 2026 18:35
59dc6fb to
66eb9a5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 66eb9a5. Configure here.
eugene-mux
force-pushed
the
em/nat-546-output-validation
branch
from
October 16, 2026 19:58
66eb9a5 to
8a39189
Compare
Base automatically changed from
em/nat-545-sample-inspection
to
feature/nat-534-hevc-standard-ingest
October 16, 2026 19:58
eugene-mux
merged commit Oct 16, 2026
700c4a2
into
feature/nat-534-hevc-standard-ingest
1 of 2 checks passed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Generated media is reinspected and accepted only with complete timeline proof, policy compliance, and a match to the conversion plan. Source and output MP4 inspection share one bounded sample/timeline scan and result type. Non-ISO scans return metadata only and select original bytes. Conversion requires proven source timing; the unused raw scanner and duration guesses have been removed.
Bitrate counts whole-track bytes over the full track span and complete intersecting GOPs over their full spans. Cadence and keyframe intervals use the presented edit. Timestamp comparison allows output-tick rounding and requires a consistent extractor timing convention across each track.
Timing tables are selected by platform track ID; metadata is no longer read twice.
Validation
Note
High Risk
Changes upload eligibility by requiring proven timelines and stricter bitrate/edit math; incorrect timeline or validation logic could reject good encodes or accept non-compliant output.
Overview
Adds post-conversion validation so generated files are only accepted after metadata + a complete ISO timeline scan, policy compliance, and a match to the conversion plan; rejections allow original-byte fallback, while cancellation stops preparation.
Replaces the old
MediaSampleInspectorfile scan withStandardInputTimelineInspector: ISOstts/ctts/elsttables (viaIsoTimelineReader) prove effective duration, A/V offset, and presentation times, thenBoundedSampleReaderverifies every sample against platform timestamps and derives video sample facts.VideoSampleFactsReadernow keys cadence/timestamps off the presented edit window while bitrate/GOP bounds count whole-track bytes (including preroll/tails outside the edit).StandardInputOutputValidatororchestrates reinspection (immutable file check, timeline completeness) and compares output to source timelines andStandardInputConversion(codec, dimensions, audio, cadence, timestamp preservation with tick rounding).PlanningCapabilities.sourceTimelineIsProvenis required before conversion is offered.Reviewed by Cursor Bugbot for commit 45bab3e. Bugbot is set up for automated code reviews on this repo. Configure here.