feat(cli): global -q/--quiet flag to suppress the WARN log preamble (REQ-151, #353)#399
Merged
Conversation
…REQ-151, #353) #353 feature ask: every invocation can emit WARN-level log lines before a command's real output (e.g. "could not load externals: …"), noise for scripted/agent consumption — especially with `--format json`. There was `-v/--verbose` to raise the log level but no way to lower it below the default `warn`. Add a global `-q/--quiet` (mutually exclusive with `--verbose`) that sets the log filter to `error`: the WARN preamble is suppressed while the command's own stdout and hard-error reporting stay intact. Pairs with `--format json` for clean machine-consumable output. Verified: on a project with a misconfigured external, default emits `[WARN rivet] could not load externals: …` but `--quiet` emits nothing on stderr and stdout still lists the artifact; a hard config error is still reported under `--quiet`. New `cli_commands::quiet_suppresses_warn_preamble` test; clippy --all-targets + fmt clean; rivet validate + docs check PASS. Also records (verified this iteration, no code needed): #353 part 3 (the "tight modify loop silently no-op'd" race) does NOT reproduce on current main — 90/90 rapid sequential `modify`s succeeded and persisted across 3 trials; superseded anyway by `modify --where` (#380). Implements: REQ-151 Refs: REQ-007 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_151["REQ-151"]:::added
classDef added fill:#d4edda,stroke:#28a745,color:#155724
classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Added
Posted by |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes the
--quiethalf of #353's agent-ergonomics asks.Problem
Every rivet invocation can emit WARN-level log lines before a command's real output (e.g.
[WARN rivet] could not load externals: …), which is noise for scripted/agent consumption — especially with--format json. There was-v/--verboseto raise the log level but no way to lower it below the defaultwarn.Change
A global
-q/--quiet(mutually exclusive with--verbose) sets the log filter toerror: the WARN preamble is suppressed, while the command's own stdout and hard-error reporting stay intact. Pairs with--format json.Verification
cli_commands::quiet_suppresses_warn_preamble: on a project with a misconfigured external, default stderr containsWARN,--quietstderr does not, and stdout still lists the artifact. (Hard errors verified still shown under--quiet.)--all-targets+ fmt clean;rivet validatePASS (191),rivet docs checkPASS.Also (triage, verified — no code needed)
#353 part 3 ("tight
modifyloop silently no-op'd"; "is modify's exit code reliable / can rapid successive modifys race?") does not reproduce on currentmain: 90/90 rapid sequentialrivet modifycalls (3 trials × 30) all exited 0 and persisted;validatePASS. Likely resolved by intervening modify rework, or was environment-specific to the reporter's 0.13.3 — and it's superseded bymodify --where(#380) regardless. Commenting this on #353.Implements: REQ-151
🤖 Generated with Claude Code