UAT: audit.* config keys (audit.retention-days, audit.async, audit.queue-maxsize) missing from ConfigService key registry #4892

Open
opened 2026-04-08 20:16:29 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Configuration System — Global Configuration Keys (audit.*)
Severity: Medium — agents config set audit.retention-days fails with "Unknown configuration key"
Found by: UAT tester, code analysis


What Was Tested

The audit.* global configuration keys were compared against the spec and the ConfigService._build_catalog() implementation.

Expected Behavior (from spec)

Per docs/specification.md §Global Configuration Keys, audit.* section (lines 30724–30730):

Key Type Default Env Variable Description
audit.retention-days integer 0 CLEVERAGENTS_AUDIT_RETENTION_DAYS Days to retain audit log entries before pruning. 0 means keep indefinitely.
audit.async boolean true CLEVERAGENTS_AUDIT_ASYNC When true, audit entries are written asynchronously via a write-behind queue.
audit.queue-maxsize integer 10000 CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE Maximum number of pending audit entries in the write-behind queue.

These three keys should be registered in the ConfigService key registry so they can be managed via agents config set/get/list.

Actual Behavior

In src/cleveragents/application/services/config_service.py, _build_catalog(), there is no registration for any audit.* keys. The comment at line 127 claims "All 103 configuration keys are registered here (102 spec-defined + 1 skills extension)" but the audit.* group is entirely absent.

The Settings class in src/cleveragents/config/settings.py does define these fields (lines 216–249):

audit_retention_days: int = Field(default=0, ...)
audit_async: bool = Field(default=True, ...)
audit_queue_maxsize: int = Field(default=10_000, ...)

But these are only accessible via environment variables, not via agents config set/get/list.

Code Location

src/cleveragents/application/services/config_service.py, _build_catalog() — missing audit.* section

Steps to Reproduce

# All of these fail with "Unknown configuration key: 'audit.retention-days'"
agents config set audit.retention-days 90
agents config get audit.retention-days
agents config list audit.*

Impact

  • Users cannot configure audit log retention via agents config set
  • agents config list does not show audit configuration
  • Inconsistent with spec which explicitly documents these as configurable keys
  • The Settings class supports these via env vars, but the config file path is broken

Definition of Done

  • audit.retention-days registered in _build_catalog() (type: int, default: 0, env: CLEVERAGENTS_AUDIT_RETENTION_DAYS, project_scopable: False)
  • audit.async registered (type: bool, default: True, env: CLEVERAGENTS_AUDIT_ASYNC, project_scopable: False)
  • audit.queue-maxsize registered (type: int, default: 10000, env: CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE, project_scopable: False)
  • agents config set audit.retention-days 90 works correctly
  • agents config list audit.* shows all three keys

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

## Bug Report **Feature Area:** Configuration System — Global Configuration Keys (`audit.*`) **Severity:** Medium — `agents config set audit.retention-days` fails with "Unknown configuration key" **Found by:** UAT tester, code analysis --- ### What Was Tested The `audit.*` global configuration keys were compared against the spec and the `ConfigService._build_catalog()` implementation. ### Expected Behavior (from spec) Per `docs/specification.md` §Global Configuration Keys, `audit.*` section (lines 30724–30730): | Key | Type | Default | Env Variable | Description | |-----|------|---------|-------------|-------------| | `audit.retention-days` | integer | `0` | `CLEVERAGENTS_AUDIT_RETENTION_DAYS` | Days to retain audit log entries before pruning. `0` means keep indefinitely. | | `audit.async` | boolean | `true` | `CLEVERAGENTS_AUDIT_ASYNC` | When `true`, audit entries are written asynchronously via a write-behind queue. | | `audit.queue-maxsize` | integer | `10000` | `CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE` | Maximum number of pending audit entries in the write-behind queue. | These three keys should be registered in the `ConfigService` key registry so they can be managed via `agents config set/get/list`. ### Actual Behavior In `src/cleveragents/application/services/config_service.py`, `_build_catalog()`, there is **no registration** for any `audit.*` keys. The comment at line 127 claims "All 103 configuration keys are registered here (102 spec-defined + 1 skills extension)" but the `audit.*` group is entirely absent. The `Settings` class in `src/cleveragents/config/settings.py` does define these fields (lines 216–249): ```python audit_retention_days: int = Field(default=0, ...) audit_async: bool = Field(default=True, ...) audit_queue_maxsize: int = Field(default=10_000, ...) ``` But these are only accessible via environment variables, not via `agents config set/get/list`. ### Code Location `src/cleveragents/application/services/config_service.py`, `_build_catalog()` — missing `audit.*` section ### Steps to Reproduce ```bash # All of these fail with "Unknown configuration key: 'audit.retention-days'" agents config set audit.retention-days 90 agents config get audit.retention-days agents config list audit.* ``` ### Impact - Users cannot configure audit log retention via `agents config set` - `agents config list` does not show audit configuration - Inconsistent with spec which explicitly documents these as configurable keys - The `Settings` class supports these via env vars, but the config file path is broken ### Definition of Done - [ ] `audit.retention-days` registered in `_build_catalog()` (type: int, default: 0, env: `CLEVERAGENTS_AUDIT_RETENTION_DAYS`, project_scopable: False) - [ ] `audit.async` registered (type: bool, default: True, env: `CLEVERAGENTS_AUDIT_ASYNC`, project_scopable: False) - [ ] `audit.queue-maxsize` registered (type: int, default: 10000, env: `CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE`, project_scopable: False) - [ ] `agents config set audit.retention-days 90` works correctly - [ ] `agents config list audit.*` shows all three keys --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
freemo added this to the v3.5.0 milestone 2026-04-08 23:41:37 +00:00
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — audit.* config keys not registered in config service
  • Milestone: v3.5.0 — Audit config is M6 scope
  • Story Points: 5 — L — Registering all audit config keys with proper validation
  • MoSCoW: Should Have — Audit config is important for production use but not blocking core workflow
  • Parent Epic: #360 (Autonomy Hardening + Stubs M6)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — `audit.*` config keys not registered in config service - **Milestone**: v3.5.0 — Audit config is M6 scope - **Story Points**: 5 — L — Registering all audit config keys with proper validation - **MoSCoW**: Should Have — Audit config is important for production use but not blocking core workflow - **Parent Epic**: #360 (Autonomy Hardening + Stubs M6) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

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