refactor(M0.3): establish domain crate boundary
Add dependency-free fader-core and inward-only fader-config crates, wire existing adapters and clients toward the domain layer, and remove scaffold arithmetic tests. Tests: cargo test -p fader-core -p fader-config --all-targets --locked (passed without device/runtime dependencies) Tests: cargo check --workspace --all-targets --all-features --locked; cargo tree --workspace --locked --edges normal; git diff --check (passed)
This commit is contained in:
parent
bccc948ebd
commit
123a67732f
|
|
@ -140,9 +140,27 @@ dependencies = [
|
|||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fader-config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fader-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fader-core"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "fader_master"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fader-config",
|
||||
"fader-core",
|
||||
"midi",
|
||||
"tui",
|
||||
"volume_lib",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
|
|
@ -249,6 +267,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "midi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fader-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
|
|
@ -541,6 +562,7 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
|
|||
name = "tui"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fader-core",
|
||||
"ratatui",
|
||||
]
|
||||
|
||||
|
|
@ -582,6 +604,9 @@ checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
|||
[[package]]
|
||||
name = "volume_lib"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fader-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[workspace]
|
||||
members = ["fader_master", "midi", "sound", "tui"]
|
||||
members = ["config", "core", "fader_master", "midi", "sound", "tui"]
|
||||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
|
|
@ -11,7 +11,12 @@ repository = "https://git.dandaedre.com/MadGobblins/fader_master"
|
|||
publish = false
|
||||
|
||||
[workspace.dependencies]
|
||||
fader-config = { path = "config" }
|
||||
fader-core = { path = "core" }
|
||||
midi = { path = "midi" }
|
||||
ratatui = { version = "0.29.0", features = ["all-widgets", "serde"] }
|
||||
tui = { path = "tui" }
|
||||
volume_lib = { path = "sound" }
|
||||
|
||||
[profile.dev]
|
||||
debug = true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fader-config"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
fader-core.workspace = true
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
//! TOML schemas, validation, migration, and persistence for fader_master.
|
||||
//!
|
||||
//! Configuration depends on domain contracts but never on runtime adapters.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "fader-core"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
//! Pure domain contracts for fader_master.
|
||||
//!
|
||||
//! This crate deliberately has no runtime, terminal, filesystem, MIDI, or
|
||||
//! native audio dependencies.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
@ -8,3 +8,8 @@ repository.workspace = true
|
|||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
fader-config.workspace = true
|
||||
fader-core.workspace = true
|
||||
midi.workspace = true
|
||||
tui.workspace = true
|
||||
volume_lib.workspace = true
|
||||
|
|
|
|||
|
|
@ -8,3 +8,4 @@ repository.workspace = true
|
|||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
fader-core.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
//! MIDI transport, device identity, bindings, and feedback adapters.
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
|||
|
|
@ -8,3 +8,4 @@ repository.workspace = true
|
|||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
fader-core.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
//! Audio adapter workers for fader_master.
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
|||
2
task.md
2
task.md
|
|
@ -21,7 +21,7 @@ Dependencies: planning.
|
|||
- [ ] **M0.2 CI gates:** align Jenkins with AGENTS.md, including doctests, Clippy `-D warnings`, release build and later backend feature matrix. Acceptance: representative formatting/lint/test failures fail the pipeline; default and full-feature builds pass with provisioned dependencies.
|
||||
Repository configuration now runs locked default, no-default-features, and all-features checks/tests plus warning-strict documentation, Clippy, and release gates. Keep this open until a real Jenkins run on the provisioned worker passes.
|
||||
- [x] **M0.2a Coverage badges:** measure locked all-target line coverage with a pinned tool, enforce the documented 20% scaffold floor, and generate/archive the version, test, and coverage badges on every build. Publish atomically only from `main`, with fresh-build markers preventing stale test or coverage values. Acceptance: renderer, coverage lifecycle, finalization, and publication fixture tests pass; the real local measurement is above the floor. Jenkins publication and public retrieval remain deployment checks.
|
||||
- [ ] **M0.3 Domain boundary:** add `fader-core` and `fader-config`, wire current crates inward, remove placeholder arithmetic tests as real contracts replace them. Acceptance: core tests run without a terminal, sound daemon, native device connection, or Tokio runtime; dependency graph has no cycles.
|
||||
- [x] **M0.3 Domain boundary:** add `fader-core` and `fader-config`, wire current crates inward, remove placeholder arithmetic tests as real contracts replace them. Acceptance: core tests run without a terminal, sound daemon, native device connection, or Tokio runtime; dependency graph has no cycles.
|
||||
|
||||
## M1 — Domain state and virtual objects
|
||||
|
||||
|
|
|
|||
|
|
@ -8,4 +8,5 @@ repository.workspace = true
|
|||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
fader-core.workspace = true
|
||||
ratatui.workspace = true
|
||||
|
|
|
|||
|
|
@ -103,10 +103,3 @@ pub struct SingleFader {
|
|||
// application: String,
|
||||
midi_note: Vec<usize>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
#[test]
|
||||
fn it_works() {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue