-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Description
Context
Follow-up from PR #2326 (port node launcher to Rust). Tracked in #2598.
Problem
crates/tee-launcher/src/main.rs is ~1,279 lines mixing orchestration, registry interaction, image validation, compose rendering, config injection, and tests. This makes it hard to navigate and maintain.
Suggested Module Split
| Module | Contents | ~Lines |
|---|---|---|
registry.rs |
RegistryInfo trait, DockerRegistry, get_manifest_digest() |
450 |
validation.rs |
validate_image_hash(), docker pull/inspect logic |
150 |
compose.rs |
render_compose_file(), launch_mpc_container() |
150 |
selection.rs |
select_image_hash() |
100 |
config.rs |
intercept_node_config(), insert_reserved() |
100 |
main.rs |
Entry points main() and run() only |
100-150 |
Tests should move to their respective modules.
Action
- Extract modules along the boundaries above
- Move tests to their respective modules
- Keep
main.rsas orchestration-only (~100-150 lines) - Ensure all
pub(crate)visibility is correct after split
Reactions are currently unavailable