Skip to content

fix(call): skip preview cleanup for non-mp4 recordings - #5595

Closed
Mr-Neutr0n wants to merge 1 commit into
macro-inc:mainfrom
Mr-Neutr0n:fix/call-preview-mp4-only
Closed

fix(call): skip preview cleanup for non-mp4 recordings#5595
Mr-Neutr0n wants to merge 1 commit into
macro-inc:mainfrom
Mr-Neutr0n:fix/call-preview-mp4-only

Conversation

@Mr-Neutr0n

Copy link
Copy Markdown
Contributor

Problem

When a call record has no stored preview key, deletion derives fallback preview paths from the recording key. The helper derived paths for every filename, even though the preview producer only handles .mp4 recordings. A non-MP4 recording could therefore trigger deletion attempts for paths that cannot exist.

Fix

Return no derived preview key unless the recording filename ends in .mp4, and cover the non-MP4 case with a regression test.

Verification

  • cargo check -p call --no-default-features --features ports
  • cargo fmt --all -- --check

The focused unit target is included, but this checkout cannot compile the full call test binary because existing SQLx tests require unavailable query-cache entries.

Signed-off-by: Mr-Neutr0n <harikp2002@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 120598db-83c4-42bb-b26d-f9fdc5a3380d

📥 Commits

Reviewing files that changed from the base of the PR and between 412bc88 and c7312a5.

📒 Files selected for processing (2)
  • crates/call/src/domain/service.rs
  • crates/call/src/domain/service/test.rs

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Preview links are no longer generated for recordings that are not in MP4 format.
    • MP4 recording preview behavior remains unchanged.
  • Tests

    • Added coverage to verify non-MP4 recordings do not produce preview links.

Walkthrough

The preview-key derivation now checks that the recording filename ends with .mp4. It returns no preview key for non-MP4 recordings. Existing MP4 handling remains unchanged. A unit test verifies that a .mov recording returns None.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commits format, is 54 characters long, and accurately describes the fix.
Description check ✅ Passed The description clearly explains the non-MP4 cleanup fix, regression test, and verification results.
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.

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.

@whutchinson98

Copy link
Copy Markdown
Member

Hi @Mr-Neutr0n thanks for the contribution, however I'm going to close this as the current method takes the key as the SSOT which is given to us from livekit. This could change if we ever update our video recording pipeline or if they do so we should not make assumptions like this.

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