Fix pre-existing lint, typecheck, and security failures that were
blocking the PR from passing CI:
- Fix E501 line-too-long in session_service.py (remove erroneous
"sha256:" string prefix from dict comprehension on line 268)
- Fix W293 trailing whitespace in tool.py line 249
- Fix typecheck error in session_service.py: data.get("checksum")
can return None, remove invalid string concatenation
- Fix typecheck error in schema.py: add explicit dict[str, Any]
type annotation for wrapper variable to resolve str|None issue
- Fix vulture false positive: add "destination" Protocol parameter
to vulture_whitelist.py
- Fix @tdd_issue/@tdd_issue_1472 tag placement in skill_schema.feature
(remove blank line between tags and scenario)
- Add @tdd_issue/@tdd_issue_1472 tags to all new wrapper key scenarios
- Add Robot integration test for spec-compliant skill: wrapper YAML
Implement skill: wrapper key unwrapping in SkillConfigSchema.from_yaml()
to support the spec-required YAML format with cleveragents: metadata header.
- Strip cleveragents: metadata block from raw YAML before validation
- Unwrap skill: wrapper key if present, with descriptive errors for invalid values
- Maintain backward compatibility with flat YAML format (no wrapper)
- Add Behave scenarios tagged @tdd_issue and @tdd_issue_1472 covering:
* Spec-compliant YAML with skill: wrapper key
* Spec-compliant YAML with cleveragents: header
* skill: with None, string, and list values (error cases)
* Backward compatibility with flat YAML
* cleveragents: header without skill: wrapper
Closes#1472
Add rejection scenarios for actor names with empty server prefix and
server prefix without namespace slash to cover all error branches in
the updated validate_name method. Add skill rejection scenario for
server-qualified names with multiple slashes for parity with actor tests.
ISSUES CLOSED: #9074
Add BDD test scenarios for server-qualified name acceptance in:
- features/actor_schema.feature: Accept/reject scenarios for server:namespace/name format
- features/skill_schema.feature: Accept scenarios for server:namespace/name format
- features/consolidated_tool.feature: Accept scenarios for server:namespace/name format
Also fix lint issues in the previous commit:
- Remove trailing whitespace from actor/schema.py docstring
- Split long NAMESPACED_NAME_RE line in skills/schema.py
ISSUES CLOSED: #9074
Enforce lowercase-only namespace/name pattern in both SkillConfigSchema
and ActionConfigSchema by updating NAMESPACED_NAME_RE from the permissive
[a-zA-Z0-9] pattern to the strict [a-z0-9] pattern.
This fixes a UAT-identified bug where uppercase letters were incorrectly
accepted in the namespace/name fields of skill and action configurations,
violating the spec's naming convention (^[a-z0-9_-]+/[a-z0-9_-]+$).
Changes:
- src/cleveragents/skills/schema.py: Update NAMESPACED_NAME_RE to reject
uppercase letters in namespace and name parts
- src/cleveragents/action/schema.py: Apply the same lowercase-only fix
- features/skill_schema.feature: Add BDD scenarios for uppercase namespace,
uppercase name part, fully uppercase name, uppercase tool ref, and
uppercase include name rejection
- features/consolidated_action.feature: Add BDD scenarios for uppercase
namespace, uppercase name part, and fully uppercase name rejection
ISSUES CLOSED: #3029