refactor(cli): replace verbose/quiet bool pairs with Verbosity enum - #553
Merged
Conversation
exarch-cli's output-formatter and progress-selection code took separate verbose/quiet bool parameters, allowing the nonsensical verbose=true, quiet=true state and, in extract, resolving it inconsistently between the formatter (quiet-wins) and the progress reporter (verbose-wins). create_formatter, HumanFormatter::new, HumanFormatter::with_writers, commands::extract::execute, and commands::create::execute now take a single output::Verbosity (Quiet | Normal | Verbose), resolved once via impl From<&cli::Cli> for Verbosity and threaded through every call site, closing the split-ArgMatches-level gap where clap's conflicts_with does not catch --verbose and --quiet passed at different argument levels. Closes #550
bug-ops
force-pushed
the
feat/550-cli-verbosity-enum
branch
from
August 18, 2026 18:30
edaac44 to
b04e19f
Compare
bug-ops
enabled auto-merge (squash)
August 18, 2026 18:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exarch-cli's output-formatter and progress-selection code took separateverbose: bool, quiet: boolparameters, allowing the nonsensicalverbose: true, quiet: truestate and, inextract, resolving it inconsistently between the formatter (quiet-wins) and the progress reporter (verbose-wins).output::create_formatter,HumanFormatter::new,HumanFormatter::with_writers,commands::extract::execute, andcommands::create::executenow take a singleoutput::Verbosity(Quiet|Normal|Verbose) instead, resolved once viaimpl From<&cli::Cli> for Verbosityinmain.rsand threaded through every call site.--verbose/--quietremain independentclapflags withconflicts_withon--quiet; that check only rejects the pair when both land in the sameArgMatcheslevel (e.g.exarch list --verbose --quiet), so a split-level combination such asexarch --verbose extract archive.tar.gz out --quietstill parses with bothtrue—Verbosity::from_flagsnow resolves that case deterministically toQuiet.Behavior change
extract's progress reporter previously selectedVerboseProgresswhenever--verbosewas passed, even together with--quiet(verbose-wins), while the formatter suppressed the summary (quiet-wins) — so--verbose extract ... --quietprinted per-entry progress lines but no summary. Both now consistently resolve toQuiet(no progress output, no summary) through the sameVerbosityvalue.Closes #550
Test plan
cargo +nightly fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --workspace --all-features --exclude exarch-python --exclude exarch-node(1234/1234)cargo test --doc --workspace --all-features --exclude exarch-python --exclude exarch-node(117/117)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --all-features --workspaceVerbosity::from_flagscombinations, including the previously-nonsensical(true, true)case--verbose extract ... --quietviaCli::parse_fromto verify split-ArgMatches-level resolutionexarch --verbose extract t.tar.gz out --quietnow produces no progress output and no summary, consistent with the formatter