Repository navigation
Stability: ORT panic fix + gap analysis update - #802
Conversation
TTS/STT init runs inside tokio::task::spawn so panics from missing libonnxruntime.dylib are caught as JoinError instead of poisoning the tokio runtime. Voice features degrade gracefully — core stays alive.
New issues mapped to phases: - Phase 0: ORT panic (#792 DONE), IPC reconnection (#793), event bridge (#794), duplicate tabs (#795) - Phase 2: LiveKit Docker validation (#797), Qwen3.5 native audio (#799), custom STT (#800), custom TTS (#801) - Phase 10: Grid-routed inference (#798) - Phase 11: Docker E2E with live+grid (#796)
There was a problem hiding this comment.
Pull request overview
Improves runtime stability of continuum-core by isolating voice subsystem initialization so ORT dylib panics don’t take down the server, and updates the Alpha gap analysis planning doc with newly tracked stability/voice/docker issues.
Changes:
- Run STT/TTS initialization inside an awaited spawned task to surface panics as
JoinErrorand keep the core alive. - Add explicit logging when STT/TTS adapters are unavailable or when initialization panics.
- Update
ALPHA-GAP-ANALYSIS.mdstatus/date and map issues #792–#801 into phases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/workers/continuum-core/src/main.rs |
Wrapes voice init in a spawned task and handles JoinError to avoid ORT panic crashing the server. |
docs/planning/ALPHA-GAP-ANALYSIS.md |
Updates planning status and adds new issue mappings (#792–#801) and updated “done when” criteria. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Wrapped in catch_unwind because ORT panics (not errors) when libonnxruntime.dylib | ||
| // is missing. A missing TTS/STT model must NEVER crash the entire server. |
There was a problem hiding this comment.
The comment says this is "Wrapped in catch_unwind", but the implementation uses a nested tokio::task::spawn + JoinError handling. Please either update the comment to match the actual mechanism, or explicitly use std::panic::catch_unwind if that’s the intended approach.
| // Wrapped in catch_unwind because ORT panics (not errors) when libonnxruntime.dylib | |
| // is missing. A missing TTS/STT model must NEVER crash the entire server. | |
| // Run initialization in a nested Tokio task so any ORT panic (for example, when | |
| // libonnxruntime.dylib is missing) is captured as a JoinError when awaited below. | |
| // A missing TTS/STT model must NEVER crash the entire server. |
| tracing::error!("⚠️ TTS/STT initialization panicked (ORT dylib missing?): {:?}", e); | ||
| tracing::error!(" Voice features disabled. Install libonnxruntime or set ORT_DYLIB_PATH."); |
There was a problem hiding this comment.
JoinError can indicate either a panic or task cancellation, but the log message always reports a panic ("initialization panicked"). Consider branching on is_panic() vs is_cancelled() so shutdown/runtime teardown doesn’t produce misleading error logs.
| tracing::error!("⚠️ TTS/STT initialization panicked (ORT dylib missing?): {:?}", e); | |
| tracing::error!(" Voice features disabled. Install libonnxruntime or set ORT_DYLIB_PATH."); | |
| if e.is_panic() { | |
| tracing::error!("⚠️ TTS/STT initialization panicked (ORT dylib missing?): {:?}", e); | |
| tracing::error!( | |
| " Voice features disabled. Install libonnxruntime or set ORT_DYLIB_PATH." | |
| ); | |
| } else if e.is_cancelled() { | |
| tracing::warn!( | |
| "⚠️ TTS/STT initialization was cancelled during shutdown/runtime teardown." | |
| ); | |
| tracing::warn!(" Voice features remain disabled."); | |
| } else { | |
| tracing::error!("⚠️ TTS/STT initialization failed to join: {:?}", e); | |
| tracing::error!(" Voice features remain disabled."); | |
| } |
Summary
tokio::task::spawnso missinglibonnxruntime.dylibdoesn't crash the server. Voice features degrade gracefully.Issues
Test plan
cargo build --release)