Commit Graph

6 Commits

Author SHA1 Message Date
HAL9000 387b640249 fix(skills): fix CI gate failures blocking PR #1506 merge
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
2026-05-30 04:04:21 -04:00
HAL9000 cce6cfb119 fix(skill): handle skill: wrapper key in agents skill add YAML config
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
2026-05-30 04:04:21 -04:00
HAL9000 6d0622c698 test(schema): add BDD scenarios for uncovered server-qualified name validator branches
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
2026-04-23 12:19:50 +00:00
HAL9000 86525a4ba4 fix(schema): add BDD scenarios and fix lint for server-qualified name validators
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
2026-04-23 12:19:50 +00:00
freemo 7b0533b34d fix(skills): add lowercase-only namespace/name pattern validation to SkillConfigSchema.name field
CI / lint (pull_request) Successful in 20s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m0s
CI / quality (pull_request) Successful in 41s
CI / build (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 7m15s
CI / e2e_tests (pull_request) Successful in 16m28s
CI / integration_tests (pull_request) Successful in 22m39s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 11m4s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m3s
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
2026-04-05 07:43:56 +00:00
aditya c41581b7c4 docs(skill): add skill YAML schema and examples
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 31s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Successful in 22s
CI / quality (pull_request) Successful in 16s
CI / integration_tests (pull_request) Failing after 3m46s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Failing after 9m57s
CI / docker (pull_request) Has been skipped
2026-02-16 19:52:47 +05:30