refactor(maestro): one default-on-missing config loader

load() and load_or_default() differed only in whether a missing file was
an error. Nothing wants the error: every field has a default. Keeps
load(), drops the MissingFile variant, whose message pointed at the
`maestro daemon configure` subcommand the single-host refactor deleted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-22 10:49:39 +01:00
co-authored by Claude Opus 5
parent bf7def5cf1
commit 8ff5046ff3
5 changed files with 9 additions and 42 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ impl CliConfig {
/// Load the subset of the unified file the CLI consumes. A missing file is
/// fine — every field has a default.
pub fn load(path: &Path) -> Result<Self, ConfigError> {
let file = MaestroConfigFile::load_or_default(path)?;
let file = MaestroConfigFile::load(path)?;
Ok(Self {
daemon_url: file.cli.daemon_url,
daemon_bind_addr: file.daemon.bind_addr,