Skip to content

test(editor): fuzz Studio Sound export windows over random cuts - #3435

Merged
richiemcilroy merged 1 commit into
mainfrom
test/studio-sound-export-window-fuzz
Oct 26, 2026
Merged

richiemcilroy merged 1 commit into
mainfrom
test/studio-sound-export-window-fuzz

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Adds a randomized regression test for the "Invalid sequential export audio window" export failure with Studio Sound on.

In 0.6.1, a Studio Sound export of a timeline with a short cut inside one clip failed with that error every time. Turning Studio Sound off made it export. Main already fixes this (594e1b6 and c62021c), but the existing tests only cover a few hand-picked timelines.

Test

studio_sound_random_cuts_never_reject_the_export_window builds random eligible timelines and exports them through the streaming path with Studio Sound on. Each run varies:

  • cuts of 0 samples up to about 3 s, with two clips interleaved;
  • random mic and system audio offsets of up to ±0.3 s;
  • the isolation strength;
  • request sizes from 1 sample to 48,001 samples.

It uses voice-like test audio with loud and quiet stretches, so the leveler and denoiser do real work. It fails if any export returns an error or writes a different number of samples than the preview renderer. By default it runs 12 iterations, about 50 s in a debug build. CAP_AUDIO_FUZZ_ITERATIONS and CAP_AUDIO_FUZZ_SEED widen the search locally.

Verification

  • Ran 150 iterations on main on an M-series Mac: no window errors.
  • Setting STUDIO_SOUND_HISTORY_SAMPLES to 0 recreates the 0.6.1 behaviour (reads only move forward). With that change every iteration fails with "Invalid sequential export audio window", so the test catches the original bug.
  • All 25 export_audio tests pass.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds a repeatable randomized test for Studio Sound exports across cuts.

  • A randomized test checks Studio Sound exports across different cut patterns.

Reviews (1) · Last reviewed commit: "test(editor): fuzz Studio Sound export w..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 26, 2026 9:22pm UTC

@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@capy-ai capy-ai 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.

Capy found no issues.

Open in Capy

@richiemcilroy
richiemcilroy merged commit 8dd141d into main Oct 26, 2026
58 checks passed

This branch was successfully deployed

2 active deployments
Preview – cap-web — 36b5acb7 Deployed Oct 26, 2026 by vercel[bot]
Preview – cap-status — 36b5acb7 Deployed Oct 26, 2026 by vercel[bot]
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