UAT: automation-profile add only accepts schema_version: "1.0" but spec defines cleveragents.version: "3.0" as the schema version field — field name mismatch #3023

Open
opened 2026-04-05 04:02:51 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/automation-profile-schema-version-field-name-mismatch
  • Commit Message: fix(cli): align automation-profile schema version field with spec — use cleveragents.version: "3.0"
  • Milestone: v3.7.0
  • Parent Epic: #362

Bug Report

Feature Area: Configuration Files — Automation Profile Configuration Files

Spec Reference: Design Principles section, Principle #8:

"Configuration files may include a top-level cleveragents.version field to indicate which schema version they target (currently "3.0"). When omitted, the latest schema version is assumed."

Expected Behavior (per spec)

Automation profile YAML configuration files should use cleveragents.version: "3.0" as the schema version field, consistent with all other config file types.

Actual Behavior

The automation-profile add CLI command in src/cleveragents/cli/commands/automation_profile.py validates schema_version as a top-level field:

schema_version = config_data.get("schema_version", "1.0")
if schema_version not in ("1.0",):
    console.print(
        f"[red]Schema validation error:[/red] "
        f"Unsupported schema_version '{schema_version}'. "
        f"Supported versions: 1.0"
    )
    raise typer.Abort()

And the AutomationProfile domain model in src/cleveragents/domain/models/core/automation_profile.py also uses a top-level schema_version field:

schema_version: str = Field(
    default="1.0",
    description="Schema version for forward compatibility",
)

Issues:

  1. The field is named schema_version (top-level) instead of cleveragents.version (nested under cleveragents block)
  2. The accepted version is "1.0" instead of "3.0" (the current spec version)
  3. This is inconsistent with the actor config which uses cleveragents.version: "3.0"

Steps to Reproduce

  1. Create an automation profile YAML following the spec's design principles:
cleveragents:
  version: "3.0"
name: acme/strict
description: Strict profile for production
decompose_task: 0.8
...
  1. Run agents automation-profile add --config profile.yaml
  2. Observe: The cleveragents.version field is ignored; the profile is accepted without version validation

Conversely:

  1. Create a profile with schema_version: "3.0" (top-level)
  2. Run agents automation-profile add --config profile.yaml
  3. Observe: Error "Unsupported schema_version '3.0'. Supported versions: 1.0"

Impact

  • Users following the spec's design principles (using cleveragents.version: "3.0") get no schema version validation
  • Users using schema_version: "3.0" (top-level) get a validation error
  • Inconsistency between automation profile config and actor config schema versioning

Code Locations

  • src/cleveragents/cli/commands/automation_profile.pyadd_profile() function, schema_version validation
  • src/cleveragents/domain/models/core/automation_profile.pyAutomationProfile.schema_version field

Subtasks

  • Update AutomationProfile domain model: rename schema_version field to read from cleveragents.version nested block; update default to "3.0"
  • Update add_profile() in automation_profile.py: change validation to read config_data.get("cleveragents", {}).get("version", "3.0") and accept "3.0" as the valid version
  • Update any serialisation/deserialisation logic that writes or reads schema_version to use the cleveragents.version nested structure
  • Update Behave unit tests in features/ to reflect the corrected field name and accepted version
  • Update Robot Framework integration tests in robot/ to use cleveragents.version: "3.0" in all automation profile YAML fixtures
  • Verify consistency with actor config YAML schema versioning (ensure both use cleveragents.version)
  • Run nox to confirm all quality gates pass

