4.1 KiB
4.1 KiB
Tasks: Configuration
Tasks from the task list, under the phase each was done in and by their original numbers. Phases are the order the project was built in, across every spec; 001's tasks give that order in full.
Phase 2: Foundational (Blocking Prerequisites)
Configuration
- T022 Implement the
Configurationroot (schema_version,preferences,endpoints,peers,routes) as YAML with serde derives incrates/core/src/config.rsper data-model §9, flattening the endpoint kind and referencing route endpoints by name so the file is hand-editable - T023 Implement atomic config write (temp file in the same directory, flushed, then renamed) and schema migration in
crates/core/src/config.rsusingserde_yaml_ngper research R-011 — guards FR-051 - T024 Implement corrupt-config recovery in
crates/core/src/config.rs: preserve the unreadable file with a timestamped rename, start from defaults, surface the problem (FR-051) - T025 [P] Resolve per-user config and socket paths via
directories::BaseDirsincrates/core/src/paths.rs— config at~/Library/Application Support/Midi Harbor/on macOS and$XDG_CONFIG_HOME/midi-harbor/on Linux; socket at$TMPDIR/midi-harbor/and$XDG_RUNTIME_DIR/midi-harbor/respectively (research R-009, R-011) - T026 [P] Tests covering YAML round-trip, a hand-written file with no identifiers, route resolution and rename rewriting, schema refusal, atomic write leaving no temporaries, and corrupt-file preservation (quickstart scenario 8)
Platform seam and fake
- T040 [P] Implement
capability::query()incrates/platform/src/capability.rsreturning runtime availability per platform, so unavailable is reported as unavailable rather than broken (FR-053, Principle IV)
Phase 3: User Story 2 — One binary: headless service, CLI, optional GUI (Priority: P1) 🎯 MVP
Implementation for User Story 2
- T061 [US2] Implement config reload and diffing in
crates/daemon/src/reconcile.rsso changes disturb only the connections whose configuration actually changed (FR-050) — built as described;Appliednames what was added, removed and reopened, and an unreadable file is refused with everything left running rather than set aside as at startup - T062 [P] [US2] Implement
config path|show|export|import|reloadcommands incrates/cli/src/config_cmd.rs(FR-052) — ticked beforeexport,importandreloadexisted, when the CLI had onlypathandshowand the three RPCs were stubs; they were built with T061, incrates/cli/src/run.rs
Phase 10: Polish & Cross-Cutting Concerns
- T149 [P] Implement config export/import cross-platform portability tests in
tests/integration/portability.rs(FR-052, SC-015) — the automated half iscrates/daemon/tests/reconcile.rs(merge, replace, identity kept, attached hardware kept); the cross-platform half cannot be automated on one machine and was run by hand in R-043: a setup exported from macOS imported on Linux with the same endpoints and routes - T150 [P] Implement the one-time Apple configuration import in
crates/daemon/src/migrate.rsreading existing IAC bus names and Network MIDI sessions to pre-populate config, never writing to Apple's files (research R-002) — asconfig import-apple, an explicit command that previews and asks for--yes, per the owner; reads through CoreMIDI incrates/platform/src/midi/apple_setup.rsand creates through the daemon's existing requests; R-061
Phase 11: Convergence
- T173 Move the Apple setup read behind a daemon RPC so the CLI no longer queries CoreMIDI, or record the exception in research.md, per Constitution II (contradicts) — done: the daemon reads the setup behind a new ReadAppleSetup RPC, and
config import-appleasks it - T174 Resolve the disagreement between AGENTS.md and plan.md over configuration file I/O in
crates/core/src/config.rs, moving the I/O into the daemon or recording the decision, per AGENTS: layout (contradicts) — done: the owner chose to amend AGENTS.md, which now allowscore/its own configuration file I/O, as plan.md places it