fix(cli): add missing Origin panel, Overridden field, Winner indicator, and JSON envelope in config get output
Implements all spec-required output for `agents config get`: Rich output: - Rename panel title from 'Configuration Value' to 'Config' per spec - Add 'Overridden' field to the Config panel - Add 'Origin' panel showing File, Line, and Default fields - Add 'Resolution Chain' panel (always shown, not just with --verbose) - Add 'Winner' indicator to the Resolution Chain panel - Use spec-required type strings (string/boolean/integer) instead of Python type names (str/bool/int) - Add '✓ OK Config read' confirmation message JSON output: - Wrap result in standard envelope (command, status, exit_code, data, timing, messages) - Add 'overridden' field to data - Add 'origin' nested object (file, line, default) - Add 'winner' nested object (source, level) - Use human-readable source names (CLI flag, Env var, Config file, Default) instead of internal enum values - Add 'started' timestamp to timing BDD: - Add features/config_get_spec_output.feature with 20 scenarios covering all Rich panels and JSON envelope fields - Update existing tests to match new spec-compliant output ISSUES CLOSED: #3423
This commit is contained in:
@@ -143,9 +143,11 @@ def step_config_get_contains_key(context: Context, key: str) -> None:
|
||||
@then("the config get output should show the resolution chain")
|
||||
def step_config_get_resolution_chain(context: Context) -> None:
|
||||
output = context.result.output
|
||||
assert "Resolution chain" in output or "resolution_chain" in output, (
|
||||
f"Expected resolution chain in output: {output}"
|
||||
)
|
||||
assert (
|
||||
"Resolution Chain" in output
|
||||
or "Resolution chain" in output
|
||||
or "resolution_chain" in output
|
||||
), f"Expected resolution chain in output: {output}"
|
||||
|
||||
|
||||
@then("the config get should fail with unknown key error")
|
||||
|
||||
Reference in New Issue
Block a user