[BUG] automation-profile show omits 5 SafetyProfile fields from all output formats #9151

Open
opened 2026-04-14 08:39:09 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(cli): include all SafetyProfile fields in automation-profile show output
  • Branch: fix/automation-profile-show-safety-fields

Background and Context

The automation-profile show CLI command renders profile details via _profile_spec_dict() and _print_profile() in src/cleveragents/cli/commands/automation_profile.py. The spec (docs/reference/automation_profiles.md §Safety Profile) defines 8 SafetyProfile fields that must be displayed.

Current Behavior

The _profile_spec_dict() function (used for JSON/YAML/plain/table output) and _print_profile() (used for rich output) only render 3 of the 8 SafetyProfile fields:

  • require_sandbox
  • require_checkpoints
  • allow_unsafe_tools

The following 5 SafetyProfile fields are completely absent from all output formats:

  • require_human_approval
  • allowed_skill_categories
  • max_cost_per_plan
  • max_total_cost
  • max_retries_per_step

This affects all output formats: rich, json, yaml, plain, and table.

Expected Behavior

Per docs/reference/automation_profiles.md §Safety Profile (Composed Sub-Model), the automation-profile show command must display all 8 SafetyProfile fields:

Field Type Default
safety.require_sandbox bool true
safety.require_checkpoints bool true
safety.allow_unsafe_tools bool false
safety.require_human_approval bool false
safety.allowed_skill_categories list[str] []
safety.max_cost_per_plan float|null null
safety.max_total_cost float|null null
safety.max_retries_per_step int 3

The spec says automation-profile show displays "full details for a single profile" — omitting 5 of 8 safety fields violates this requirement.

Acceptance Criteria

  • _profile_spec_dict() includes all 8 SafetyProfile fields under execution_controls.safety or a dedicated safety key
  • _print_profile() rich output renders all 8 SafetyProfile fields
  • agents automation-profile show manual --format json output includes require_human_approval, allowed_skill_categories, max_cost_per_plan, max_total_cost, max_retries_per_step
  • agents automation-profile show manual --format yaml output includes all 8 safety fields
  • BDD scenario added to features/automation_profile_cli.feature verifying all 8 safety fields appear in show output

Supporting Information

Affected file: src/cleveragents/cli/commands/automation_profile.py

  • _profile_spec_dict() function: execution_controls dict only includes 3 safety fields
  • _print_profile() function: Execution Controls section only renders 3 safety fields

Spec reference: docs/reference/automation_profiles.md §Safety Profile (Composed Sub-Model) — all 8 fields listed

Note: Issue #9135 covers the missing output envelope wrapper for show — this is a separate, distinct bug about missing SafetyProfile field content.

Subtasks

  • Update _profile_spec_dict() to include all 8 SafetyProfile fields
  • Update _print_profile() rich output to render all 8 SafetyProfile fields
  • Add BDD scenario verifying all safety fields appear in show output
  • Tests (Behave): verify JSON/YAML/plain output includes all 8 safety fields
  • Run nox (all default sessions), fix any errors
  • Verify coverage >=97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(cli): include all SafetyProfile fields in automation-profile show output` - **Branch**: `fix/automation-profile-show-safety-fields` ## Background and Context The `automation-profile show` CLI command renders profile details via `_profile_spec_dict()` and `_print_profile()` in `src/cleveragents/cli/commands/automation_profile.py`. The spec (`docs/reference/automation_profiles.md` §Safety Profile) defines 8 SafetyProfile fields that must be displayed. ## Current Behavior The `_profile_spec_dict()` function (used for JSON/YAML/plain/table output) and `_print_profile()` (used for rich output) only render 3 of the 8 SafetyProfile fields: - `require_sandbox` ✓ - `require_checkpoints` ✓ - `allow_unsafe_tools` ✓ The following 5 SafetyProfile fields are **completely absent** from all output formats: - `require_human_approval` ✗ - `allowed_skill_categories` ✗ - `max_cost_per_plan` ✗ - `max_total_cost` ✗ - `max_retries_per_step` ✗ This affects all output formats: `rich`, `json`, `yaml`, `plain`, and `table`. ## Expected Behavior Per `docs/reference/automation_profiles.md` §Safety Profile (Composed Sub-Model), the `automation-profile show` command must display all 8 SafetyProfile fields: | Field | Type | Default | |-------|------|---------| | `safety.require_sandbox` | bool | `true` | | `safety.require_checkpoints` | bool | `true` | | `safety.allow_unsafe_tools` | bool | `false` | | `safety.require_human_approval` | bool | `false` | | `safety.allowed_skill_categories` | list[str] | `[]` | | `safety.max_cost_per_plan` | float\|null | `null` | | `safety.max_total_cost` | float\|null | `null` | | `safety.max_retries_per_step` | int | `3` | The spec says `automation-profile show` displays "full details for a single profile" — omitting 5 of 8 safety fields violates this requirement. ## Acceptance Criteria - [ ] `_profile_spec_dict()` includes all 8 SafetyProfile fields under `execution_controls.safety` or a dedicated `safety` key - [ ] `_print_profile()` rich output renders all 8 SafetyProfile fields - [ ] `agents automation-profile show manual --format json` output includes `require_human_approval`, `allowed_skill_categories`, `max_cost_per_plan`, `max_total_cost`, `max_retries_per_step` - [ ] `agents automation-profile show manual --format yaml` output includes all 8 safety fields - [ ] BDD scenario added to `features/automation_profile_cli.feature` verifying all 8 safety fields appear in show output ## Supporting Information **Affected file**: `src/cleveragents/cli/commands/automation_profile.py` - `_profile_spec_dict()` function: `execution_controls` dict only includes 3 safety fields - `_print_profile()` function: Execution Controls section only renders 3 safety fields **Spec reference**: `docs/reference/automation_profiles.md` §Safety Profile (Composed Sub-Model) — all 8 fields listed **Note**: Issue #9135 covers the missing output envelope wrapper for `show` — this is a separate, distinct bug about missing SafetyProfile field content. ## Subtasks - [ ] Update `_profile_spec_dict()` to include all 8 SafetyProfile fields - [ ] Update `_print_profile()` rich output to render all 8 SafetyProfile fields - [ ] Add BDD scenario verifying all safety fields appear in `show` output - [ ] Tests (Behave): verify JSON/YAML/plain output includes all 8 safety fields - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >=97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added this to the v3.5.0 milestone 2026-04-14 08:50:10 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid bug: automation-profile show omits 5 SafetyProfile fields from all output formats. This is a significant spec compliance gap — users cannot see critical safety configuration fields.

Assigning to v3.5.0 (Autonomy Hardening) as automation profiles are a core M6 feature. Priority High — missing safety fields in output is a significant usability issue.

MoSCoW: Must Have — users must be able to inspect all safety profile fields to understand and audit automation behavior.


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

✅ **Triage: Verified** [AUTO-OWNR-1] Valid bug: `automation-profile show` omits 5 `SafetyProfile` fields from all output formats. This is a significant spec compliance gap — users cannot see critical safety configuration fields. Assigning to **v3.5.0** (Autonomy Hardening) as automation profiles are a core M6 feature. Priority **High** — missing safety fields in output is a significant usability issue. MoSCoW: **Must Have** — users must be able to inspect all safety profile fields to understand and audit automation behavior. --- **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#9151
No description provided.