fix(cli): correct automation-profile list output structure and rich table rendering #3015

Merged
freemo merged 1 commits from fix/automation-profile-list-output-structure into master 2026-04-05 21:16:31 +00:00

1 Commits

Author SHA1 Message Date
freemo a1fb804f21 fix(cli): correct automation-profile list output structure and rich table rendering
CI / lint (pull_request) Failing after 28s
CI / typecheck (pull_request) Successful in 3m59s
CI / build (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 3m43s
CI / security (pull_request) Successful in 4m9s
CI / coverage (pull_request) Has been skipped
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 9m52s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 21m7s
CI / integration_tests (pull_request) Successful in 25m52s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
The non-rich output branch of list_profiles() in
src/cleveragents/cli/commands/automation_profile.py has been refactored
to produce the spec-required envelope rather than a flat list of full
profile objects. The new envelope structure is:
  {"profiles": [...simplified...], "summary": {"built_in": N, "custom": N, "total": N}}
Where profiles entries now contain only five fields: name, source,
select_tool, sandbox, and description.

Key changes:
- Profiles in the profiles array are reduced to match the exact spec
  (name, source, select_tool, sandbox, description). Full details are
  preserved for the show command via the existing _profile_spec_dict().
- The summary object aggregates counts after namespace/regex filtering
  so the numbers accurately reflect what is being displayed.
- The rich table column header renamed from 'Select Tool' to 'Auto-Apply'
  per spec line 16946, and a Summary panel is appended to the rich output
  showing Built-in / Custom / Total counts per spec lines 16959-16963.
- Behave feature file updated with new scenarios covering JSON/YAML output
  structure, rich table column header, and Summary panel.
- New step definitions include a comprehensive profiles-wrapper-with-summary
  step that validates the full spec-required structure.
- Robot Framework helper test_list_json() updated to validate the new dict
  structure with profiles wrapper and summary instead of the old flat list.

ISSUES CLOSED: #2064
2026-04-05 09:46:16 +00:00