UAT: ActionConfigSchema name validation rejects uppercase letters — spec JSON Schema allows [a-zA-Z0-9_-]+ but implementation enforces lowercase-only [a-z0-9][a-z0-9_-]* #4605

Open
opened 2026-04-08 16:03:10 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area

Action YAML config schema validation / ActionConfigSchema

What Was Tested

Code-level analysis of src/cleveragents/action/schema.py.

Expected Behavior (from spec)

The spec (docs/specification.md, Action Configuration Files JSON Schema section) defines the name pattern as:

"name": {
  "type": "string",
  "pattern": "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$",
  "description": "Fully qualified action name in <namespace>/<name> format."
}

The pattern [a-zA-Z0-9_-]+ explicitly allows uppercase letters.

Similarly, the spec JSON schema for actor names uses the same pattern for strategy_actor, execution_actor, etc.

Actual Behavior (from code)

The ActionConfigSchema uses a lowercase-only regex:

# src/cleveragents/action/schema.py
NAMESPACED_NAME_RE = re.compile(r"^[a-z0-9][a-z0-9_-]*/[a-z0-9][a-z0-9_-]*$")

This pattern:

  1. Only allows lowercase letters ([a-z0-9])
  2. Requires the first character to be alphanumeric (no leading hyphens/underscores)
  3. Rejects uppercase letters entirely

The same lowercase-only regex is used for actor name validation in validate_required_actor_name and validate_optional_actor_name.

Steps to Reproduce

from cleveragents.action.schema import ActionConfigSchema

# This should be valid per spec but raises ValidationError:
yaml_content = """
name: MyOrg/MyAction
description: Test action
strategy_actor: MyOrg/strategist
execution_actor: MyOrg/executor
definition_of_done: Done when complete
"""
schema = ActionConfigSchema.from_yaml(yaml_content)
# Raises: ValueError: Invalid action name 'MyOrg/MyAction'

Code Location

src/cleveragents/action/schema.py:

  • NAMESPACED_NAME_RE constant (line ~42)
  • validate_namespaced_name field validator
  • validate_required_actor_name field validator
  • validate_optional_actor_name field validator

Fix Required

Update NAMESPACED_NAME_RE to match the spec pattern:

NAMESPACED_NAME_RE = re.compile(r"^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$")

Note: The Action domain model in src/cleveragents/domain/models/core/action.py uses NamespacedName.parse() which may have its own pattern. Both should be updated to match the spec.


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

## Bug Report ### Feature Area Action YAML config schema validation / `ActionConfigSchema` ### What Was Tested Code-level analysis of `src/cleveragents/action/schema.py`. ### Expected Behavior (from spec) The spec (docs/specification.md, Action Configuration Files JSON Schema section) defines the name pattern as: ```json "name": { "type": "string", "pattern": "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$", "description": "Fully qualified action name in <namespace>/<name> format." } ``` The pattern `[a-zA-Z0-9_-]+` explicitly allows uppercase letters. Similarly, the spec JSON schema for actor names uses the same pattern for `strategy_actor`, `execution_actor`, etc. ### Actual Behavior (from code) The `ActionConfigSchema` uses a lowercase-only regex: ```python # src/cleveragents/action/schema.py NAMESPACED_NAME_RE = re.compile(r"^[a-z0-9][a-z0-9_-]*/[a-z0-9][a-z0-9_-]*$") ``` This pattern: 1. Only allows lowercase letters (`[a-z0-9]`) 2. Requires the first character to be alphanumeric (no leading hyphens/underscores) 3. Rejects uppercase letters entirely The same lowercase-only regex is used for actor name validation in `validate_required_actor_name` and `validate_optional_actor_name`. ### Steps to Reproduce ```python from cleveragents.action.schema import ActionConfigSchema # This should be valid per spec but raises ValidationError: yaml_content = """ name: MyOrg/MyAction description: Test action strategy_actor: MyOrg/strategist execution_actor: MyOrg/executor definition_of_done: Done when complete """ schema = ActionConfigSchema.from_yaml(yaml_content) # Raises: ValueError: Invalid action name 'MyOrg/MyAction' ``` ### Code Location `src/cleveragents/action/schema.py`: - `NAMESPACED_NAME_RE` constant (line ~42) - `validate_namespaced_name` field validator - `validate_required_actor_name` field validator - `validate_optional_actor_name` field validator ### Fix Required Update `NAMESPACED_NAME_RE` to match the spec pattern: ```python NAMESPACED_NAME_RE = re.compile(r"^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$") ``` Note: The `Action` domain model in `src/cleveragents/domain/models/core/action.py` uses `NamespacedName.parse()` which may have its own pattern. Both should be updated to match the spec. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 17:41:20 +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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4605
No description provided.