Uppercase Names Rejected in Action/Actor Names Contrary to Spec #8171

Open
opened 2026-04-13 04:11:36 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit Message: fix(action): allow uppercase letters in action and actor names
  • Branch Name: bugfix/action-uppercase-names

Background and Context

The NAMESPACED_NAME_RE in src/cleveragents/action/schema.py is used to validate action and actor names. The specification in docs/specification.md allows for uppercase letters in these names.

The current regex ^[a-z0-9][a-z0-9_-]*/[a-z0-9][a-z0-9_-]*$ only allows lowercase letters, numbers, hyphens, and underscores. This causes valid names with uppercase letters to be rejected, violating the specification.

Expected Behavior

The regex should allow uppercase letters in action and actor names, as per the specification (^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$). Names such as DevOps/PlanInfra and Terraform/Apply should be accepted without error.

Acceptance Criteria

  • The NAMESPACED_NAME_RE regex in src/cleveragents/action/schema.py is updated to allow uppercase letters (e.g., ^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$).
  • The updated regex is applied consistently to both action and actor name validation.
  • Unit tests are added to verify that names with uppercase letters are correctly validated.
  • Existing tests continue to pass with no regressions.
  • The fix is confirmed against the specification in docs/specification.md.

Steps to Reproduce:

from cleveragents.action.schema import ActionConfigSchema

ActionConfigSchema.model_validate({
    "name": "DevOps/PlanInfra",
    "description": "Plan infrastructure changes",
    "actor": "Terraform/Apply"
})
# Raises: ValueError: Invalid action name 'DevOps/PlanInfra'

Subtasks

  • Locate NAMESPACED_NAME_RE in src/cleveragents/action/schema.py and update the regex to include uppercase letters.
  • Audit all usages of NAMESPACED_NAME_RE to ensure the updated pattern is applied to both action and actor name validation.
  • Cross-reference docs/specification.md to confirm the updated regex matches the spec.
  • Write unit tests covering:
    • Names with uppercase letters (e.g., DevOps/PlanInfra, Terraform/Apply)
    • Names with mixed case (e.g., MyOrg/myAction)
    • Names that should still be rejected (e.g., missing namespace separator, invalid characters)
  • Run the full test suite to confirm no regressions.

Definition of Done

This issue should be closed when:

  1. NAMESPACED_NAME_RE is updated to allow uppercase letters in both the namespace and name segments.
  2. The fix is verified against the specification in docs/specification.md.
  3. Unit tests covering uppercase name validation are added and passing.
  4. The full test suite passes with no regressions.
  5. The change is merged into the master branch via a PR from bugfix/action-uppercase-names.

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message:** `fix(action): allow uppercase letters in action and actor names` - **Branch Name:** `bugfix/action-uppercase-names` ## Background and Context The `NAMESPACED_NAME_RE` in `src/cleveragents/action/schema.py` is used to validate action and actor names. The specification in `docs/specification.md` allows for uppercase letters in these names. The current regex `^[a-z0-9][a-z0-9_-]*/[a-z0-9][a-z0-9_-]*$` only allows lowercase letters, numbers, hyphens, and underscores. This causes valid names with uppercase letters to be rejected, violating the specification. ## Expected Behavior The regex should allow uppercase letters in action and actor names, as per the specification (`^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$`). Names such as `DevOps/PlanInfra` and `Terraform/Apply` should be accepted without error. ## Acceptance Criteria - [ ] The `NAMESPACED_NAME_RE` regex in `src/cleveragents/action/schema.py` is updated to allow uppercase letters (e.g., `^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$`). - [ ] The updated regex is applied consistently to both action and actor name validation. - [ ] Unit tests are added to verify that names with uppercase letters are correctly validated. - [ ] Existing tests continue to pass with no regressions. - [ ] The fix is confirmed against the specification in `docs/specification.md`. **Steps to Reproduce:** ```python from cleveragents.action.schema import ActionConfigSchema ActionConfigSchema.model_validate({ "name": "DevOps/PlanInfra", "description": "Plan infrastructure changes", "actor": "Terraform/Apply" }) # Raises: ValueError: Invalid action name 'DevOps/PlanInfra' ``` ## Subtasks - [ ] Locate `NAMESPACED_NAME_RE` in `src/cleveragents/action/schema.py` and update the regex to include uppercase letters. - [ ] Audit all usages of `NAMESPACED_NAME_RE` to ensure the updated pattern is applied to both action and actor name validation. - [ ] Cross-reference `docs/specification.md` to confirm the updated regex matches the spec. - [ ] Write unit tests covering: - Names with uppercase letters (e.g., `DevOps/PlanInfra`, `Terraform/Apply`) - Names with mixed case (e.g., `MyOrg/myAction`) - Names that should still be rejected (e.g., missing namespace separator, invalid characters) - [ ] Run the full test suite to confirm no regressions. ## Definition of Done This issue should be closed when: 1. `NAMESPACED_NAME_RE` is updated to allow uppercase letters in both the namespace and name segments. 2. The fix is verified against the specification in `docs/specification.md`. 3. Unit tests covering uppercase name validation are added and passing. 4. The full test suite passes with no regressions. 5. The change is merged into the `master` branch via a PR from `bugfix/action-uppercase-names`. --- **Automated by CleverAgents Bot** Agent: new-issue-creator
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#8171
No description provided.