fix(action/schema): correct validate_name error message to say "valid Python identifier" and remove "or hyphens" claim #10838
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!10838
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m8-action-argument-schema-error-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes a misleading error message in
ActionArgumentSchema.validate_namethat incorrectly told users hyphens were valid argument names.Problem
The
validate_namemethod insrc/cleveragents/action/schema.pyhad two issues:Wrong validation logic: Used
v.replace("-", "_").isidentifier()which silently accepted hyphenated names likeinvalid-nameby converting hyphens to underscores before checking — meaning hyphens were never actually rejected.Misleading error message: When validation did fail (e.g.,
1invalid), the error said:This explicitly told users hyphens were valid, contradicting the BDD spec.
Fix
v.replace("-", "_").isidentifier()→v.isidentifier()so hyphens are correctly rejected"Argument name must be a valid Python identifier (alphanumeric and underscores, not starting with a digit)"— matching the BDD scenario assertion exactlyBDD Scenarios Now Passing
Files Changed
src/cleveragents/action/schema.py—ActionArgumentSchema.validate_namemethodCloses #3039
This PR blocks issue #3243
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 3: sonnet — Success
Investigated CI failures on PR #10838. The code change in
src/cleveragents/action/schema.pywas already correct:validate_namenow usesv.isidentifier()(hyphens correctly rejected)"Argument name must be a valid Python identifier"matching BDD spec exactlyRoot cause of CI failures: The previous CI run (run 14658) had transient infrastructure failures:
CI / security— "Failing after 0s" (runner issue, not code)CI / integration_tests— "Failing after 0s" (runner issue, not code)CI / push-validation— "Failing after 0s" (runner issue, not code)All quality gates pass locally:
nox -s lint✓nox -s typecheck✓nox -s security_scan✓nox -s dead_code✓nox -s complexity✓action_schema.robotintegration test ✓Fix applied: Pushed an empty retrigger commit (
f1496392) to re-trigger CI. New CI run 15276 is now running with all jobs in pending state (no immediate failures).Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 1: haiku — Success
Pushed empty commit (
a13dcfc2c) to retrigger CI after identifying transient infrastructure failures in previous run (run 15276).All quality gates now passing:
CI / lint✓CI / typecheck✓CI / unit_tests✓CI / integration_tests✓CI / e2e_tests✓CI / coverage✓PR is now ready for merge.
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Review Summary
This PR correctly addresses issue #3039 by fixing the misleading error message in
ActionArgumentSchema.validate_name. The changes:v.replace("-", "_").isidentifier()tov.isidentifier()to properly reject hyphens in argument names"Argument name must be a valid Python identifier"matching BDD specificationAll checklist categories pass:
features/consolidated_action.featureNo blocking issues found. Approved for merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
Review Summary
This PR correctly addresses issue #3039 by fixing the misleading error message in
ActionArgumentSchema.validate_name. The changes:v.replace("-", "_").isidentifier()tov.isidentifier()to properly reject hyphens in argument names"Argument name must be a valid Python identifier"matching BDD specificationAll checklist categories pass:
features/consolidated_action.featureNo blocking issues found. Approved for merge.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
a13dcfc2ce5827d4f98e5827d4f98e7237b362807237b36280ebcb8a5437ebcb8a54377dbecbdf557dbecbdf55ff62e28d16