mando-cli Codebase Cleanup
Path Update
All
src/v2/paths referenced below were flattened tosrc/root on 2026-04-09. E.g.src/v2/telemetry/metrics.rsis nowsrc/telemetry/metrics.rs.
Result
| Metric | Before | After |
|---|---|---|
| Compiler warnings | 116 | 0 |
| Errors | 0 | 0 |
| Tests passing | 61 | 61 |
| Dead files removed | - | ~15 |
| Unused deps removed | - | 4 |
Files Deleted
Telemetry (3 files)
src/v2/telemetry/metrics.rs- BessMetrics, MetricEntrysrc/v2/telemetry/collector.rs- LocalCollector, CollectorHandlesrc/v2/telemetry/report.rs- DiagnosticBundle, SystemInfo, RepoState, ContainerState + 5 functions
Network (1 file)
src/v2/network/wiremock.rs- 247 lines, 7 structs, 1 function
Runtime (6 files)
docker.rs- all todo!() stubshost.rs- all todo!() stubsbuilder.rs- unused BuilderContextmanifest.rs- unused ServiceBuildManifest, BuildStrategy, RunError, HealthStatemonitor.rs- unused RunningServiceMonitor traitrunner.rs- unused ArtifactRunner trait, RunSpec, RunError
Git (1 file)
src/v2/workspace/git/ssh.rs- unused ssh_has_alpiq function
Dead Code Removed (in active files)
MandoWorkspaceProject::with_state()- never calledMandoWorkspaceProject::clone_all()- never called- Unused imports: CloneProtocol, TracingGuard, runner::*, FlywayMigrationRunner re-exports
- TelemetryError simplified to just TracingInit variant
Dependencies Removed
dialoguer- never referencedreqwest- was used by deleted wiremock/reportopen- was used by deleted report.rstokio-stream- never referenced
Bug Fixes
edition = "2024"to"2021"in Cargo.toml (2024 is not a valid Rust edition)- Lifetime error in ssh.rs (Output::lines() borrow)
- Clippy:
.map().flatten()to.and_then()in vfs.rs - Clippy:
.filter_map(|x| x)to.flatten()in vfs.rs - Clippy:
.clone()on double reference in dotenv.rs and profile.rs
Post-Cleanup Architecture
Runtime module (9 files to 4)
artifact.rs- BuiltArtifact struct (used by state management)build_profile.rs- BuildProfile, ServiceBuildDef (used by build + profile commands)docker_client.rs- DockerClient with build/pull/container lifecycle (used by build, up, down, volume commands)infra.rs- ContainerSpec definitions for postgres, wiremock (used by up, volume commands)
Telemetry module (5 files to 2)
error.rs- TelemetryError enumtracing_setup.rs- init_tracing function (used by main.rs)
What still works
All 13 commands remain functional. Build, pull, status, config, profile, mock, migrate, volume, init, up, down, override, release (debug-only).