UAT: Settings.log_level default is 'INFO' but spec requires 'FATAL' #4083

Open
opened 2026-04-06 10:09:48 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/settings-log-level-default
  • Commit Message: fix(config): align Settings.log_level default to spec-required FATAL
  • Milestone: (none — backlog)
  • Parent Epic: #397 (Epic: Server & Autonomy Infrastructure)

Backlog note: This issue was discovered during autonomous operation
on milestone v3.4.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Bug Report

What was tested: Settings.log_level default value vs specification

Expected behavior (from spec, section "Global Configuration Keys", core.log.level):

The spec defines:

core.log.level | string | FATAL | CLEVERAGENTS_LOG_LEVEL | Base logging verbosity level. The default FATAL means only fatal errors produce log output; all other log messages are suppressed.

Actual behavior:

In src/cleveragents/config/settings.py, line 120-123:

log_level: str = Field(
    default="INFO",
    validation_alias=AliasChoices("CLEVERAGENTS_LOG_LEVEL"),
)

The Settings.log_level field defaults to "INFO", not "FATAL" as required by the spec.

Impact:

This means that when no CLEVERAGENTS_LOG_LEVEL environment variable is set, the application logs at INFO level instead of FATAL. This produces excessive log output in production environments and violates the spec's intent that "only fatal errors produce log output" by default.

Note: The ConfigService registry correctly registers core.log.level with default "FATAL" (config_service.py line 179), but the Settings class (used for runtime configuration) uses "INFO". This creates an inconsistency between the two configuration layers.

Steps to reproduce:

  1. Instantiate Settings() without setting CLEVERAGENTS_LOG_LEVEL
  2. Check settings.log_level — it returns "INFO" instead of "FATAL"

Code location: src/cleveragents/config/settings.py, line 120-123

Fix: Change default="INFO" to default="FATAL" in the log_level field definition.

Subtasks

  • Change default="INFO" to default="FATAL" in Settings.log_level field (src/cleveragents/config/settings.py, line ~122)
  • Verify ConfigService and Settings are now consistent on core.log.level default
  • Update or add unit test asserting Settings().log_level == "FATAL" when CLEVERAGENTS_LOG_LEVEL is unset
  • Confirm no other Settings fields have defaults that contradict the spec

Definition of Done

  • Settings().log_level returns "FATAL" when CLEVERAGENTS_LOG_LEVEL env var is not set
  • ConfigService default and Settings default are consistent ("FATAL")
  • Unit test added/updated to cover the corrected default
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/settings-log-level-default` - **Commit Message**: `fix(config): align Settings.log_level default to spec-required FATAL` - **Milestone**: (none — backlog) - **Parent Epic**: #397 (Epic: Server & Autonomy Infrastructure) > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.4.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Report **What was tested:** `Settings.log_level` default value vs specification **Expected behavior (from spec, section "Global Configuration Keys", `core.log.level`):** The spec defines: > `core.log.level` | string | `FATAL` | `CLEVERAGENTS_LOG_LEVEL` | Base logging verbosity level. The default `FATAL` means only fatal errors produce log output; all other log messages are suppressed. **Actual behavior:** In `src/cleveragents/config/settings.py`, line 120-123: ```python log_level: str = Field( default="INFO", validation_alias=AliasChoices("CLEVERAGENTS_LOG_LEVEL"), ) ``` The `Settings.log_level` field defaults to `"INFO"`, not `"FATAL"` as required by the spec. **Impact:** This means that when no `CLEVERAGENTS_LOG_LEVEL` environment variable is set, the application logs at INFO level instead of FATAL. This produces excessive log output in production environments and violates the spec's intent that "only fatal errors produce log output" by default. Note: The `ConfigService` registry correctly registers `core.log.level` with default `"FATAL"` (config_service.py line 179), but the `Settings` class (used for runtime configuration) uses `"INFO"`. This creates an inconsistency between the two configuration layers. **Steps to reproduce:** 1. Instantiate `Settings()` without setting `CLEVERAGENTS_LOG_LEVEL` 2. Check `settings.log_level` — it returns `"INFO"` instead of `"FATAL"` **Code location:** `src/cleveragents/config/settings.py`, line 120-123 **Fix:** Change `default="INFO"` to `default="FATAL"` in the `log_level` field definition. ## Subtasks - [ ] Change `default="INFO"` to `default="FATAL"` in `Settings.log_level` field (`src/cleveragents/config/settings.py`, line ~122) - [ ] Verify `ConfigService` and `Settings` are now consistent on `core.log.level` default - [ ] Update or add unit test asserting `Settings().log_level == "FATAL"` when `CLEVERAGENTS_LOG_LEVEL` is unset - [ ] Confirm no other `Settings` fields have defaults that contradict the spec ## Definition of Done - [ ] `Settings().log_level` returns `"FATAL"` when `CLEVERAGENTS_LOG_LEVEL` env var is not set - [ ] `ConfigService` default and `Settings` default are consistent (`"FATAL"`) - [ ] Unit test added/updated to cover the corrected default - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:11:16 +00:00
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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#4083
No description provided.