Skip to content

feat(cli): global -q/--quiet flag to suppress the WARN log preamble (REQ-151, #353)#399

Merged
avrabe merged 1 commit into
mainfrom
feat/global-quiet-flag
Jun 2, 2026
Merged

feat(cli): global -q/--quiet flag to suppress the WARN log preamble (REQ-151, #353)#399
avrabe merged 1 commit into
mainfrom
feat/global-quiet-flag

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 2, 2026

Closes the --quiet half 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/--verbose to raise the log level but no way to lower it below the default warn.

Change

A global -q/--quiet (mutually exclusive with --verbose) 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.

$ rivet list                 # [WARN rivet] could not load externals: …  ⏎  REQ-1 …
$ rivet --quiet list         # (no stderr)                                ⏎  REQ-1 …
$ rivet -q list --format json   # clean JSON, no preamble

Verification

  • New cli_commands::quiet_suppresses_warn_preamble: on a project with a misconfigured external, default stderr contains WARN, --quiet stderr does not, and stdout still lists the artifact. (Hard errors verified still shown under --quiet.)
  • clippy --all-targets + fmt clean; rivet validate PASS (191), rivet docs check PASS.

Also (triage, verified — no code needed)

#353 part 3 ("tight modify loop silently no-op'd"; "is modify's exit code reliable / can rapid successive modifys race?") does not reproduce on current main: 90/90 rapid sequential rivet modify calls (3 trials × 30) all exited 0 and persisted; validate PASS. Likely resolved by intervening modify rework, or was environment-specific to the reporter's 0.13.3 — and it's superseded by modify --where (#380) regardless. Commenting this on #353.

Implements: REQ-151

🤖 Generated with Claude Code

…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

📐 Rivet artifact delta

Change Count
Added 1
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph 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
Loading
Added
  • REQ-151

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-399download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit 8e9bb4d into main Jun 2, 2026
19 of 39 checks passed
@avrabe avrabe deleted the feat/global-quiet-flag branch June 2, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant