UAT: PlanLifecycleService.create_action missing apply_actor and inputs_schema parameters — fields defined in YAML schema cannot be persisted #4039

Open
opened 2026-04-06 09:00:00 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/plan-lifecycle-service-create-action-missing-params
  • Commit Message: fix(plan-lifecycle-service): add apply_actor and inputs_schema params to create_action
  • Milestone: (backlog — see note below)
  • Parent Epic: #368

Backlog note: This issue was discovered during autonomous operation
on milestone v3.4.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

What Was Tested

  • src/cleveragents/application/services/plan_lifecycle_service.pycreate_action method signature (lines 718-736)
  • src/cleveragents/domain/models/core/action.pyAction domain model (lines 333-727)
  • src/cleveragents/action/schema.pyActionConfigSchema (lines 156-412)
  • docs/schema/action.schema.yaml — Action YAML schema definition
  • examples/actions/estimation-actor.yaml — Example with review_actor

Expected Behavior (from spec)

Per docs/schema/action.schema.yaml and docs/specification.md (lines 33046-33054), the following fields are valid in an action YAML config:

  • apply_actor — Actor to use during the Apply phase (optional)
  • inputs_schema — Optional JSON Schema dict for advanced input validation

The Action domain model (src/cleveragents/domain/models/core/action.py) correctly defines both fields:

  • apply_actor: str | None (line 385)
  • inputs_schema: dict[str, Any] | None (line 405)

The ActionConfigSchema also correctly defines both fields:

  • apply_actor: str | None (line 201)
  • inputs_schema: dict[str, Any] | None (line 250)

These fields should be passable through the service layer when creating an action.

Actual Behavior

The create_action method in PlanLifecycleService (lines 718-736) does NOT include apply_actor or inputs_schema as parameters:

def create_action(
    self,
    name: str,
    description: str,
    definition_of_done: str,
    strategy_actor: str,
    execution_actor: str,
    long_description: str | None = None,
    arguments: list[ActionArgument] | None = None,
    reusable: bool = True,
    read_only: bool = False,
    review_actor: str | None = None,
    estimation_actor: str | None = None,
    invariant_actor: str | None = None,
    automation_profile: str | None = None,
    invariants: list[str] | None = None,
    created_by: str | None = None,
    tags: list[str] | None = None,
    # MISSING: apply_actor: str | None = None
    # MISSING: inputs_schema: dict[str, Any] | None = None
) -> Action:

As a result:

  1. apply_actor defined in a YAML config can never be persisted via the service layer
  2. inputs_schema defined in a YAML config can never be persisted via the service layer
  3. The Action object created by Action.from_config() in the CLI (which does have apply_actor and inputs_schema) has these fields silently dropped when passed to create_action

Code Location

  • Bug: src/cleveragents/application/services/plan_lifecycle_service.py, lines 718-736 (missing parameters in create_action)
  • Domain model: src/cleveragents/domain/models/core/action.py, lines 385 and 405 (fields exist in model)
  • Schema: src/cleveragents/action/schema.py, lines 201 and 250 (fields exist in schema)

Fix

Add apply_actor and inputs_schema parameters to create_action:

def create_action(
    self,
    ...existing params...,
    apply_actor: str | None = None,
    inputs_schema: dict[str, Any] | None = None,
) -> Action:

And pass them when constructing the Action object (lines 775-793):

action = Action(
    ...existing fields...,
    apply_actor=apply_actor,
    inputs_schema=inputs_schema,
)

