UAT: action.py module docstring incorrectly lists path as a supported argument type — ArgumentType enum only has string, integer, float, boolean, list #4024

Open
opened 2026-04-06 08:43:10 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/action-py-docstring-argument-types
  • Commit Message: fix(action): correct module docstring to list supported ArgumentType values
  • Milestone: None (backlog)
  • Parent Epic: #392

What Was Tested

Code-level analysis of src/cleveragents/domain/models/core/action.py against the specification for Action Lifecycle and Execution.

Expected Behavior (from spec)

The ArgumentType enum should match the specification JSON schema which defines supported types as: string | integer | float | boolean | list. The module docstring must accurately reflect these supported types.

Actual Behavior

The module docstring in src/cleveragents/domain/models/core/action.py at line 23 states:

- Supported types: ``string``, ``integer``, ``float``, ``boolean``, ``path``

However, the ArgumentType enum (defined in the same file) only has:

class ArgumentType(StrEnum):
    STRING = "string"
    INTEGER = "integer"
    FLOAT = "float"
    BOOLEAN = "boolean"
    LIST = "list"

The path type mentioned in the docstring does not exist in the enum. Additionally, the ActionConfigSchema in src/cleveragents/action/schema.py also does not include path in _VALID_ARG_TYPES.

Impact

  • Developers reading the docstring may attempt to use path as an argument type in their action YAML files
  • This will fail at runtime with a ValueError from ArgumentType._missing_
  • The docstring also omits list (a valid type) while listing path (an invalid type)

Code Location

  • src/cleveragents/domain/models/core/action.py, line 23 (module docstring)
  • src/cleveragents/domain/models/core/action.py, ArgumentType enum

Steps to Reproduce

  1. Read the module docstring in action.py
  2. Note it says path is a supported type
  3. Try to create an ActionArgument with arg_type=ArgumentType("path")
  4. Observe ValueError because path is not in the enum

Subtasks

  • Update the module docstring in src/cleveragents/domain/models/core/action.py to replace path with list in the supported types list
  • Verify no other docstrings or comments in the codebase reference path as a supported ArgumentType
  • Add or update a Behave unit test scenario asserting the docstring-listed types match the ArgumentType enum members
  • Ensure nox -e lint and nox -e typecheck pass after the change

Definition of Done

  • Module docstring accurately lists string, integer, float, boolean, list as supported argument types
  • path is removed from the docstring
  • No other documentation or comments in the codebase incorrectly reference path as a valid ArgumentType
  • Associated PR is merged and linked to this issue
  • All nox stages pass
  • Coverage >= 97%

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


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

## Metadata - **Branch**: `fix/action-py-docstring-argument-types` - **Commit Message**: `fix(action): correct module docstring to list supported ArgumentType values` - **Milestone**: None (backlog) - **Parent Epic**: #392 ## What Was Tested Code-level analysis of `src/cleveragents/domain/models/core/action.py` against the specification for Action Lifecycle and Execution. ## Expected Behavior (from spec) The `ArgumentType` enum should match the specification JSON schema which defines supported types as: `string | integer | float | boolean | list`. The module docstring must accurately reflect these supported types. ## Actual Behavior The module docstring in `src/cleveragents/domain/models/core/action.py` at line 23 states: ``` - Supported types: ``string``, ``integer``, ``float``, ``boolean``, ``path`` ``` However, the `ArgumentType` enum (defined in the same file) only has: ```python class ArgumentType(StrEnum): STRING = "string" INTEGER = "integer" FLOAT = "float" BOOLEAN = "boolean" LIST = "list" ``` The `path` type mentioned in the docstring does not exist in the enum. Additionally, the `ActionConfigSchema` in `src/cleveragents/action/schema.py` also does not include `path` in `_VALID_ARG_TYPES`. ## Impact - Developers reading the docstring may attempt to use `path` as an argument type in their action YAML files - This will fail at runtime with a `ValueError` from `ArgumentType._missing_` - The docstring also omits `list` (a valid type) while listing `path` (an invalid type) ## Code Location - `src/cleveragents/domain/models/core/action.py`, line 23 (module docstring) - `src/cleveragents/domain/models/core/action.py`, `ArgumentType` enum ## Steps to Reproduce 1. Read the module docstring in `action.py` 2. Note it says `path` is a supported type 3. Try to create an `ActionArgument` with `arg_type=ArgumentType("path")` 4. Observe `ValueError` because `path` is not in the enum ## Subtasks - [ ] Update the module docstring in `src/cleveragents/domain/models/core/action.py` to replace `path` with `list` in the supported types list - [ ] Verify no other docstrings or comments in the codebase reference `path` as a supported `ArgumentType` - [ ] Add or update a Behave unit test scenario asserting the docstring-listed types match the `ArgumentType` enum members - [ ] Ensure `nox -e lint` and `nox -e typecheck` pass after the change ## Definition of Done - [ ] Module docstring accurately lists `string`, `integer`, `float`, `boolean`, `list` as supported argument types - [ ] `path` is removed from the docstring - [ ] No other documentation or comments in the codebase incorrectly reference `path` as a valid `ArgumentType` - [ ] Associated PR is merged and linked to this issue - All nox stages pass - Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **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:50 +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
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#4024
No description provided.