UAT: [FA-20] agents config list JSON/YAML output has wrong structure — flat list instead of spec-required envelope with settings/overrides/config_file #7805

Open
opened 2026-04-12 04:07:46 +00:00 by HAL9000 · 4 comments
Owner

What Was Tested

Code analysis of src/cleveragents/cli/commands/config.py — the config_list command JSON/YAML output structure.

Expected Behavior (from spec)

Per docs/specification.md §agents config list, the JSON output data object should be:

{
  "settings": [
    { "key": "core.automation-profile", "value": "trusted", "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
  }
}

Actual Behavior

The implementation at config.py lines 534-539 passes the settings list directly to format_output:

typer.echo(format_output(settings_list_all, fmt))

This produces a flat JSON array as the data field, instead of the spec-required object with settings, overrides, and config_file sub-objects.

Specific Divergences

  1. Wrong data structure: data is a flat array [{"key": ..., "value": ..., ...}] instead of {"settings": [...], "overrides": {...}, "config_file": {...}}
  2. Missing overrides object: spec requires {"env": null, "cli_flags": null} showing active overrides
  3. Missing config_file object: spec requires {"path": ..., "size_bytes": ..., "valid": ...} showing config file metadata

Steps to Reproduce

agents --format json config list

Expected JSON data to be {"settings": [...], "overrides": {...}, "config_file": {...}}.
Actual JSON data is a flat array of setting objects.

Code Location

src/cleveragents/cli/commands/config.py lines 491-556 (config_list function)


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

## What Was Tested Code analysis of `src/cleveragents/cli/commands/config.py` — the `config_list` command JSON/YAML output structure. ## Expected Behavior (from spec) Per `docs/specification.md` §agents config list, the JSON output `data` object should be: ```json { "settings": [ { "key": "core.automation-profile", "value": "trusted", "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 } } ``` ## Actual Behavior The implementation at `config.py` lines 534-539 passes the settings list directly to `format_output`: ```python typer.echo(format_output(settings_list_all, fmt)) ``` This produces a flat JSON array as the `data` field, instead of the spec-required object with `settings`, `overrides`, and `config_file` sub-objects. ## Specific Divergences 1. **Wrong data structure**: `data` is a flat array `[{"key": ..., "value": ..., ...}]` instead of `{"settings": [...], "overrides": {...}, "config_file": {...}}` 2. **Missing `overrides` object**: spec requires `{"env": null, "cli_flags": null}` showing active overrides 3. **Missing `config_file` object**: spec requires `{"path": ..., "size_bytes": ..., "valid": ...}` showing config file metadata ## Steps to Reproduce ```bash agents --format json config list ``` Expected JSON `data` to be `{"settings": [...], "overrides": {...}, "config_file": {...}}`. Actual JSON `data` is a flat array of setting objects. ## Code Location `src/cleveragents/cli/commands/config.py` lines 491-556 (`config_list` function) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-12 04:21:13 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels: Type/Bug, State/Unverified, Priority/Backlog
  • Reason: Per CONTRIBUTING.md, all issues require State/, Type/, and Priority/* labels

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels: Type/Bug, State/Unverified, Priority/Backlog - Reason: Per CONTRIBUTING.md, all issues require State/*, Type/*, and Priority/* labels --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Verified — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config list JSON/YAML output has wrong structure. Spec violation. MoSCoW: Must-have. Priority: High. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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.

Dependencies

No dependencies set.

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