Dependency Sprawl Audit and Resolution (2026)
Overview
This document records the audit and subsequent remediation of dependency sprawl within the Vox workspace. As the project scaled, individual crates began declaring explicit versions for external dependencies (e.g., axum, uuid, gix, jj-lib) rather than inheriting them from the workspace root. This led to:
- Increased risk of duplicate compilation (multiple semver-compatible versions in
Cargo.lock). - Fragmented security auditing (difficulty in verifying which version of a library is used globally).
- Drift in architectural consistency.
Theoretical Justification
Cargo workspaces allow centralizing version definitions in the root Cargo.toml under [workspace.dependencies]. Sub-crates then use { workspace = true } to inherit these versions.
"Using workspace dependencies ensures that a single version of a crate is used across the entire project, reducing build times and artifact size through deduplication." — (Rust Foundation, 2024).
Audit Methodology (2026-04-13)
The audit was performed using the following steps:
- Discovery: A workspace-wide scan using
grepandcargo metadataidentified allCargo.tomlfiles containing explicitversion = "..."keys for external crates. - Standardization: Sprawling versions were collected and moved to the root
Cargo.toml. Sub-crates were modified to useworkspace = true. - Internal Path Centralization: Local path dependencies (e.g.,
vox-db = { path = "../vox-db" }) were also moved toworkspace.dependenciesto allow for central renaming and relocation of crates without breaking dozens of files.
Resolution Summary
| Crate | Resolved Dependencies | Impact |
|---|---|---|
vox-git | gix, jj-lib | Standardized VCS bridge versions |
vox-populi | axum, tower-http, subtle, ctrlc | Centralized transport layer versions |
vox-mcp | rmcp, wasmtime, rmp-serde, lru | Unified agent-to-agent protocol stack |
vox-toestub | syn, quote, proc-macro2, similar | Synchronized compiler/AST tooling |
CI-CD Governance
To prevent future sprawl, the TOESTUB engine has been updated with an enforcement rule:
arch/workspace_drift (Severity: Error)
The WorkspaceDriftDetector now explicitly blocks:
version = "..."keys in sub-crates.path = "..."keys in sub-crates (except forworkspace-hack).
This ensures that any new dependency introduction MUST pass through the root Cargo.toml, facilitating review by architecture leads.
Future Considerations
- Automated Upgrades: Integrate
cargo-editorcargo-distto perform workspace-wide version bumps. - Vulnerability Scanning: Centralized versions simplify the usage of
cargo-auditto identify CVEs across the entire dependency graph.
References
- Rust Foundation. (2024). Cargo Workspace Documentation. Retrieved from https://doc.rust-lang.org/cargo/reference/workspaces.html
- Vox Architecture SSOT. (2026). AGENTS.md. (Internal Repository Documentation).