fix(action/schema): correct validate_name error message to say "valid Python identifier" and remove "or hyphens" claim #10838

Merged
HAL9000 merged 3 commits from bugfix/m8-action-argument-schema-error-message into master 2026-04-28 06:27:11 +00:00

3 Commits

Author SHA1 Message Date
HAL9000 ff62e28d16 ci: retrigger CI
CI / status-check (push) Blocked by required conditions
CI / benchmark-publish (push) Failing after 37s
CI / lint (push) Successful in 47s
CI / push-validation (push) Successful in 26s
CI / helm (push) Successful in 36s
CI / typecheck (push) Successful in 1m10s
CI / build (push) Successful in 57s
CI / quality (push) Successful in 1m12s
CI / security (push) Successful in 1m21s
CI / e2e_tests (push) Successful in 5m35s
CI / benchmark-publish (pull_request) Has been skipped
CI / integration_tests (push) Successful in 6m42s
CI / unit_tests (push) Successful in 9m38s
CI / coverage (push) Successful in 11m54s
CI / docker (push) Has started running
CI / status-check (pull_request) Successful in 4s
CI / quality (pull_request) Successful in 1m8s
CI / e2e_tests (pull_request) Successful in 3m43s
CI / docker (pull_request) Successful in 1m40s
CI / push-validation (pull_request) Successful in 26s
CI / security (pull_request) Successful in 1m25s
CI / integration_tests (pull_request) Successful in 4m20s
CI / lint (pull_request) Successful in 53s
CI / helm (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 1m21s
CI / build (pull_request) Successful in 58s
CI / unit_tests (pull_request) Successful in 8m16s
CI / coverage (pull_request) Successful in 12m33s
2026-04-28 06:09:25 +00:00
HAL9000 aa8f2b1f50 ci: retrigger CI pipeline
Previous CI run had transient failures:
- security: Failing after 0s (infrastructure/runner issue)
- integration_tests: Failing after 0s (infrastructure/runner issue)
- push-validation: Failing after 0s (missing FORGEJO_TOKEN secret or runner issue)

All quality gates pass locally (lint, typecheck, security_scan, dead_code, complexity).
Code change is correct: validate_name now uses v.isidentifier() and error message
matches BDD spec exactly.

ISSUES CLOSED: N/A (CI retrigger)
2026-04-28 06:09:25 +00:00
HAL9000 253f59e8b1 fix(action/schema): correct validate_name error message to say "valid Python identifier" and remove "or hyphens" claim
Changed ActionArgumentSchema.validate_name in src/cleveragents/action/schema.py:

- Replaced v.replace("-", "_").isidentifier() with v.isidentifier() so hyphens are correctly rejected instead of silently accepted

- Updated error message to say "Argument name must be a valid Python identifier (alphanumeric and underscores, not starting with a digit)" matching the BDD scenario assertion exactly

- Updated docstring to say "valid Python identifier"

ISSUES CLOSED: #3039
2026-04-28 06:09:25 +00:00