Subtasks

  • Add apply_actor: str | None = None parameter to PlanLifecycleService.create_action signature
  • Add inputs_schema: dict[str, Any] | None = None parameter to PlanLifecycleService.create_action signature
  • Pass apply_actor and inputs_schema when constructing the Action object inside create_action
  • Verify any callers of create_action (CLI, tests) are updated or remain backward-compatible
  • Tests (unit): Add/update unit tests for create_action covering apply_actor and inputs_schema round-trip
  • Tests (Behave): Add scenario verifying YAML config with apply_actor and inputs_schema persists correctly
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

  • All subtasks above are completed and checked off
  • apply_actor and inputs_schema are accepted by create_action and correctly persisted to the Action domain object
  • No existing callers of create_action are broken (backward-compatible optional parameters)
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly
  • The commit is pushed to 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
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/plan-lifecycle-service-create-action-missing-params` - **Commit Message**: `fix(plan-lifecycle-service): add apply_actor and inputs_schema params to create_action` - **Milestone**: *(backlog — see note below)* - **Parent Epic**: #368 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.4.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## What Was Tested - `src/cleveragents/application/services/plan_lifecycle_service.py` — `create_action` method signature (lines 718-736) - `src/cleveragents/domain/models/core/action.py` — `Action` domain model (lines 333-727) - `src/cleveragents/action/schema.py` — `ActionConfigSchema` (lines 156-412) - `docs/schema/action.schema.yaml` — Action YAML schema definition - `examples/actions/estimation-actor.yaml` — Example with review_actor ## Expected Behavior (from spec) Per `docs/schema/action.schema.yaml` and `docs/specification.md` (lines 33046-33054), the following fields are valid in an action YAML config: - `apply_actor` — Actor to use during the Apply phase (optional) - `inputs_schema` — Optional JSON Schema dict for advanced input validation The `Action` domain model (`src/cleveragents/domain/models/core/action.py`) correctly defines both fields: - `apply_actor: str | None` (line 385) - `inputs_schema: dict[str, Any] | None` (line 405) The `ActionConfigSchema` also correctly defines both fields: - `apply_actor: str | None` (line 201) - `inputs_schema: dict[str, Any] | None` (line 250) These fields should be passable through the service layer when creating an action. ## Actual Behavior The `create_action` method in `PlanLifecycleService` (lines 718-736) does NOT include `apply_actor` or `inputs_schema` as parameters: ```python def create_action( self, name: str, description: str, definition_of_done: str, strategy_actor: str, execution_actor: str, long_description: str | None = None, arguments: list[ActionArgument] | None = None, reusable: bool = True, read_only: bool = False, review_actor: str | None = None, estimation_actor: str | None = None, invariant_actor: str | None = None, automation_profile: str | None = None, invariants: list[str] | None = None, created_by: str | None = None, tags: list[str] | None = None, # MISSING: apply_actor: str | None = None # MISSING: inputs_schema: dict[str, Any] | None = None ) -> Action: ``` As a result: 1. `apply_actor` defined in a YAML config can never be persisted via the service layer 2. `inputs_schema` defined in a YAML config can never be persisted via the service layer 3. The `Action` object created by `Action.from_config()` in the CLI (which does have `apply_actor` and `inputs_schema`) has these fields silently dropped when passed to `create_action` ## Code Location - **Bug**: `src/cleveragents/application/services/plan_lifecycle_service.py`, lines 718-736 (missing parameters in `create_action`) - **Domain model**: `src/cleveragents/domain/models/core/action.py`, lines 385 and 405 (fields exist in model) - **Schema**: `src/cleveragents/action/schema.py`, lines 201 and 250 (fields exist in schema) ## Fix Add `apply_actor` and `inputs_schema` parameters to `create_action`: ```python def create_action( self, ...existing params..., apply_actor: str | None = None, inputs_schema: dict[str, Any] | None = None, ) -> Action: ``` And pass them when constructing the `Action` object (lines 775-793): ```python action = Action( ...existing fields..., apply_actor=apply_actor, inputs_schema=inputs_schema, ) ``` ## Subtasks - [ ] Add `apply_actor: str | None = None` parameter to `PlanLifecycleService.create_action` signature - [ ] Add `inputs_schema: dict[str, Any] | None = None` parameter to `PlanLifecycleService.create_action` signature - [ ] Pass `apply_actor` and `inputs_schema` when constructing the `Action` object inside `create_action` - [ ] Verify any callers of `create_action` (CLI, tests) are updated or remain backward-compatible - [ ] Tests (unit): Add/update unit tests for `create_action` covering `apply_actor` and `inputs_schema` round-trip - [ ] Tests (Behave): Add scenario verifying YAML config with `apply_actor` and `inputs_schema` persists correctly - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] All subtasks above are completed and checked off - [ ] `apply_actor` and `inputs_schema` are accepted by `create_action` and correctly persisted to the `Action` domain object - [ ] No existing callers of `create_action` are broken (backward-compatible optional parameters) - [ ] A Git commit is created where the first line matches the Commit Message in Metadata exactly - [ ] The commit is pushed to 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 - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:11:46 +00:00
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
#368 Epic: Subplans & Parallelism
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#4039
No description provided.