UAT: automation-profile show JSON output includes schema_version and guards fields not defined in spec #6772

Open
opened 2026-04-10 02:05:07 +00:00 by HAL9000 · 1 comment
Owner

Background and Context

The agents automation-profile show command JSON output schema is defined in docs/specification.md section ##### agents automation-profile show. The implementation produces extra fields not present in the spec schema.

Current Behavior

The _profile_spec_dict() function in src/cleveragents/cli/commands/automation_profile.py (used for all non-rich output including JSON) builds the data dict with two non-spec fields:

result: dict[str, object] = {
    "name": profile.name,
    "description": profile.description,
    "source": source,
    "schema_version": profile.schema_version,   # ← NOT IN SPEC
    "phase_transitions": { ... },
    "decision_automation": { ... },
    "self_repair": { ... },
    "execution_controls": { ... },
    "guards": _guards_dict(profile.guards),      # ← NOT IN SPEC
}

The JSON output includes schema_version (e.g., "1.0") and guards (either null or a guards sub-dict) in the data section.

Expected Behavior (from spec)

The spec JSON output for automation-profile show (docs/specification.md, lines 17267–17301):

{
  "command": "automation-profile show",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "name": "trusted",
    "source": "built-in",
    "description": "Auto-exec, manual apply. Day-to-day development",
    "phase_transitions": { ... },
    "decision_automation": { ... },
    "self_repair": { ... },
    "execution_controls": { ... }
  },
  "timing": { ... },
  "messages": [...]
}

The spec data object contains exactly: name, source, description, phase_transitions, decision_automation, self_repair, execution_controls. There is no schema_version or guards field.

Impact

Consumers of JSON output (scripts, CI pipelines) see undocumented fields (schema_version, guards) in the response that break strict schema validation and diverge from the documented contract.

Steps to Reproduce

  1. Run agents automation-profile show trusted --format json
  2. Observe: JSON data contains schema_version and guards fields
  3. Expected: only name, source, description, phase_transitions, decision_automation, self_repair, execution_controls

Acceptance Criteria

  • automation-profile show --format json data field contains only spec-defined keys
  • schema_version is NOT present in the data section of show JSON output
  • guards is NOT present in the data section of show JSON output
  • Same fix applies to --format yaml output
  • All tests pass with nox

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Background and Context The `agents automation-profile show` command JSON output schema is defined in `docs/specification.md` section `##### agents automation-profile show`. The implementation produces extra fields not present in the spec schema. ## Current Behavior The `_profile_spec_dict()` function in `src/cleveragents/cli/commands/automation_profile.py` (used for all non-rich output including JSON) builds the data dict with two non-spec fields: ```python result: dict[str, object] = { "name": profile.name, "description": profile.description, "source": source, "schema_version": profile.schema_version, # ← NOT IN SPEC "phase_transitions": { ... }, "decision_automation": { ... }, "self_repair": { ... }, "execution_controls": { ... }, "guards": _guards_dict(profile.guards), # ← NOT IN SPEC } ``` The JSON output includes `schema_version` (e.g., `"1.0"`) and `guards` (either `null` or a guards sub-dict) in the `data` section. ## Expected Behavior (from spec) The spec JSON output for `automation-profile show` (`docs/specification.md`, lines 17267–17301): ```json { "command": "automation-profile show", "status": "ok", "exit_code": 0, "data": { "name": "trusted", "source": "built-in", "description": "Auto-exec, manual apply. Day-to-day development", "phase_transitions": { ... }, "decision_automation": { ... }, "self_repair": { ... }, "execution_controls": { ... } }, "timing": { ... }, "messages": [...] } ``` The spec `data` object contains exactly: `name`, `source`, `description`, `phase_transitions`, `decision_automation`, `self_repair`, `execution_controls`. There is **no** `schema_version` or `guards` field. ## Impact Consumers of JSON output (scripts, CI pipelines) see undocumented fields (`schema_version`, `guards`) in the response that break strict schema validation and diverge from the documented contract. ## Steps to Reproduce 1. Run `agents automation-profile show trusted --format json` 2. Observe: JSON `data` contains `schema_version` and `guards` fields 3. Expected: only `name`, `source`, `description`, `phase_transitions`, `decision_automation`, `self_repair`, `execution_controls` ## Acceptance Criteria - [ ] `automation-profile show --format json` `data` field contains only spec-defined keys - [ ] `schema_version` is NOT present in the `data` section of show JSON output - [ ] `guards` is NOT present in the `data` section of show JSON output - [ ] Same fix applies to `--format yaml` output - [ ] All tests pass with `nox` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:05:53 +00:00
Author
Owner

Verified — UAT bug: automation-profile show JSON includes undocumented fields. MoSCoW: Should-have. Priority: Medium.


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

✅ **Verified** — UAT bug: automation-profile show JSON includes undocumented fields. MoSCoW: Should-have. Priority: Medium. --- **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#6772
No description provided.