UAT: audit.* config keys missing from ConfigService registry — agents config set audit.* fails with "Unknown configuration key" #3640

Open
opened 2026-04-05 21:02:40 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/audit-config-keys-registry
  • Commit Message: fix(config): register audit.* keys in ConfigService _build_catalog()
  • Milestone: (none — backlog)
  • Parent Epic: #398

Background and Context

The specification (docs/specification.md, section "Global Configuration Keys", subsection audit.*) defines 3 audit configuration keys that must be manageable via the agents config CLI:

Key Type Default Env Variable
audit.retention-days integer 0 CLEVERAGENTS_AUDIT_RETENTION_DAYS
audit.async boolean true CLEVERAGENTS_AUDIT_ASYNC
audit.queue-maxsize integer 10000 CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE

The Settings class in src/cleveragents/config/settings.py (lines 182–215) correctly defines audit_retention_days, audit_async, and audit_queue_maxsize fields. However, these are not wired into the ConfigService registry that backs the agents config CLI commands.

Current Behavior

The _build_catalog() function in src/cleveragents/application/services/config_service.py registers 106 configuration keys but does not register any audit.* keys. The comment at line 123 states "All 103 configuration keys are registered here (102 spec-defined + 1 skills extension)" but the audit.* section is entirely absent.

Steps to reproduce:

  1. Run agents config set audit.retention-days 90
  2. Observe the following error:
ValueError: Unknown configuration key: 'audit.retention-days'. Valid keys include: actor.default.estimation, actor.default.execution, ...

The same failure occurs for audit.async and audit.queue-maxsize.

Expected Behavior

Per the specification, all of the following should work:

$ agents config set audit.retention-days 90
$ agents config get audit.async
$ agents config list audit.*

Code Location

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

Impact

Users cannot manage audit log retention or async queue settings via the agents config CLI commands. The audit.* config keys are completely inaccessible through the standard config management interface.


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

Subtasks

  • Add audit.* section to _build_catalog() in src/cleveragents/application/services/config_service.py with the 3 spec-defined keys (audit.retention-days, audit.async, audit.queue-maxsize) using correct types, defaults, and env var names matching the spec
  • Write Behave unit test scenarios verifying agents config set/get/list works for all 3 audit.* keys
  • Verify nox -e typecheck passes
  • Verify nox -e unit_tests passes with coverage >= 97%

Definition of Done

  • All 3 audit.* keys are registered in _build_catalog() with correct types, defaults, and env var names matching the spec
  • agents config set audit.retention-days 90 succeeds
  • agents config get audit.async returns true
  • agents config list audit.* lists all 3 keys
  • Behave unit tests cover the new keys
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/audit-config-keys-registry` - **Commit Message**: `fix(config): register audit.* keys in ConfigService _build_catalog()` - **Milestone**: *(none — backlog)* - **Parent Epic**: #398 ## Background and Context The specification (`docs/specification.md`, section "Global Configuration Keys", subsection `audit.*`) defines 3 audit configuration keys that must be manageable via the `agents config` CLI: | Key | Type | Default | Env Variable | |-----|------|---------|-------------| | `audit.retention-days` | integer | `0` | `CLEVERAGENTS_AUDIT_RETENTION_DAYS` | | `audit.async` | boolean | `true` | `CLEVERAGENTS_AUDIT_ASYNC` | | `audit.queue-maxsize` | integer | `10000` | `CLEVERAGENTS_AUDIT_QUEUE_MAXSIZE` | The `Settings` class in `src/cleveragents/config/settings.py` (lines 182–215) correctly defines `audit_retention_days`, `audit_async`, and `audit_queue_maxsize` fields. However, these are **not wired** into the `ConfigService` registry that backs the `agents config` CLI commands. ## Current Behavior The `_build_catalog()` function in `src/cleveragents/application/services/config_service.py` registers 106 configuration keys but does **not** register any `audit.*` keys. The comment at line 123 states "All 103 configuration keys are registered here (102 spec-defined + 1 skills extension)" but the `audit.*` section is entirely absent. **Steps to reproduce:** 1. Run `agents config set audit.retention-days 90` 2. Observe the following error: ``` ValueError: Unknown configuration key: 'audit.retention-days'. Valid keys include: actor.default.estimation, actor.default.execution, ... ``` The same failure occurs for `audit.async` and `audit.queue-maxsize`. ## Expected Behavior Per the specification, all of the following should work: ```bash $ agents config set audit.retention-days 90 $ agents config get audit.async $ agents config list audit.* ``` ## Code Location `src/cleveragents/application/services/config_service.py`, `_build_catalog()` function — the `audit.*` section is missing entirely. ## Impact Users cannot manage audit log retention or async queue settings via the `agents config` CLI commands. The `audit.*` config keys are completely inaccessible through the standard config management interface. --- > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0 — Post-MVP Release. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Subtasks - [ ] Add `audit.*` section to `_build_catalog()` in `src/cleveragents/application/services/config_service.py` with the 3 spec-defined keys (`audit.retention-days`, `audit.async`, `audit.queue-maxsize`) using correct types, defaults, and env var names matching the spec - [ ] Write Behave unit test scenarios verifying `agents config set/get/list` works for all 3 `audit.*` keys - [ ] Verify `nox -e typecheck` passes - [ ] Verify `nox -e unit_tests` passes with coverage >= 97% ## Definition of Done - [ ] All 3 `audit.*` keys are registered in `_build_catalog()` with correct types, defaults, and env var names matching the spec - [ ] `agents config set audit.retention-days 90` succeeds - [ ] `agents config get audit.async` returns `true` - [ ] `agents config list audit.*` lists all 3 keys - [ ] Behave unit tests cover the new keys - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog — Missing config registry entries. The Settings fields exist but aren't wired into the CLI config interface.
  • Story Points: 2 — S — Add 3 entries to _build_catalog() with correct types, defaults, and env var names. Straightforward.
  • MoSCoW: Should Have — The spec defines these 3 audit config keys as part of the Global Configuration Keys. Users cannot manage audit settings via agents config, which is a spec compliance gap.
  • Parent Epic: #398

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog — Missing config registry entries. The Settings fields exist but aren't wired into the CLI config interface. - **Story Points**: 2 — S — Add 3 entries to `_build_catalog()` with correct types, defaults, and env var names. Straightforward. - **MoSCoW**: Should Have — The spec defines these 3 audit config keys as part of the Global Configuration Keys. Users cannot manage audit settings via `agents config`, which is a spec compliance gap. - **Parent Epic**: #398 --- **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.

Blocks
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3640
No description provided.