Files
cleveragents-core/robot/actor_hierarchy.robot
aditya e476d2de0e feat(actor): extend hierarchical actor YAML schema and loader
Extend actor YAML schema to support hierarchical graphs with explicit
node types (agent, tool, conditional, subgraph), per-node LSP bindings
(lsp_binding with server, languages, auto, capabilities), and tool-source
references (skills, mcp_servers, agent_skills).

Add schema validation for namespaced actor references, duplicate node IDs,
edge target existence, and graph reachability — all nodes must be reachable
from entry_node via explicit edges or conditional node routing targets.

Update loader to report YAML parse errors with precise line/column positions
and schema validation errors with dotted field paths and remediation hints
pointing to docs/reference/actor_config.md.

Add docs/reference/actor_config.md as the practical configuration reference
covering hierarchical graph examples, node type table, topology rules, and
common error cases with fix guidance.

Refresh examples/actors/graph_workflow.yaml to replace deprecated actor_path
with actor_ref. Add benchmarks/actor_yaml_bench.py for schema load overhead.

Tests: 95 Behave scenarios, 10 Robot smoke tests (including hierarchical
loader smoke test), security scan clean, coverage 99% (threshold 97%).

ISSUES CLOSED: #157
2026-02-25 10:30:42 +00:00

49 lines
2.2 KiB
Plaintext

*** Settings ***
Documentation Smoke tests for hierarchical actor YAML extensions
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER} ${CURDIR}/helper_actor_hierarchy.py
*** Test Cases ***
Discover Hierarchical Actor Example
[Documentation] Load hierarchical workflow example and verify extensions
${result}= Run Process ${PYTHON} ${HELPER} discover-hierarchical cwd=${WORKSPACE}
Log ${result.stdout}
Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-loaded: workflows/dev-workflow
Should Contain ${result.stdout} skills-count: 2
Should Contain ${result.stdout} lsp-configured: True
Parse Actor With LSP Binding
[Documentation] Validate that per-node LSP bindings parse correctly
${result}= Run Process ${PYTHON} ${HELPER} parse-lsp-binding cwd=${WORKSPACE}
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} lsp-binding-server: local/pyright
Should Contain ${result.stdout} lsp-binding-langs: python
Parse Actor With Tool Sources
[Documentation] Validate that per-node tool-source references parse correctly
${result}= Run Process ${PYTHON} ${HELPER} parse-tool-sources cwd=${WORKSPACE}
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} tool-sources-count: 2
Parse Actor With Subgraph Actor Ref
[Documentation] Validate subgraph node with actor_ref
${result}= Run Process ${PYTHON} ${HELPER} parse-subgraph-ref cwd=${WORKSPACE}
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} actor-ref: local/code-reviewer
Reject Invalid LSP Binding
[Documentation] Reject actor with non-namespaced LSP server
${result}= Run Process ${PYTHON} ${HELPER} reject-bad-lsp cwd=${WORKSPACE}
Log ${result.stdout}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} validation-error: lsp_binding