address CodeRabbit review: fix 4 critical + 12 major issues

Critical:
- Remove dead backend.utils.validation PyInstaller hidden import
- Fix story_items table rebuild to preserve track/trim/version columns
- Guard cache migration against same source/destination path
- Fix regeneration audio overwrite (use random uuid suffix per take)

Major:
- Engine selector: validate language on Qwen switch, clear stale modelSize
- Sync language validation regex between profile create and generate (22 langs)
- Guard CUDA download against duplicate concurrent requests
- Only set model_size for engines that support multiple sizes
- Fix 404 swallowed by generic except in history export
- Validate audio_path before FileResponse in export-audio
- Transcription: stream uploads in 1MB chunks, use robust cache check,
  call complete_download() on Whisper download success
- Set clean version as default when effects chain validation fails
- Return explicit error when Windows port occupied by non-voicebox process
This commit is contained in:
James Pine
2026-03-16 03:12:01 -07:00
parent 798cd40f05
commit 0d0b62ea93
11 changed files with 69 additions and 38 deletions
+8 -2
View File
@@ -176,7 +176,11 @@ def _save_generate(
error_msg = validate_effects_chain(effects_chain)
if error_msg:
print(f"Warning: invalid effects chain, skipping: {error_msg}")
import logging
logging.getLogger(__name__).warning("invalid effects chain, skipping: %s", error_msg)
versions_mod.set_default_version(
versions_mod.list_versions(generation_id, db)[0].id, db
)
else:
processed_audio = apply_effects(audio, sample_rate, effects_chain)
processed_path = config.get_generations_dir() / f"{generation_id}_processed.wav"
@@ -225,7 +229,9 @@ def _save_regenerate(
"""
from . import versions as versions_mod
suffix = version_id[:8] if version_id else generation_id[:8]
import uuid as _uuid
suffix = _uuid.uuid4().hex[:8]
audio_path = config.get_generations_dir() / f"{generation_id}_{suffix}.wav"
save_audio(audio, str(audio_path), sample_rate)