Skip to content

fix(export): reject silent cuda inline audio#558

Merged
meiiie merged 1 commit into
mainfrom
fix/cuda-inline-audio-validation
May 22, 2026
Merged

fix(export): reject silent cuda inline audio#558
meiiie merged 1 commit into
mainfrom
fix/cuda-inline-audio-validation

Conversation

@meiiie
Copy link
Copy Markdown
Collaborator

@meiiie meiiie commented May 22, 2026

Summary

  • Reject CUDA inline-audio export summaries when the helper output has no audio stream.
  • Reject CUDA inline-audio summaries when the probed audio stream duration is zero.
  • Add regression coverage around validateNvidiaCudaExportSummary.

Why

This is a small slice from #504 that directly protects against silent native/CUDA outputs. If the CUDA helper is trusted to mux audio inline, the validator must not accept a video-only or empty-audio MP4 and skip the shared mux/fallback path.

This PR intentionally does not include the broader #504 route planner, CUDA compositor binary, or dev launcher changes.

Verification

  • npm test -- electron/ipc/export/native-video.test.ts
  • npx tsc --noEmit
  • npx biome check --formatter-enabled=false electron/ipc/export/native-video.ts electron/ipc/export/native-video.test.ts
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation for NVIDIA CUDA video exports to properly detect and report issues with missing or invalid audio streams during export operations.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d9879b3f-5b23-4994-92ac-0e333f36ba6d

📥 Commits

Reviewing files that changed from the base of the PR and between d7dde21 and 61bbaab.

📒 Files selected for processing (2)
  • electron/ipc/export/native-video.test.ts
  • electron/ipc/export/native-video.ts

📝 Walkthrough

Walkthrough

validateNvidiaCudaExportSummary adds validation for output audio when timeline sync is required: existence checks and positive duration assertions. Test coverage replaces one acceptance case with two rejection scenarios validating missing-audio and zero-duration error handling.

Changes

Audio validation for timeline-sync CUDA exports

Layer / File(s) Summary
Audio presence and duration validation
electron/ipc/export/native-video.ts, electron/ipc/export/native-video.test.ts
When requiresTimelineSync is enabled, validateNvidiaCudaExportSummary now enforces that outputAudio exists and has positive duration, preventing duration-difference reporting for non-positive values. Test suite replaces the prior PTS-aligned acceptance case with rejection cases for missing audio stream and zero duration, each asserting exact error messages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • webadderallorg/Recordly#410: Expands validateNvidiaCudaExportSummary test coverage for CUDA inline-audio scenarios in the same module.

Suggested labels

Checked

Poem

🐰 Audio streams align at last, no gaps so wide—
When sync's required, we check they're there with pride.
Zero durations banished to the night,
Validation guards the CUDA export right! 🎬✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: rejecting silent CUDA inline audio exports, which directly reflects the validation logic improvements in the changeset.
Description check ✅ Passed The description covers all critical sections: it clearly explains what changed (rejection of silent audio), why it's needed (protection against video-only/empty-audio outputs), and includes verification steps. While some optional template sections are missing, the essential information is complete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cuda-inline-audio-validation

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@meiiie meiiie merged commit fb4e2d9 into main May 22, 2026
3 checks passed
@meiiie meiiie deleted the fix/cuda-inline-audio-validation branch May 22, 2026 12:54
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.

1 participant