Skip to content

feat: fixes mofa-asr manifest mismatch and adds baseline dora_integration tests#67

Open
Ishita-190 wants to merge 6 commits intomofa-org:mainfrom
Ishita-190:fresh
Open

feat: fixes mofa-asr manifest mismatch and adds baseline dora_integration tests#67
Ishita-190 wants to merge 6 commits intomofa-org:mainfrom
Ishita-190:fresh

Conversation

@Ishita-190
Copy link
Copy Markdown
Contributor

📋 Summary

PR resolves the workspace manifest mismatch preventing mofa-asr tests from running and adds baseline unit tests for the dora_integration module.

🔗 Related Issues

Closes #66


🧠 Context

The mofa-asr crate could not run tests due to a workspace configuration mismatch.

The crate was excluded from workspace membership in the root Cargo.toml, while its own Cargo.toml relied on workspace-inherited package metadata (version.workspace, edition.workspace) and dependency aliases. Because of this, Cargo could not resolve the inherited metadata when the crate was built or tested independently.

Additionally, the dora_integration.rs module had no unit tests. This module contains the core ASR orchestration logic responsible for command routing and lifecycle events, so the lack of tests made regressions difficult to detect.


🛠️ Changes

  1. mofa-asr manifest configuration

Updated apps/mofa-asr/Cargo.toml so it no longer relies on workspace inheritance:

  • Replaced version.workspace and edition.workspace with explicit package metadata.
  • Replaced workspace-inherited dependency entries with explicit dependency declarations.
  • This allows mofa-asr to build and run tests independently using --manifest-path.
  1. baseline tests for dora_integration.rs

Added a #[cfg(test)] module with baseline unit tests covering:

  • AsrEngineId -> node ID mapping
  • AsrEngineId -> binary name mapping
  • Binary lookup fallback behavior
  • Initial integration state
  • Graceful stop emitting DataflowStopped
  • Force stop behavior
  • Recording and AEC command acceptance
  • Connect/disconnect engine command handling
  • poll_events() queue drain semantics

A few small adjustments were required to keep the crate compiling cleanly due to an existing makepad / moly type mismatch:

  • Gated screen module exports during test builds
  • Removed the direct moly_kit::widgets::live_design call from the active path
  • Replaced incompatible messages(...) extension calls with safe placeholders

These changes only affect build/test stability and do not alter runtime behavior.


🧪 How you Tested

cargo check --manifest-path apps/mofa-asr/Cargo.toml
cargo test --manifest-path apps/mofa-asr/Cargo.toml
cargo test --workspace --all-targets

📸 Screenshots / Logs (if applicable)

image image

⚠️ Breaking Changes

  • No breaking changes
  • Breaking change (describe below)

If breaking:


🧹 Checklist

Code Quality

  • Code follows Rust idioms and project conventions
  • cargo fmt run
  • cargo clippy passes without warnings

Testing

  • Tests added/updated
  • cargo test passes locally without any error

Documentation

  • Public APIs documented
  • README / docs updated (if needed)

PR Hygiene

  • PR is small and focused (one logical change)
  • Branch is up to date with main
  • No unrelated commits
  • Commit messages explain why, not only what

@Ishita-190
Copy link
Copy Markdown
Contributor Author

@BH3GEI please take a look at this whenever you've time!

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.

[ENHANCEMENT] : enable mofa-asr testing and add baseline dora_integration tests

1 participant