UAT: main.py hardcodes WARNING log level instead of reading core.log.level config; repeatable -v flag not implemented #5119

Open
opened 2026-04-09 01:07:02 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: Configuration System — Global Configuration Keys (core.log.level), CLI -v flag

Severity: High (core logging behavior does not follow spec; -v verbosity escalation missing)

What Was Tested

  1. Whether the CLI reads core.log.level from the config system at startup
  2. Whether the -v flag is repeatable (up to -vvvvv) to raise log verbosity

Expected Behavior (from spec)

Per the specification (§ Global Flags, line 401):

-v: Increase log verbosity for a single invocation (repeatable). By default (no -v), only normal command output is shown on stdout; logging output is suppressed except on fatal errors. Each additional -v raises the verbosity one level:

  • -v = ERROR
  • -vv = WARN
  • -vvv = INFO
  • -vvvv = DEBUG
  • -vvvvv = TRACE

The effective log level at startup (before any -v flags) should be read from core.log.level (default: FATAL).

Actual Behavior (from code analysis)

Issue 1 — Hardcoded WARNING level:

In src/cleveragents/cli/main.py, the main_callback function (line 328) hardcodes the log level:

configure_structlog(log_level="WARNING")

This is repeated at lines 374, 405, and 686. The log level is never read from core.log.level config. The spec requires the default to be FATAL (read from config), not WARNING.

Issue 2 — -v flag is not repeatable:

The main_callback function does not define a repeatable -v / --verbose flag. The only verbose-related option found is a boolean --verbose flag in individual subcommands (e.g., config get --verbose), which is unrelated to the global log verbosity escalation.

The spec requires the global -v flag to be repeatable (count-based) and map to log levels:

-v      → ERROR
-vv     → WARN
-vvv    → INFO
-vvvv   → DEBUG
-vvvvv  → TRACE

Code Location

  • src/cleveragents/cli/main.py, lines 328, 374, 405, 686: hardcoded "WARNING" log level
  • src/cleveragents/cli/main.py, main_callback function: missing repeatable -v count option

Steps to Reproduce

  1. Set core.log.level = FATAL in ~/.cleveragents/config.toml
  2. Run agents info
  3. Observe: WARNING-level logs still appear (config is ignored)
  4. Run agents -vvv info
  5. Observe: -vvv is not recognized as a valid flag (or does not raise log level to INFO)

Impact

  • The log level is always WARNING regardless of the user's core.log.level config setting
  • Users cannot use -v / -vv / -vvv etc. to raise log verbosity for debugging
  • The spec's verbosity escalation system is completely unimplemented

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

## Bug Report **Feature Area:** Configuration System — Global Configuration Keys (`core.log.level`), CLI `-v` flag **Severity:** High (core logging behavior does not follow spec; `-v` verbosity escalation missing) ### What Was Tested 1. Whether the CLI reads `core.log.level` from the config system at startup 2. Whether the `-v` flag is repeatable (up to `-vvvvv`) to raise log verbosity ### Expected Behavior (from spec) Per the specification (§ Global Flags, line 401): > `-v`: Increase log verbosity for a single invocation (repeatable). By default (no `-v`), only normal command output is shown on stdout; logging output is suppressed except on fatal errors. Each additional `-v` raises the verbosity one level: > - `-v` = ERROR > - `-vv` = WARN > - `-vvv` = INFO > - `-vvvv` = DEBUG > - `-vvvvv` = TRACE The effective log level at startup (before any `-v` flags) should be read from `core.log.level` (default: `FATAL`). ### Actual Behavior (from code analysis) **Issue 1 — Hardcoded `WARNING` level:** In `src/cleveragents/cli/main.py`, the `main_callback` function (line 328) hardcodes the log level: ```python configure_structlog(log_level="WARNING") ``` This is repeated at lines 374, 405, and 686. The log level is never read from `core.log.level` config. The spec requires the default to be `FATAL` (read from config), not `WARNING`. **Issue 2 — `-v` flag is not repeatable:** The `main_callback` function does not define a repeatable `-v` / `--verbose` flag. The only verbose-related option found is a boolean `--verbose` flag in individual subcommands (e.g., `config get --verbose`), which is unrelated to the global log verbosity escalation. The spec requires the global `-v` flag to be repeatable (count-based) and map to log levels: ``` -v → ERROR -vv → WARN -vvv → INFO -vvvv → DEBUG -vvvvv → TRACE ``` ### Code Location - `src/cleveragents/cli/main.py`, lines 328, 374, 405, 686: hardcoded `"WARNING"` log level - `src/cleveragents/cli/main.py`, `main_callback` function: missing repeatable `-v` count option ### Steps to Reproduce 1. Set `core.log.level = FATAL` in `~/.cleveragents/config.toml` 2. Run `agents info` 3. Observe: WARNING-level logs still appear (config is ignored) 4. Run `agents -vvv info` 5. Observe: `-vvv` is not recognized as a valid flag (or does not raise log level to INFO) ### Impact - The log level is always `WARNING` regardless of the user's `core.log.level` config setting - Users cannot use `-v` / `-vv` / `-vvv` etc. to raise log verbosity for debugging - The spec's verbosity escalation system is completely unimplemented --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:10:57 +00:00
Author
Owner

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0.


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

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0.


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

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: 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#5119
No description provided.