-
Notifications
You must be signed in to change notification settings - Fork 38
feat(runtime): Task 15 Phase 1 — decouple Studio dataflow lifecycle from Dora CLI #38
Copy link
Copy link
Open
Description
Files affected:
mofa-dora-bridge/src/controller.rsmofa-dora-bridge/src/error.rsmofa-dora-bridge/src/lib.rsmofa-dora-bridge/examples/runtime_backend_demo.rsmofa-dora-bridge/examples/README.md
Summary
This issue tracks Task 15 (Phase 1) from GSoC: preparing MoFA Studio to migrate from Dora-dependent lifecycle execution toward mofa-rs native runtime.
Today, DataflowController is tightly coupled to Dora CLI lifecycle commands (dora up/start/list/stop).
For migration, we need a runtime abstraction seam while keeping current behavior stable.
Problem
Current lifecycle methods are Dora-specific:
- daemon management assumes Dora (
dora up) - start/stop/status use Dora CLI directly
- no explicit runtime backend model in controller API
This makes native-runtime migration invasive and risky.
Proposed Fix (Phase 1)
- Introduce runtime backend abstraction in controller:
RuntimeBackend::{DoraCli, MofaNative}DataflowController::new_with_runtime(...)runtime_backend()getter
- Keep default behavior unchanged:
DataflowController::new(...)usesRuntimeBackend::DoraCli
- Add explicit error for unimplemented backend paths:
BridgeError::UnsupportedRuntime(...)
- Add practical usage example:
mofa-dora-bridge/examples/runtime_backend_demo.rsmofa-dora-bridge/examples/README.md
- Add tests for phase-1 guarantees:
- backend selection is persisted
MofaNativestart path fails explicitly (not silently)
Validation
cargo check -p mofa-dora-bridgecargo check -p mofa-dora-bridge --example runtime_backend_democargo test -p mofa-dora-bridge controller::tests::new_with_runtime_sets_backend -- --nocapturecargo test -p mofa-dora-bridge controller::tests::mofa_native_start_is_explicitly_unsupported_for_now -- --nocapture- Example dry run:
cargo run -p mofa-dora-bridge --example runtime_backend_demo -- apps/mofa-fm/dataflow/voice-chat.yml
- Example native-backend explicit error:
MOFA_RUNTIME_BACKEND=mofa-native cargo run -p mofa-dora-bridge --example runtime_backend_demo -- apps/mofa-fm/dataflow/voice-chat.yml --start
Scope
This is Phase 1 only (abstraction + example + tests).
Actual mofa-rs native lifecycle wiring for MofaNative is planned in follow-up phase(s).
I would like to work on this issue.
GitHub username: @vivekrajsingh04
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels