UAT: agents config get output missing spec-required 'Origin' panel, 'Overridden' field, and 'Winner' in resolution chain; JSON output missing standard envelope #3423

Open
opened 2026-04-05 16:38:33 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/config-get-output-missing-origin-panel-and-envelope
  • Commit Message: fix(cli): add missing Origin panel, Overridden field, Winner indicator, and JSON envelope in config get output
  • Milestone: (none — backlog)
  • Parent Epic: #3370

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

Bug Description

The specification (docs/specification.md, section "agents config get") defines a specific output format for the agents config get command that the implementation does not match.

What was tested

Code-level analysis of src/cleveragents/cli/commands/config.py — specifically the config_get() function's output rendering.

Expected behavior (from spec — Rich format)

╭─ Config ──────────────────────────╮
│ Key: core.automation-profile      │
│ Value: trusted                    │
│ Source: config                    │
│ Overridden: no                    │
│ Type: string                      │
╰───────────────────────────────────╯

╭─ Origin ──────────────────────────╮
│ File: ~/.cleveragents/config.toml │
│ Line: 8                           │
│ Default: supervised               │
╰───────────────────────────────────╯

╭─ Resolution Chain ──────────────╮
│ 1. CLI flag: (not set)          │
│ 2. Env var: (not set)           │
│ 3. Config file: trusted         │
│ 4. Default: supervised          │
│ Winner: config file (level 3)   │
╰─────────────────────────────────╯

✓ OK Config read

Expected behavior (from spec — JSON format)

{
  "command": "config get",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "key": "core.automation-profile",
    "value": "trusted",
    "source": "config",
    "overridden": false,
    "type": "string",
    "origin": {
      "file": "~/.cleveragents/config.toml",
      "line": 8,
      "default": "supervised"
    },
    "resolution_chain": [
      { "level": 1, "source": "CLI flag", "value": null },
      { "level": 2, "source": "Env var", "value": null },
      { "level": 3, "source": "Config file", "value": "trusted" },
      { "level": 4, "source": "Default", "value": "supervised" }
    ],
    "winner": { "source": "config file", "level": 3 }
  },
  "timing": { "started": "...", "duration_ms": 20 },
  "messages": ["Config read"]
}

Actual behavior

The implementation shows only a single "Configuration Value" panel:

╭─ Configuration Value ─────────────────────────────╮
│ Key: core.automation-profile                      │
│ Value: supervised                                 │
│ Source: default                                   │
│ Type: str                                         │
╰───────────────────────────────────────────────────╯

Missing from Rich output:

  1. "Overridden" field in the Config panel
  2. "Origin" panel — showing file path, line number, and default value
  3. "Winner" indicator in the Resolution Chain panel

Missing/wrong in JSON output:

result = {
    "key": normalized,
    "value": resolved.value,
    "source": resolved.source.value,
    "type": type(resolved.value).__name__,
    # optionally: "resolution_chain": resolved.chain
}
  • Missing overridden field
  • Missing origin object (file, line, default)
  • Missing winner object in resolution chain
  • Missing standard envelope (command, status, exit_code, timing, messages)
  • Resolution chain format uses internal source names (cli_flag, env_var, global, default) instead of spec-required human-readable names (CLI flag, Env var, Config file, Default)
  • Panel title is "Configuration Value" but spec says "Config"
  • type value uses Python type name (str) instead of spec-required type string (string)

Code location

  • src/cleveragents/cli/commands/config.pyconfig_get() function (around line 230–310)

Steps to reproduce

  1. Run agents config get core.log.level
  2. Observe: Only one panel shown, no "Origin" panel, no "Overridden" field, panel titled "Configuration Value" instead of "Config"
  3. Run agents config get core.log.level --format json
  4. Observe: Missing fields, no standard envelope, internal source names instead of human-readable names

Subtasks

  • Rename Rich panel title from "Configuration Value" to "Config" per spec
  • Add Overridden field to the "Config" Rich panel
  • Add "Origin" Rich panel to config_get() output showing File, Line, and Default fields
  • Add Winner indicator to the "Resolution Chain" Rich panel
  • Fix type field to use spec-required type strings (string, boolean, integer) instead of Python type names (str, bool, int)
  • Add overridden field to JSON result dict
  • Add origin nested object to JSON result dict (file, line, default)
  • Add winner nested object to JSON result dict (source, level)
  • Wrap JSON result in standard output envelope (command, status, exit_code, data, timing, messages)
  • Fix resolution chain source names to use human-readable labels (CLI flag, Env var, Config file, Default) instead of internal enum values
  • Write BDD scenarios in features/ covering all Rich panels and JSON envelope fields
  • Ensure all nox stages pass

Definition of Done

  • agents config get Rich output renders all three panels: "Config", "Origin", and "Resolution Chain"
  • "Config" panel includes Overridden field
  • "Resolution Chain" panel includes Winner indicator
  • "Origin" panel shows File, Line, and Default fields
  • type field uses spec-required type strings (string, boolean, integer)
  • agents config get --format json returns the full standard envelope with command, status, exit_code, data, timing, and messages
  • JSON data object contains overridden, origin, and winner fields
  • Resolution chain uses human-readable source names per spec
  • BDD scenarios cover both Rich and JSON output paths
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/config-get-output-missing-origin-panel-and-envelope` - **Commit Message**: `fix(cli): add missing Origin panel, Overridden field, Winner indicator, and JSON envelope in config get output` - **Milestone**: *(none — backlog)* - **Parent Epic**: #3370 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Description The specification (`docs/specification.md`, section "agents config get") defines a specific output format for the `agents config get` command that the implementation does not match. ### What was tested Code-level analysis of `src/cleveragents/cli/commands/config.py` — specifically the `config_get()` function's output rendering. ### Expected behavior (from spec — Rich format) ``` ╭─ Config ──────────────────────────╮ │ Key: core.automation-profile │ │ Value: trusted │ │ Source: config │ │ Overridden: no │ │ Type: string │ ╰───────────────────────────────────╯ ╭─ Origin ──────────────────────────╮ │ File: ~/.cleveragents/config.toml │ │ Line: 8 │ │ Default: supervised │ ╰───────────────────────────────────╯ ╭─ Resolution Chain ──────────────╮ │ 1. CLI flag: (not set) │ │ 2. Env var: (not set) │ │ 3. Config file: trusted │ │ 4. Default: supervised │ │ Winner: config file (level 3) │ ╰─────────────────────────────────╯ ✓ OK Config read ``` ### Expected behavior (from spec — JSON format) ```json { "command": "config get", "status": "ok", "exit_code": 0, "data": { "key": "core.automation-profile", "value": "trusted", "source": "config", "overridden": false, "type": "string", "origin": { "file": "~/.cleveragents/config.toml", "line": 8, "default": "supervised" }, "resolution_chain": [ { "level": 1, "source": "CLI flag", "value": null }, { "level": 2, "source": "Env var", "value": null }, { "level": 3, "source": "Config file", "value": "trusted" }, { "level": 4, "source": "Default", "value": "supervised" } ], "winner": { "source": "config file", "level": 3 } }, "timing": { "started": "...", "duration_ms": 20 }, "messages": ["Config read"] } ``` ### Actual behavior The implementation shows only a single "Configuration Value" panel: ``` ╭─ Configuration Value ─────────────────────────────╮ │ Key: core.automation-profile │ │ Value: supervised │ │ Source: default │ │ Type: str │ ╰───────────────────────────────────────────────────╯ ``` **Missing from Rich output:** 1. **"Overridden" field** in the Config panel 2. **"Origin" panel** — showing file path, line number, and default value 3. **"Winner" indicator** in the Resolution Chain panel **Missing/wrong in JSON output:** ```python result = { "key": normalized, "value": resolved.value, "source": resolved.source.value, "type": type(resolved.value).__name__, # optionally: "resolution_chain": resolved.chain } ``` - Missing `overridden` field - Missing `origin` object (file, line, default) - Missing `winner` object in resolution chain - Missing standard envelope (`command`, `status`, `exit_code`, `timing`, `messages`) - Resolution chain format uses internal source names (`cli_flag`, `env_var`, `global`, `default`) instead of spec-required human-readable names (`CLI flag`, `Env var`, `Config file`, `Default`) - Panel title is "Configuration Value" but spec says "Config" - `type` value uses Python type name (`str`) instead of spec-required type string (`string`) ### Code location - `src/cleveragents/cli/commands/config.py` — `config_get()` function (around line 230–310) ### Steps to reproduce 1. Run `agents config get core.log.level` 2. Observe: Only one panel shown, no "Origin" panel, no "Overridden" field, panel titled "Configuration Value" instead of "Config" 3. Run `agents config get core.log.level --format json` 4. Observe: Missing fields, no standard envelope, internal source names instead of human-readable names ## Subtasks - [ ] Rename Rich panel title from "Configuration Value" to "Config" per spec - [ ] Add `Overridden` field to the "Config" Rich panel - [ ] Add "Origin" Rich panel to `config_get()` output showing `File`, `Line`, and `Default` fields - [ ] Add `Winner` indicator to the "Resolution Chain" Rich panel - [ ] Fix `type` field to use spec-required type strings (`string`, `boolean`, `integer`) instead of Python type names (`str`, `bool`, `int`) - [ ] Add `overridden` field to JSON result dict - [ ] Add `origin` nested object to JSON result dict (`file`, `line`, `default`) - [ ] Add `winner` nested object to JSON result dict (`source`, `level`) - [ ] Wrap JSON result in standard output envelope (`command`, `status`, `exit_code`, `data`, `timing`, `messages`) - [ ] Fix resolution chain source names to use human-readable labels (`CLI flag`, `Env var`, `Config file`, `Default`) instead of internal enum values - [ ] Write BDD scenarios in `features/` covering all Rich panels and JSON envelope fields - [ ] Ensure all nox stages pass ## Definition of Done - [ ] `agents config get` Rich output renders all three panels: "Config", "Origin", and "Resolution Chain" - [ ] "Config" panel includes `Overridden` field - [ ] "Resolution Chain" panel includes `Winner` indicator - [ ] "Origin" panel shows `File`, `Line`, and `Default` fields - [ ] `type` field uses spec-required type strings (`string`, `boolean`, `integer`) - [ ] `agents config get --format json` returns the full standard envelope with `command`, `status`, `exit_code`, `data`, `timing`, and `messages` - [ ] JSON `data` object contains `overridden`, `origin`, and `winner` fields - [ ] Resolution chain uses human-readable source names per spec - [ ] BDD scenarios cover both Rich and JSON output paths - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
Author
Owner

PR #3458 created on branch fix/config-get-output-missing-origin-panel-and-envelope. I will monitor and handle all review feedback until merged.

Implementation summary:

All 11 subtasks have been implemented:

  • Renamed Rich panel title from "Configuration Value" to "Config"
  • Added Overridden field to the Config panel
  • Added "Origin" Rich panel with File, Line, and Default fields
  • Added Winner indicator to the Resolution Chain panel
  • Fixed type field to use spec-required type strings (string, boolean, integer)
  • Added overridden field to JSON result
  • Added origin nested object to JSON result
  • Added winner nested object to JSON result
  • Wrapped JSON result in standard output envelope
  • Fixed resolution chain source names to human-readable labels
  • Added BDD scenarios covering all Rich panels and JSON envelope fields

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

PR #3458 created on branch `fix/config-get-output-missing-origin-panel-and-envelope`. I will monitor and handle all review feedback until merged. **Implementation summary:** All 11 subtasks have been implemented: - ✅ Renamed Rich panel title from "Configuration Value" to "Config" - ✅ Added `Overridden` field to the Config panel - ✅ Added "Origin" Rich panel with `File`, `Line`, and `Default` fields - ✅ Added `Winner` indicator to the Resolution Chain panel - ✅ Fixed `type` field to use spec-required type strings (`string`, `boolean`, `integer`) - ✅ Added `overridden` field to JSON result - ✅ Added `origin` nested object to JSON result - ✅ Added `winner` nested object to JSON result - ✅ Wrapped JSON result in standard output envelope - ✅ Fixed resolution chain source names to human-readable labels - ✅ Added BDD scenarios covering all Rich panels and JSON envelope fields --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
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#3423
No description provided.