UAT: Global -v repeatable verbosity flag missing from main CLI — spec requires log verbosity control on all commands #2540

Closed
opened 2026-04-03 18:50:38 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/cli-global-verbosity-flag
  • Commit Message: fix(cli): add global -v repeatable verbosity flag to main callback
  • Milestone: v3.6.0
  • Parent Epic: #945

Background and Context

The specification defines a global -v... (repeatable) option for increasing log verbosity across all CLI commands. This flag is a first-class global option that must be available on every command invocation, not scoped to individual sub-commands.

Current Behavior

Code analysis of /app/src/cleveragents/cli/main.py — specifically the main_callback function (lines 292–310) — reveals that main_callback only accepts version and show_secrets parameters. There is no global -v verbosity flag.

The build command has a local --verbose/-v boolean flag, but this is command-specific and does not control log verbosity globally.

Steps to reproduce:

  1. Run agents -v info → error: unrecognized option -v
  2. Run agents -vvv diagnostics → error: unrecognized option

Expected Behavior

The main CLI callback should accept a repeatable -v flag that increases log verbosity with each repetition:

  • -v → INFO
  • -vv → DEBUG
  • -vvv → TRACE (maximum verbosity)

This must be a global option available on all commands, wired to the Python logging configuration.

Acceptance Criteria

  • -v, -vv, -vvv are accepted as global options on all commands without error
  • Each repetition of -v increases log verbosity by one level (0=WARNING, 1=INFO, 2=DEBUG, 3+=TRACE)
  • The flag is defined on main_callback in main.py, not on individual sub-commands
  • Unit tests (Behave) cover verbosity level mapping and flag repetition
  • Robot Framework integration tests verify the flag works end-to-end on real commands

Supporting Information

Suggested fix — add a repeatable -v count option to main_callback:

verbosity: int = typer.Option(0, "-v", count=True, help="Increase log verbosity (repeatable)")

Wire it to the logging system (e.g., 0=WARNING, 1=INFO, 2=DEBUG, 3+=TRACE).

Code location: src/cleveragents/cli/main.pymain_callback function (lines 292–310)

Impact: Users cannot control log verbosity from the CLI, making debugging difficult. The spec explicitly requires this as a global option.

Subtasks

  • Add repeatable -v count option to main_callback in main.py
  • Wire verbosity level to Python logging configuration
  • Add Behave unit tests for verbosity behavior
  • Add Robot Framework integration tests
  • Update PR and close this issue

Definition of Done

  • -v, -vv, -vvv are accepted as global options on all commands
  • Each repetition increases log verbosity
  • Unit test coverage >= 97%
  • All nox sessions pass
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Branch**: `fix/cli-global-verbosity-flag` - **Commit Message**: `fix(cli): add global -v repeatable verbosity flag to main callback` - **Milestone**: v3.6.0 - **Parent Epic**: #945 ## Background and Context The specification defines a global `-v...` (repeatable) option for increasing log verbosity across all CLI commands. This flag is a first-class global option that must be available on every command invocation, not scoped to individual sub-commands. ## Current Behavior Code analysis of `/app/src/cleveragents/cli/main.py` — specifically the `main_callback` function (lines 292–310) — reveals that `main_callback` only accepts `version` and `show_secrets` parameters. There is no global `-v` verbosity flag. The `build` command has a local `--verbose/-v` boolean flag, but this is command-specific and does not control log verbosity globally. **Steps to reproduce:** 1. Run `agents -v info` → error: unrecognized option `-v` 2. Run `agents -vvv diagnostics` → error: unrecognized option ## Expected Behavior The main CLI callback should accept a repeatable `-v` flag that increases log verbosity with each repetition: - `-v` → INFO - `-vv` → DEBUG - `-vvv` → TRACE (maximum verbosity) This must be a **global** option available on all commands, wired to the Python logging configuration. ## Acceptance Criteria - `-v`, `-vv`, `-vvv` are accepted as global options on all commands without error - Each repetition of `-v` increases log verbosity by one level (0=WARNING, 1=INFO, 2=DEBUG, 3+=TRACE) - The flag is defined on `main_callback` in `main.py`, not on individual sub-commands - Unit tests (Behave) cover verbosity level mapping and flag repetition - Robot Framework integration tests verify the flag works end-to-end on real commands ## Supporting Information **Suggested fix** — add a repeatable `-v` count option to `main_callback`: ```python verbosity: int = typer.Option(0, "-v", count=True, help="Increase log verbosity (repeatable)") ``` Wire it to the logging system (e.g., 0=WARNING, 1=INFO, 2=DEBUG, 3+=TRACE). **Code location:** `src/cleveragents/cli/main.py` — `main_callback` function (lines 292–310) **Impact:** Users cannot control log verbosity from the CLI, making debugging difficult. The spec explicitly requires this as a global option. ## Subtasks - [ ] Add repeatable `-v` count option to `main_callback` in `main.py` - [ ] Wire verbosity level to Python logging configuration - [ ] Add Behave unit tests for verbosity behavior - [ ] Add Robot Framework integration tests - [ ] Update PR and close this issue ## Definition of Done - [ ] `-v`, `-vv`, `-vvv` are accepted as global options on all commands - [ ] Each repetition increases log verbosity - [ ] Unit test coverage >= 97% - [ ] All nox sessions pass - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.6.0 milestone 2026-04-03 18:50:44 +00:00
Author
Owner

Closing as duplicate of #2415. Both issues report the same missing global -v repeatable verbosity flag.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #2415. Both issues report the same missing global `-v` repeatable verbosity flag. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#2540
No description provided.