Skip to content

feat(task15): phase 1 runtime backend abstraction for Studio dataflow + practical example#39

Open
vivekrajsingh04 wants to merge 3 commits intomofa-org:mainfrom
vivekrajsingh04:feat/task15-runtime-backend-phase1
Open

feat(task15): phase 1 runtime backend abstraction for Studio dataflow + practical example#39
vivekrajsingh04 wants to merge 3 commits intomofa-org:mainfrom
vivekrajsingh04:feat/task15-runtime-backend-phase1

Conversation

@vivekrajsingh04
Copy link
Copy Markdown

Closes #38

Summary

Implements Task 15 (Phase 1) by introducing a runtime backend abstraction for Studio dataflow lifecycle, while preserving existing Dora behavior by default.

Changes

  • Added RuntimeBackend::{DoraCli, MofaNative} in controller
  • Added DataflowController::new_with_runtime(...)
  • Kept DataflowController::new(...) default to DoraCli (no behavior change)
  • Added explicit unsupported path errors for not-yet-wired native backend:
    • BridgeError::UnsupportedRuntime(...)
  • Re-exported runtime backend type from bridge crate
  • Added practical example:
    • mofa-dora-bridge/examples/runtime_backend_demo.rs
    • mofa-dora-bridge/examples/README.md
  • Added tests:
    • new_with_runtime_sets_backend
    • mofa_native_start_is_explicitly_unsupported_for_now

Validation

cargo check -p mofa-dora-bridge
cargo check -p mofa-dora-bridge --example runtime_backend_demo
cargo test -p mofa-dora-bridge controller::tests::new_with_runtime_sets_backend -- --nocapture
cargo test -p mofa-dora-bridge controller::tests::mofa_native_start_is_explicitly_unsupported_for_now -- --nocapture
cargo run -p mofa-dora-bridge --example runtime_backend_demo -- apps/mofa-fm/dataflow/voice-chat.yml
MOFA_RUNTIME_BACKEND=mofa-native cargo run -p mofa-dora-bridge --example runtime_backend_demo -- apps/mofa-fm/dataflow/voice-chat.yml --start

Scope

Phase 1 only: abstraction + example + tests.
MofaNative lifecycle wiring will be implemented in follow-up PR(s).

@vivekrajsingh04
Copy link
Copy Markdown
Author

vivekrajsingh04 commented Feb 23, 2026

@BH3GEI PR is ready for review.

This PR completes Task 15 Phase 1 with:

  • runtime backend abstraction (DoraCli / MofaNative)
  • practical example under mofa-dora-bridge/examples/
  • tests for backend selection and explicit unsupported native lifecycle path

Please let me know if you prefer Task 15 Phase 2 (MofaNative lifecycle wiring) as a separate follow-up PR.

@vivekrajsingh04
Copy link
Copy Markdown
Author

@BH3GEI Sir, gentle ping on #39 when you have a moment.

This PR is scoped to Task 15 Phase 1 only (abstraction + tests + practical example), and I kept Phase 2 (MofaNative lifecycle wiring) separate as follow-up.

Happy to adjust scope/structure based on your review preference.

- Kept shared_state re-exports and RuntimeBackend from our branch
- Removed upstream's remote_config/remote_dataflow module declarations
  (source files for these modules do not exist in the repo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(runtime): Task 15 Phase 1 — decouple Studio dataflow lifecycle from Dora CLI

1 participant