UAT: agents config list JSON output is a flat array instead of spec-required nested structure with settings, overrides, and config_file keys #5122

Open
opened 2026-04-09 01:07:42 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Configuration System — agents config list command output

Severity: Medium (JSON/YAML output format deviates from spec; breaks machine-readable consumers)

What Was Tested

The JSON output format of agents config list as defined in the specification.

Expected Behavior (from spec)

Per the specification (§ agents config list, JSON output example):

{
  "command": "config list",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "settings": [
      { "key": "core.automation-profile", "value": "trusted", "source": "config", "modified": true },
      { "key": "actor.default.invariant", "value": "local/reconciler", "source": "config", "modified": true },
      { "key": "core.log.level", "value": "FATAL", "source": "default", "modified": false }
    ],
    "overrides": { "env": null, "cli_flags": null },
    "config_file": {
      "path": "~/.cleveragents/config.toml",
      "size_bytes": 284,
      "valid": true
    }
  },
  "messages": ["6 settings listed"]
}

The data key must be an object with three sub-keys: settings (array), overrides (object), and config_file (object).

Actual Behavior (from code analysis)

In src/cleveragents/cli/commands/config.py, the config_list command outputs a flat array of settings directly:

settings_list_all: list[dict[str, Any]] = []
# ... populate list ...
typer.echo(format_output(settings_list_all, fmt))

The output is a plain JSON array like:

[
  { "key": "core.automation-profile", "value": "trusted", "source": "config", "modified": true },
  ...
]

Missing from spec:

  1. The settings array is not wrapped in a data object
  2. No overrides object (env vars and CLI flags currently active)
  3. No config_file object (path, size, validity)

Code Location

  • src/cleveragents/cli/commands/config.py, config_list function, output construction

Steps to Reproduce

agents config list --format json

Observe the output is a flat array instead of the spec-required nested structure.

Impact

Any tooling parsing agents config list --format json will receive a flat array instead of the expected nested structure. The overrides section is important for debugging which env vars are currently overriding config file values. The config_file section is important for validating the config file path and integrity.


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

## Bug Report **Feature Area:** Configuration System — `agents config list` command output **Severity:** Medium (JSON/YAML output format deviates from spec; breaks machine-readable consumers) ### What Was Tested The JSON output format of `agents config list` as defined in the specification. ### Expected Behavior (from spec) Per the specification (§ agents config list, JSON output example): ```json { "command": "config list", "status": "ok", "exit_code": 0, "data": { "settings": [ { "key": "core.automation-profile", "value": "trusted", "source": "config", "modified": true }, { "key": "actor.default.invariant", "value": "local/reconciler", "source": "config", "modified": true }, { "key": "core.log.level", "value": "FATAL", "source": "default", "modified": false } ], "overrides": { "env": null, "cli_flags": null }, "config_file": { "path": "~/.cleveragents/config.toml", "size_bytes": 284, "valid": true } }, "messages": ["6 settings listed"] } ``` The `data` key must be an **object** with three sub-keys: `settings` (array), `overrides` (object), and `config_file` (object). ### Actual Behavior (from code analysis) In `src/cleveragents/cli/commands/config.py`, the `config_list` command outputs a **flat array** of settings directly: ```python settings_list_all: list[dict[str, Any]] = [] # ... populate list ... typer.echo(format_output(settings_list_all, fmt)) ``` The output is a plain JSON array like: ```json [ { "key": "core.automation-profile", "value": "trusted", "source": "config", "modified": true }, ... ] ``` **Missing from spec:** 1. The `settings` array is not wrapped in a `data` object 2. No `overrides` object (env vars and CLI flags currently active) 3. No `config_file` object (path, size, validity) ### Code Location - `src/cleveragents/cli/commands/config.py`, `config_list` function, output construction ### Steps to Reproduce ```bash agents config list --format json ``` Observe the output is a flat array instead of the spec-required nested structure. ### Impact Any tooling parsing `agents config list --format json` will receive a flat array instead of the expected nested structure. The `overrides` section is important for debugging which env vars are currently overriding config file values. The `config_file` section is important for validating the config file path and integrity. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:10:56 +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
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#5122
No description provided.