122 insertions, 459 deletions. Almost entirely removal.
maestro-cli/src/config.rs was the shallowest module in the workspace: two pass-throughs (one with zero callers), a newtype over one error, a two-field projection of MaestroConfigFile, and one four-line or_else with a single caller. resolve_daemon_url moves onto MaestroConfigFile — next to the schema it reads from — and the module is deleted. Its tests moved with it.
[web].dev_proxy_target is gone end to end: schema field, env var, trailing-slash normalisation, three tests, the README line, and the startup warning at main.rs:53 that admitted the server never honoured it.
MaestroConfigFile::save had no callers outside its own tests — the installer tells the user to hand-edit config.toml rather than writing it. Deleting it also removed every skip_serializing_if, all five is_empty impls, and the Serialize derives that existed solely to make its output tidy.
BroadcastTuning was a struct that was never instantiated: all three uses were ::DEFAULT.field in const position and there is no [broadcast] section in the schema. Now two plain consts.
$MAESTRO_CONFIG was honoured by two different mechanisms — resolve_config_path (TUI only) and clap's env = (everywhere else). Every binary already receives it through clap, including the TUI via the umbrella's global --config, so resolve_config_path and CONFIG_PATH_ENV are deleted and the TUI falls back to default_config_path like everything else. One mechanism, and it shows up in --help.
Finally, three layers of 1:1 forwarding collapse into one: the umbrella's cli_dispatch shim (which forwarded three arguments verbatim), and four near-identical 8-line functions in cli/dispatch.rs that differed only in which run_* they called. dispatch.rs goes 113 → 80 lines and now builds the client once instead of four times.
What I did not delete:maestro-daemon/src/config.rs and maestro-tui/src/config.rs. The review called all four config modules into question, but those two earn their keep — the daemon's does three-level env precedence, a gethostname syscall and derived paths; the TUI's compiles the keymap, including the rule that rebinding the leader moves its Insert-mode escape. The TUI one is arguably misnamed (keymap_builder.rs would be honest) but renaming it is churn without a payoff.
Verification
cargo fmt --all -- --check ok
cargo clippy --all-targets -- -D warnings 0
cargo test --all 304 passed, 0 failed
pnpm -C web test 36 passed
304 rather than 309: four save tests and one resolve_config_path test went with the code they covered, three CLI config tests moved to maestro-config, and the BroadcastTuning test became a two-line const check.
Seventh of nine from the architecture review (#40–#45 merged).
**122 insertions, 459 deletions.** Almost entirely removal.
`maestro-cli/src/config.rs` was the shallowest module in the workspace: two pass-throughs (one with zero callers), a newtype over one error, a two-field projection of `MaestroConfigFile`, and one four-line `or_else` with a single caller. `resolve_daemon_url` moves onto `MaestroConfigFile` — next to the schema it reads from — and the module is deleted. Its tests moved with it.
`[web].dev_proxy_target` is gone end to end: schema field, env var, trailing-slash normalisation, three tests, the README line, and the startup warning at `main.rs:53` that admitted the server never honoured it.
`MaestroConfigFile::save` had no callers outside its own tests — the installer tells the user to hand-edit `config.toml` rather than writing it. Deleting it also removed every `skip_serializing_if`, all five `is_empty` impls, and the `Serialize` derives that existed solely to make its output tidy.
`BroadcastTuning` was a struct that was never instantiated: all three uses were `::DEFAULT.field` in `const` position and there is no `[broadcast]` section in the schema. Now two plain consts.
`$MAESTRO_CONFIG` was honoured by two different mechanisms — `resolve_config_path` (TUI only) and clap's `env =` (everywhere else). Every binary already receives it through clap, including the TUI via the umbrella's global `--config`, so `resolve_config_path` and `CONFIG_PATH_ENV` are deleted and the TUI falls back to `default_config_path` like everything else. One mechanism, and it shows up in `--help`.
Finally, three layers of 1:1 forwarding collapse into one: the umbrella's `cli_dispatch` shim (which forwarded three arguments verbatim), and four near-identical 8-line functions in `cli/dispatch.rs` that differed only in which `run_*` they called. `dispatch.rs` goes 113 → 80 lines and now builds the client once instead of four times.
**What I did not delete:** `maestro-daemon/src/config.rs` and `maestro-tui/src/config.rs`. The review called all four config modules into question, but those two earn their keep — the daemon's does three-level env precedence, a `gethostname` syscall and derived paths; the TUI's compiles the keymap, including the rule that rebinding the leader moves its Insert-mode escape. The TUI one is arguably misnamed (`keymap_builder.rs` would be honest) but renaming it is churn without a payoff.
<details>
<summary>Verification</summary>
```
cargo fmt --all -- --check ok
cargo clippy --all-targets -- -D warnings 0
cargo test --all 304 passed, 0 failed
pnpm -C web test 36 passed
```
304 rather than 309: four `save` tests and one `resolve_config_path` test went with the code they covered, three CLI config tests moved to `maestro-config`, and the `BroadcastTuning` test became a two-line const check.
</details>
Seventh of nine from the architecture review (#40–#45 merged).
maestro-cli/src/config.rs was two pass-throughs, a newtype error, a
two-field projection of MaestroConfigFile, and one four-line or_else with
a single caller. `resolve_daemon_url` moves onto MaestroConfigFile, next
to the schema it reads, and the module goes; its tests move with it.
`[web].dev_proxy_target` is deleted end to end — schema, env var,
normalisation, three tests, README line, and the startup warning that
admitted the server ignores it.
MaestroConfigFile::save had no callers outside its own tests. Deleting it
also removes every skip_serializing_if, the five is_empty impls, and the
Serialize derives that existed only to make its output tidy.
BroadcastTuning was a struct that was never instantiated: all three uses
were `::DEFAULT.field` in const position and there is no [broadcast]
section. Now two plain consts.
$MAESTRO_CONFIG was honoured twice, by resolve_config_path and by clap's
`env =`. Every binary already gets it through clap, so resolve_config_path
and CONFIG_PATH_ENV go and the TUI falls back to default_config_path like
everything else.
Also collapses three layers of 1:1 forwarding: the umbrella's cli_dispatch
shim, and four near-identical 8-line functions in cli/dispatch.rs that
differed only in which run_* they called.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
122 insertions, 459 deletions. Almost entirely removal.
maestro-cli/src/config.rswas the shallowest module in the workspace: two pass-throughs (one with zero callers), a newtype over one error, a two-field projection ofMaestroConfigFile, and one four-lineor_elsewith a single caller.resolve_daemon_urlmoves ontoMaestroConfigFile— next to the schema it reads from — and the module is deleted. Its tests moved with it.[web].dev_proxy_targetis gone end to end: schema field, env var, trailing-slash normalisation, three tests, the README line, and the startup warning atmain.rs:53that admitted the server never honoured it.MaestroConfigFile::savehad no callers outside its own tests — the installer tells the user to hand-editconfig.tomlrather than writing it. Deleting it also removed everyskip_serializing_if, all fiveis_emptyimpls, and theSerializederives that existed solely to make its output tidy.BroadcastTuningwas a struct that was never instantiated: all three uses were::DEFAULT.fieldinconstposition and there is no[broadcast]section in the schema. Now two plain consts.$MAESTRO_CONFIGwas honoured by two different mechanisms —resolve_config_path(TUI only) and clap'senv =(everywhere else). Every binary already receives it through clap, including the TUI via the umbrella's global--config, soresolve_config_pathandCONFIG_PATH_ENVare deleted and the TUI falls back todefault_config_pathlike everything else. One mechanism, and it shows up in--help.Finally, three layers of 1:1 forwarding collapse into one: the umbrella's
cli_dispatchshim (which forwarded three arguments verbatim), and four near-identical 8-line functions incli/dispatch.rsthat differed only in whichrun_*they called.dispatch.rsgoes 113 → 80 lines and now builds the client once instead of four times.What I did not delete:
maestro-daemon/src/config.rsandmaestro-tui/src/config.rs. The review called all four config modules into question, but those two earn their keep — the daemon's does three-level env precedence, agethostnamesyscall and derived paths; the TUI's compiles the keymap, including the rule that rebinding the leader moves its Insert-mode escape. The TUI one is arguably misnamed (keymap_builder.rswould be honest) but renaming it is churn without a payoff.Verification
304 rather than 309: four
savetests and oneresolve_config_pathtest went with the code they covered, three CLI config tests moved tomaestro-config, and theBroadcastTuningtest became a two-line const check.Seventh of nine from the architecture review (#40–#45 merged).