Conversation
…n + implementation overview)
…y to reduce confusion
Major refactoring to complete the workspace split architecture: Core Changes: - Add re-export modules in app crate for vad, telemetry, and foundation - Fix all import paths across tests and examples to use new structure - Map app-level features to subcrate features in Cargo.toml - Add missing parking_lot dependency to app crate VAD Integration: - Create vad module re-exporting UnifiedVadConfig, VadMode, constants - Wire up Level3 and Silero engines through feature flags - Update VadProcessor to consume coldvox_audio::AudioFrame - Fix frame type conversions (f32 samples with Instant timestamps) Audio Module: - Re-export AudioChunker, ChunkerConfig, ResamplerQuality, FrameReader - Re-export AudioRingBuffer, AudioProducer, CaptureStats, AudioFrame - Disambiguate AudioFrame types in chunker tests Text Injection: - Add public get_method_priority() wrapper for tests - Fix NoOp injector to properly record metrics - Update processor tests with confidence fields - Fix feature flag guards in main.rs Test Fixes: - Update vad_pipeline_tests to new AudioFrame structure - Fix chunker_timing_tests timestamp calculations - Correct test_transcription_config_default expectations - Remove invalid text-injection feature flag in tests - Clean up all unused imports via cargo fix All tests pass (112 total), examples compile, and release builds successfully. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR completes the workspace split refactoring for ColdVox, transforming it from a monolithic crate into a well-organized workspace with specialized subcrates. The purpose is to improve modularity, reduce compilation times, and better isolate optional dependencies.
Key changes include:
- Complete workspace architecture with proper module re-exports and feature mapping
- Fixed all import paths and compilation issues across 112 tests
- Added comprehensive linter remediation documentation and migration guides
Reviewed Changes
Copilot reviewed 128 out of 142 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| linter_remediation_plan.md | Documents fixes for the first 10 linter errors from incorrect crate imports |
| linter/remediation_plan_*.md | Batch remediation plans for different categories of linter warnings |
| examples/vosk_test.rs* | Feature-gated Vosk example with fallback when feature disabled |
| examples/vad_demo.rs | Updated imports to use new workspace structure |
| docs/*.md | Updated documentation to reflect new crate organization and architecture |
| docs/tasks/*.md | Comprehensive task planning and implementation guides for workspace features |
| docs/MIGRATION_GUIDE.md | User migration guide from monolithic to workspace structure |
| - **Line:** `use crate::vad::config::{UnifiedVadConfig, VadMode}; | ||
| - **Fix:** `use coldvox_vad::config::{UnifiedVadConfig, VadMode}; |
There was a problem hiding this comment.
Missing closing quote mark on line 22. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::vad::config::{UnifiedVadConfig, VadMode}; | |
| - **Fix:** `use coldvox_vad::config::{UnifiedVadConfig, VadMode}; | |
| - **Line:** `use crate::vad::config::{UnifiedVadConfig, VadMode};` | |
| - **Fix:** `use coldvox_vad::config::{UnifiedVadConfig, VadMode};` |
| - **Line:** `use crate::foundation::error::AudioConfig; | ||
| - **Fix:** `use coldvox_foundation::error::AudioConfig; |
There was a problem hiding this comment.
Missing closing quote mark on line 26. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::foundation::error::AudioConfig; | |
| - **Fix:** `use coldvox_foundation::error::AudioConfig; | |
| - **Line:** `use crate::foundation::error::AudioConfig;` | |
| - **Fix:** `use coldvox_foundation::error::AudioConfig;` |
| 5. **Error:** `unresolved import | ||
| `crate::audio::capture | ||
| ` | ||
| - **Line:** `use crate::audio::capture::AudioCaptureThread; |
There was a problem hiding this comment.
Missing closing quote mark on line 32. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::audio::capture::AudioCaptureThread; | |
| - **Line:** `use crate::audio::capture::AudioCaptureThread;` |
| - **Line:** `use crate::audio::chunker::{AudioChunker, ChunkerConfig}; | ||
| - **Fix:** `use coldvox_audio::chunker::{AudioChunker, ChunkerConfig}; |
There was a problem hiding this comment.
Missing closing quote mark on line 38. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::audio::chunker::{AudioChunker, ChunkerConfig}; | |
| - **Fix:** `use coldvox_audio::chunker::{AudioChunker, ChunkerConfig}; | |
| - **Fix:** `use coldvox_audio::chunker::{AudioChunker, ChunkerConfig};` |
| - **Line:** `use crate::audio::frame_reader::FrameReader; | ||
| - **Fix:** `use coldvox_audio::frame_reader::FrameReader; |
There was a problem hiding this comment.
Missing closing quote mark on line 44. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::audio::frame_reader::FrameReader; | |
| - **Fix:** `use coldvox_audio::frame_reader::FrameReader; | |
| - **Line:** `use crate::audio::frame_reader::FrameReader;` | |
| - **Fix:** `use coldvox_audio::frame_reader::FrameReader;` |
| ### File: `crates/app/src/hotkey/listener.rs` | ||
|
|
||
| 10. **Error:** `failed to resolve: could not find 'vad' in the crate root` | ||
| - **Line:** `use crate::vad::types::VadEvent; |
There was a problem hiding this comment.
Missing closing quote mark on line 62. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::vad::types::VadEvent; | |
| - **Line:** `use crate::vad::types::VadEvent;` |
| ### File: `crates/app/src/probes/vad_mic.rs` | ||
|
|
||
| 1. **Error:** `unresolved import `crate::audio::ring_buffer`` | ||
| - **Line:** `use crate::audio::ring_buffer::AudioRingBuffer; |
There was a problem hiding this comment.
Missing closing quote mark on line 10. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `use crate::audio::ring_buffer::AudioRingBuffer; | |
| - **Line:** `use crate::audio::ring_buffer::AudioRingBuffer;` |
| ` - **Fix:** `use coldvox_audio::ring_buffer::AudioRingBuffer; | ||
| ` | ||
| 2. **Error:** `could not find `chunker` in `audio`` | ||
| - **Line:** `resampler_quality: crate::audio::chunker::ResamplerQuality::Balanced, |
There was a problem hiding this comment.
Missing closing quote mark on line 14. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `resampler_quality: crate::audio::chunker::ResamplerQuality::Balanced, | |
| - **Line:** `resampler_quality: crate::audio::chunker::ResamplerQuality::Balanced,` |
| ### File: `crates/app/src/audio/vad_adapter.rs` | ||
|
|
||
| 3. **Error:** `use of undeclared type `Level3Vad`` | ||
| - **Line:** `Box::new(Level3Vad::new(level3_config)) |
There was a problem hiding this comment.
Missing closing quote mark on line 21. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `Box::new(Level3Vad::new(level3_config)) | |
| - **Line:** `Box::new(Level3Vad::new(level3_config))` |
| - **Fix:** Change the import from `use coldvox_vad::Level3Vad;` to `use coldvox_vad::level3::Level3Vad;`. | ||
|
|
||
| 4. **Error:** `mismatched types` | ||
| - **Line:** `Box::new(SileroEngine::new(config.silero.clone())?) |
There was a problem hiding this comment.
Missing closing quote mark on line 26. The line should end with a closing quote mark to match the opening quote.
| - **Line:** `Box::new(SileroEngine::new(config.silero.clone())?) | |
| - **Line:** `Box::new(SileroEngine::new(config.silero.clone())?)` |
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
ColdVox/crates/app/src/text_injection/manager.rs
Lines 87 to 90 in 6e49b67
[P1] Clipboard injector gate references undeclared variables
The app crate’s injector registry shows the same mismatch: backend flags were renamed _has_wayland and _has_x11, yet the conditional still uses has_wayland/has_x11. Enabling the text-injection-clipboard feature causes an unresolved-name compiler error. Update the condition to use the defined _has_* variables so builds with clipboard support succeed.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| // Add clipboard injectors if available | ||
| #[cfg(feature = "wl_clipboard")] | ||
| { | ||
| if has_wayland || has_x11 { |
There was a problem hiding this comment.
[P1] Use renamed backend flags to avoid compile error
In InjectorRegistry::build the backend detection variables were renamed to _has_wayland/_has_x11, but the clipboard branch still tests if has_wayland || has_x11. When the wl_clipboard feature is enabled this code does not compile because those identifiers no longer exist. Switch the condition to the _has_* names (or keep the original names) so the clipboard injectors can build successfully.
Useful? React with 👍 / 👎.
Summary
Changes
Architecture Improvements
mod.rs) for vad, telemetry, and foundation in app crateVAD Integration
coldvox_audio::AudioFrameTest Fixes
vad_pipeline_teststo use new AudioFrame structurechunker_timing_teststimestamp calculationstest_transcription_config_defaultexpectationsBuild Fixes
parking_lotdependency to app crateTest Plan
cargo test --workspace --libcargo check --examplescargo build --release --features voskcargo test -p coldvox-app --test vad_pipeline_tests --features level3Impact
This refactoring provides better separation of concerns and makes the codebase more maintainable by clearly defining module boundaries and dependencies.
🤖 Generated with Claude Code