UAT: [FA-20] agents config set JSON/YAML output uses wrong field names and missing required fields #7803

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

What Was Tested

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

Expected Behavior (from spec)

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

{
  "key": "core.automation-profile",
  "value": "trusted",
  "previous": "manual",
  "source": "config",
  "scope": "global",
  "effective": {
    "sessions": "new sessions",
    "plans": "future plans (unless set)",
    "existing": "unchanged"
  },
  "saved_to": { "file": "~/.cleveragents/config.toml", "line": 8 }
}

Actual Behavior

The implementation at config.py lines 266-272 returns:

result: dict[str, Any] = {
    "key": normalized,
    "value": coerced,
    "previous_value": previous,   # WRONG: spec says "previous"
    "source": "config_file",      # WRONG: spec says "config"
    "scope": scope_display,
    # MISSING: "effective" object
    # MISSING: "saved_to" object
}

Specific Divergences

  1. Field name mismatch: previous_value → should be previous
  2. Source value mismatch: "config_file" → should be "config"
  3. Missing effective object: spec requires {"sessions": ..., "plans": ..., "existing": ...}
  4. Missing saved_to object: spec requires {"file": ..., "line": ...}

Steps to Reproduce

agents --format json config set core.log.level DEBUG

Expected JSON data to have previous, source: "config", effective, and saved_to fields.
Actual JSON data has previous_value, source: "config_file", and is missing effective and saved_to.

Code Location

src/cleveragents/cli/commands/config.py lines 266-289 (config_set 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_set` command JSON/YAML output structure. ## Expected Behavior (from spec) Per `docs/specification.md` §agents config set, the JSON output `data` object should contain: ```json { "key": "core.automation-profile", "value": "trusted", "previous": "manual", "source": "config", "scope": "global", "effective": { "sessions": "new sessions", "plans": "future plans (unless set)", "existing": "unchanged" }, "saved_to": { "file": "~/.cleveragents/config.toml", "line": 8 } } ``` ## Actual Behavior The implementation at `config.py` lines 266-272 returns: ```python result: dict[str, Any] = { "key": normalized, "value": coerced, "previous_value": previous, # WRONG: spec says "previous" "source": "config_file", # WRONG: spec says "config" "scope": scope_display, # MISSING: "effective" object # MISSING: "saved_to" object } ``` ## Specific Divergences 1. **Field name mismatch**: `previous_value` → should be `previous` 2. **Source value mismatch**: `"config_file"` → should be `"config"` 3. **Missing `effective` object**: spec requires `{"sessions": ..., "plans": ..., "existing": ...}` 4. **Missing `saved_to` object**: spec requires `{"file": ..., "line": ...}` ## Steps to Reproduce ```bash agents --format json config set core.log.level DEBUG ``` Expected JSON `data` to have `previous`, `source: "config"`, `effective`, and `saved_to` fields. Actual JSON `data` has `previous_value`, `source: "config_file"`, and is missing `effective` and `saved_to`. ## Code Location `src/cleveragents/cli/commands/config.py` lines 266-289 (`config_set` 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:15 +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 set JSON/YAML output uses wrong field names. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config set JSON/YAML output uses wrong field names. 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 set JSON/YAML output uses wrong field names. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config set JSON/YAML output uses wrong field names. 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 set JSON/YAML output uses wrong field names. Spec violation. MoSCoW: Must-have. Priority: High.


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

✅ **Verified** — UAT bug: config set JSON/YAML output uses wrong field names. 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#7803
No description provided.