UAT: agents action create CLI silently drops optional actor fields from YAML config — estimation_actor, invariant_actor, review_actor, automation_profile, invariants not passed to service #2498

Open
opened 2026-04-03 18:39:36 +00:00 by freemo · 3 comments
Owner

Background

During UAT testing of the Plan Lifecycle Management feature area, a bug was discovered in the agents action create CLI command. The command correctly parses the full YAML config into an Action object via Action.from_config(config_dict), but then calls service.create_action() with only a subset of the parsed fields. The following optional fields are silently dropped and never persisted:

  • estimation_actor — optional actor for cost estimation
  • invariant_actor — optional Invariant Reconciliation Actor
  • review_actor — optional actor for reviewing results
  • automation_profile — default automation profile for plans
  • invariants — constraints carried forward when action is used
  • apply_actor — optional actor for Apply phase

Per the specification, all of these are valid optional fields in the Action data model and must be persisted when creating an action.

Current Behavior

The CLI code at src/cleveragents/cli/commands/action.py, lines 242–253 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,
)

estimation_actor, invariant_actor, review_actor, automation_profile, invariants, and apply_actor are accepted by PlanLifecycleService.create_action() but are not passed from the CLI. No warning or error is raised — the fields are silently dropped.

Expected Behavior

All fields specified in the action YAML configuration file must be persisted when creating an action. An action created with estimation_actor: openai/gpt-4 in YAML must have estimation_actor set to openai/gpt-4 after creation.

Steps to Reproduce

  1. Create an action YAML with estimation_actor: openai/gpt-4, invariant_actor: local/inv-actor, invariants: ["No breaking changes"]
  2. Run agents action create --config action.yaml
  3. Run agents action show local/my-action --format json
  4. Observe that estimation_actor, invariant_actor, and invariants are absent from the output

Code Location

  • src/cleveragents/cli/commands/action.py, lines 242–253 — missing fields in service.create_action() call

Fix

Pass all optional fields from the parsed Action object to service.create_action():

  • estimation_actor=action.estimation_actor
  • invariant_actor=action.invariant_actor
  • review_actor=action.review_actor
  • apply_actor=action.apply_actor
  • automation_profile=action.automation_profile
  • invariants=action.invariants

Metadata

  • Branch: fix/action-create-cli-drops-optional-actor-fields
  • Commit Message: fix(cli): pass all optional actor fields from YAML config to service.create_action()
  • Milestone: v3.2.0
  • Parent Epic: #372

Subtasks

  • Audit service.create_action() signature to confirm all optional fields accepted (estimation_actor, invariant_actor, review_actor, apply_actor, automation_profile, invariants)
  • Update src/cleveragents/cli/commands/action.py lines 242–253 to pass all optional fields to service.create_action()
  • Verify no other CLI commands have the same silent-drop pattern for optional actor fields
  • Tests (Behave): Add scenario — "action created with optional actor fields in YAML has those fields persisted"
  • Tests (Behave): Add scenario — "action created without optional actor fields defaults to None/empty"
  • Tests (Robot): Add integration test verifying round-trip: YAML with optional fields → action createaction show returns all fields
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

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 (fix(cli): pass all optional actor fields from YAML config to service.create_action()), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/action-create-cli-drops-optional-actor-fields).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Background During UAT testing of the Plan Lifecycle Management feature area, a bug was discovered in the `agents action create` CLI command. The command correctly parses the full YAML config into an `Action` object via `Action.from_config(config_dict)`, but then calls `service.create_action()` with only a subset of the parsed fields. The following optional fields are silently dropped and never persisted: - `estimation_actor` — optional actor for cost estimation - `invariant_actor` — optional Invariant Reconciliation Actor - `review_actor` — optional actor for reviewing results - `automation_profile` — default automation profile for plans - `invariants` — constraints carried forward when action is used - `apply_actor` — optional actor for Apply phase Per the specification, all of these are valid optional fields in the Action data model and must be persisted when creating an action. ## Current Behavior The CLI code at `src/cleveragents/cli/commands/action.py`, lines 242–253 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, ) ``` `estimation_actor`, `invariant_actor`, `review_actor`, `automation_profile`, `invariants`, and `apply_actor` are accepted by `PlanLifecycleService.create_action()` but are **not** passed from the CLI. No warning or error is raised — the fields are silently dropped. ## Expected Behavior All fields specified in the action YAML configuration file must be persisted when creating an action. An action created with `estimation_actor: openai/gpt-4` in YAML must have `estimation_actor` set to `openai/gpt-4` after creation. ## Steps to Reproduce 1. Create an action YAML with `estimation_actor: openai/gpt-4`, `invariant_actor: local/inv-actor`, `invariants: ["No breaking changes"]` 2. Run `agents action create --config action.yaml` 3. Run `agents action show local/my-action --format json` 4. Observe that `estimation_actor`, `invariant_actor`, and `invariants` are absent from the output ## Code Location - `src/cleveragents/cli/commands/action.py`, lines 242–253 — missing fields in `service.create_action()` call ## Fix Pass all optional fields from the parsed `Action` object to `service.create_action()`: - `estimation_actor=action.estimation_actor` - `invariant_actor=action.invariant_actor` - `review_actor=action.review_actor` - `apply_actor=action.apply_actor` - `automation_profile=action.automation_profile` - `invariants=action.invariants` --- ## Metadata - **Branch**: `fix/action-create-cli-drops-optional-actor-fields` - **Commit Message**: `fix(cli): pass all optional actor fields from YAML config to service.create_action()` - **Milestone**: v3.2.0 - **Parent Epic**: #372 --- ## Subtasks - [ ] Audit `service.create_action()` signature to confirm all optional fields accepted (`estimation_actor`, `invariant_actor`, `review_actor`, `apply_actor`, `automation_profile`, `invariants`) - [ ] Update `src/cleveragents/cli/commands/action.py` lines 242–253 to pass all optional fields to `service.create_action()` - [ ] Verify no other CLI commands have the same silent-drop pattern for optional actor fields - [ ] Tests (Behave): Add scenario — "action created with optional actor fields in YAML has those fields persisted" - [ ] Tests (Behave): Add scenario — "action created without optional actor fields defaults to None/empty" - [ ] Tests (Robot): Add integration test verifying round-trip: YAML with optional fields → `action create` → `action show` returns all fields - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors --- ## 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 (`fix(cli): pass all optional actor fields from YAML config to service.create_action()`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/action-create-cli-drops-optional-actor-fields`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.2.0 milestone 2026-04-03 18:39:41 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have (already set)

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 (already set) Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.2.0 milestone 2026-04-06 22:29:55 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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
Reference
cleveragents/cleveragents-core#2498
No description provided.