Definition of Done

  • AutomationProfile domain model reads schema version from cleveragents.version nested block (not top-level schema_version)
  • automation-profile add accepts cleveragents.version: "3.0" and rejects unknown versions with a clear error
  • automation-profile add no longer accepts or validates a top-level schema_version field
  • Schema versioning is consistent between automation profile config and actor config YAML files
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/automation-profile-schema-version-field-name-mismatch` - **Commit Message**: `fix(cli): align automation-profile schema version field with spec — use cleveragents.version: "3.0"` - **Milestone**: v3.7.0 - **Parent Epic**: #362 ## Bug Report **Feature Area:** Configuration Files — Automation Profile Configuration Files **Spec Reference:** Design Principles section, Principle #8: > "Configuration files may include a top-level `cleveragents.version` field to indicate which schema version they target (currently `"3.0"`). When omitted, the latest schema version is assumed." ### Expected Behavior (per spec) Automation profile YAML configuration files should use `cleveragents.version: "3.0"` as the schema version field, consistent with all other config file types. ### Actual Behavior The `automation-profile add` CLI command in `src/cleveragents/cli/commands/automation_profile.py` validates `schema_version` as a **top-level** field: ```python schema_version = config_data.get("schema_version", "1.0") if schema_version not in ("1.0",): console.print( f"[red]Schema validation error:[/red] " f"Unsupported schema_version '{schema_version}'. " f"Supported versions: 1.0" ) raise typer.Abort() ``` And the `AutomationProfile` domain model in `src/cleveragents/domain/models/core/automation_profile.py` also uses a top-level `schema_version` field: ```python schema_version: str = Field( default="1.0", description="Schema version for forward compatibility", ) ``` Issues: 1. The field is named `schema_version` (top-level) instead of `cleveragents.version` (nested under `cleveragents` block) 2. The accepted version is `"1.0"` instead of `"3.0"` (the current spec version) 3. This is inconsistent with the actor config which uses `cleveragents.version: "3.0"` ### Steps to Reproduce 1. Create an automation profile YAML following the spec's design principles: ```yaml cleveragents: version: "3.0" name: acme/strict description: Strict profile for production decompose_task: 0.8 ... ``` 2. Run `agents automation-profile add --config profile.yaml` 3. Observe: The `cleveragents.version` field is ignored; the profile is accepted without version validation Conversely: 1. Create a profile with `schema_version: "3.0"` (top-level) 2. Run `agents automation-profile add --config profile.yaml` 3. Observe: Error "Unsupported schema_version '3.0'. Supported versions: 1.0" ### Impact - Users following the spec's design principles (using `cleveragents.version: "3.0"`) get no schema version validation - Users using `schema_version: "3.0"` (top-level) get a validation error - Inconsistency between automation profile config and actor config schema versioning ### Code Locations - `src/cleveragents/cli/commands/automation_profile.py` — `add_profile()` function, schema_version validation - `src/cleveragents/domain/models/core/automation_profile.py` — `AutomationProfile.schema_version` field ## Subtasks - [ ] Update `AutomationProfile` domain model: rename `schema_version` field to read from `cleveragents.version` nested block; update default to `"3.0"` - [ ] Update `add_profile()` in `automation_profile.py`: change validation to read `config_data.get("cleveragents", {}).get("version", "3.0")` and accept `"3.0"` as the valid version - [ ] Update any serialisation/deserialisation logic that writes or reads `schema_version` to use the `cleveragents.version` nested structure - [ ] Update Behave unit tests in `features/` to reflect the corrected field name and accepted version - [ ] Update Robot Framework integration tests in `robot/` to use `cleveragents.version: "3.0"` in all automation profile YAML fixtures - [ ] Verify consistency with actor config YAML schema versioning (ensure both use `cleveragents.version`) - [ ] Run `nox` to confirm all quality gates pass ## Definition of Done - [ ] `AutomationProfile` domain model reads schema version from `cleveragents.version` nested block (not top-level `schema_version`) - [ ] `automation-profile add` accepts `cleveragents.version: "3.0"` and rejects unknown versions with a clear error - [ ] `automation-profile add` no longer accepts or validates a top-level `schema_version` field - [ ] Schema versioning is consistent between automation profile config and actor config YAML files - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 04:03:39 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
#362 Epic: Security & Safety Hardening
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3023
No description provided.