UAT: agents action create silently drops invariants and automation_profile from YAML config #6768

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

Bug Report

Summary

agents action create --config <file> silently ignores invariants and automation_profile fields declared in the YAML configuration file. Both fields are validated by ActionConfigSchema and populated by Action.from_config(), but the CLI command does NOT forward them to service.create_action().

What Was Tested

Code analysis of src/cleveragents/cli/commands/action.py (create function) and src/cleveragents/application/services/plan_lifecycle_service.py (create_action method).

Expected Behavior (from spec)

Per docs/specification.md — Action glossary entry:

A YAML-defined, reusable plan template specifying a description, definition of done, strategy/execution actors, typed arguments, and optional invariants.

Per docs/specification.md — Action Configuration section and ActionConfigSchema, both invariants (list of constraint strings) and automation_profile (default profile name) are valid YAML fields that must be persisted when the action is created.

Actual Behavior

In src/cleveragents/cli/commands/action.py, the create command calls:

action = service.create_action(
    name=str(action.namespaced_name),
    definition_of_done=action.definition_of_done,
    strategy_actor=action.strategy_actor,
    execution_actor=action.execution_actor,
    description=action.description,
    long_description=action.long_description,
    arguments=action.arguments,
    reusable=action.reusable,
    read_only=action.read_only,
    tags=action.tags,
    # ← `invariants` and `automation_profile` are MISSING here
)

service.create_action() accepts both invariants and automation_profile parameters (see plan_lifecycle_service.py lines 732-733), and Action.from_config() correctly reads them from the YAML dict (lines 654, 656). The CLI is the missing link — it loads the values into an Action object but discards them before the service call.

Steps to Reproduce

  1. Create an action YAML file with invariants or automation_profile fields:
    name: local/test-action
    description: Test
    strategy_actor: local/strategist
    execution_actor: local/executor
    definition_of_done: Done when tests pass
    automation_profile: supervised
    invariants:
      - Do not modify production data
    
  2. Run agents action create --config test-action.yaml
  3. Run agents action show local/test-action --format json
  4. Observe that automation_profile is null and invariants is []

Impact

Actions with invariants defined at creation time will not propagate those constraints to plans created with agents plan use, violating the spec's invariant precedence chain. Actions with a default automation_profile will not apply that profile, requiring users to always specify it manually on agents plan use.


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

## Bug Report ### Summary `agents action create --config <file>` silently ignores `invariants` and `automation_profile` fields declared in the YAML configuration file. Both fields are validated by `ActionConfigSchema` and populated by `Action.from_config()`, but the CLI command does NOT forward them to `service.create_action()`. ### What Was Tested Code analysis of `src/cleveragents/cli/commands/action.py` (`create` function) and `src/cleveragents/application/services/plan_lifecycle_service.py` (`create_action` method). ### Expected Behavior (from spec) Per `docs/specification.md` — Action glossary entry: > A YAML-defined, reusable plan template specifying a description, definition of done, strategy/execution actors, **typed arguments, and optional invariants**. Per `docs/specification.md` — Action Configuration section and `ActionConfigSchema`, both `invariants` (list of constraint strings) and `automation_profile` (default profile name) are valid YAML fields that must be persisted when the action is created. ### Actual Behavior In `src/cleveragents/cli/commands/action.py`, the `create` command calls: ```python action = service.create_action( name=str(action.namespaced_name), definition_of_done=action.definition_of_done, strategy_actor=action.strategy_actor, execution_actor=action.execution_actor, description=action.description, long_description=action.long_description, arguments=action.arguments, reusable=action.reusable, read_only=action.read_only, tags=action.tags, # ← `invariants` and `automation_profile` are MISSING here ) ``` `service.create_action()` accepts both `invariants` and `automation_profile` parameters (see `plan_lifecycle_service.py` lines 732-733), and `Action.from_config()` correctly reads them from the YAML dict (lines 654, 656). The CLI is the missing link — it loads the values into an `Action` object but discards them before the service call. ### Steps to Reproduce 1. Create an action YAML file with `invariants` or `automation_profile` fields: ```yaml name: local/test-action description: Test strategy_actor: local/strategist execution_actor: local/executor definition_of_done: Done when tests pass automation_profile: supervised invariants: - Do not modify production data ``` 2. Run `agents action create --config test-action.yaml` 3. Run `agents action show local/test-action --format json` 4. Observe that `automation_profile` is `null` and `invariants` is `[]` ### Impact Actions with `invariants` defined at creation time will not propagate those constraints to plans created with `agents plan use`, violating the spec's invariant precedence chain. Actions with a default `automation_profile` will not apply that profile, requiring users to always specify it manually on `agents plan use`. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:04:58 +00:00
Author
Owner

Verified — UAT bug: action create silently drops invariants and automation_profile from YAML. MoSCoW: Must-have. Priority: High — data loss.


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

✅ **Verified** — UAT bug: action create silently drops invariants and automation_profile from YAML. MoSCoW: Must-have. Priority: High — data loss. --- **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#6768
No description provided.