Repository navigation
v0.2.0: comprehensive codebase review fixes - #22
Conversation
Three root causes fixed: - Voice prompt cache never loaded due to PyTorch 2.6+ weights_only=True rejecting VoiceClonePromptItem. Added safe_globals allowlist. - Cached prompts loaded to CPU while model runs on MPS, causing precision drift. Now loads to model's device via _get_device(). - First MPS inference produces degraded output due to unprimed shader compilation. Added warmup generation during model load. Also adds diagnostic logging for audio duration/sample rate at each pipeline stage and A/V duration drift detection on output MP4.
Security: - Fix path validation bypass (string prefix → Path.is_relative_to) - Add upload path allowlist to sidecar_upload - Add model name validation (reject .., special chars) - Fix google_drive_disconnect destroying all secrets - Add sidecar busy flag to prevent health-check restart during inference - Add generation queue limits (maxsize=100, MAX_GENERATIONS=1000) - Add yt-dlp safety options (noplaylist, max_downloads, timeout) Performance: - Replace per-call reqwest::Client with shared HttpClient from Tauri state - Add config caching with RwLock (eliminates repeated file+keychain reads) - Remove eager sidecar start (lazy on first use) - Use h264_videotoolbox hardware encoding on macOS - Cache ffmpeg path with OnceLock - Static Tauri IPC import (eliminate per-call dynamic import) - Wrap cleanup_stale_recordings in spawn_blocking Code quality: - Adopt Provider enum in config (replace raw string) - Add TypeScript union types for provider/local_tts_mode - Consolidate 3 duplicate LocalVoice interfaces → VoiceboxProfile - Export VoiceboxClient singleton - Extract duplicated pad_or_truncate_to_duration - Add FFmpeg named constants, rename chrono_timestamp → unix_timestamp - Add tts.py accessor functions for private state - Modernize Python typing (X | None, list[T]) - Add global FastAPI exception handler - Add RotatingFileHandler for watchdog log - Narrow read_file_bytes temp dir access - Add monkey-patch version guard Build/config: - Remove unused @sveltejs/adapter-auto - Fix @types/node to ^22 (LTS) - Narrow tokio features, upgrade rand 0.8→0.9 - Bundle targets "all" → ["dmg", "app"] - Remove unnecessary svelte runes forcing - Remove deprecated vitest hot:false - Add sidecar/data/ to .gitignore Docs: - Fix phantom check_models_downloaded in README - Add missing delete_model command and DELETE route - Fix BUILD.md code signing contradiction - Add entitlements rationale comments
- Bump version to 0.2.0 across package.json, Cargo.toml, tauri.conf.json - Add scripts/bump-version.sh to sync version across all three files - Remove overly restrictive yt-dlp options (noplaylist, max_downloads) that broke YouTube extraction for voice creation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (37)
📝 WalkthroughSummary by CodeRabbitRelease Notes – v0.2.0
WalkthroughVersion bumped from 0.1.0 to 0.2.0 with improvements across model management, type safety, audio processing, security hardening, and architecture refactoring. Includes model deletion API, Python/TypeScript type modernization, macOS code signing enhancements, sidecar lazy startup, config caching, and shared HTTP client management. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
Summary
scripts/bump-version.shfor syncing across all config filesTest plan