Files
cleveragents-core/features/actor_config_coverage_boost.feature
hurui200320 d512123d1c
CI / lint (pull_request) Successful in 48s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 54s
CI / quality (pull_request) Successful in 1m52s
CI / typecheck (pull_request) Successful in 1m57s
CI / security (pull_request) Successful in 1m58s
CI / helm (pull_request) Successful in 27s
CI / push-validation (pull_request) Successful in 21s
CI / integration_tests (pull_request) Successful in 6m43s
CI / unit_tests (pull_request) Successful in 9m4s
CI / docker (pull_request) Successful in 1m42s
CI / coverage (pull_request) Successful in 11m45s
CI / e2e_tests (pull_request) Successful in 3m22s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (push) Failing after 44s
CI / build (push) Successful in 49s
CI / lint (push) Successful in 1m8s
CI / helm (push) Successful in 38s
CI / quality (push) Successful in 1m25s
CI / security (push) Successful in 1m26s
CI / typecheck (push) Successful in 1m30s
CI / push-validation (push) Successful in 23s
CI / e2e_tests (push) Successful in 3m52s
CI / integration_tests (push) Successful in 4m8s
CI / coverage (push) Successful in 12m30s
CI / unit_tests (push) Successful in 6m32s
CI / docker (push) Successful in 1m39s
CI / status-check (push) Successful in 3s
fix(actor): support v3 Actor YAML schema in CLI registration and execution
The actor CLI was ignoring the v3 ActorConfigSchema format, preventing
spec-compliant actors with type/route/skills/lsp fields from being
registered or executed.  Three components were fixed:

ActorConfiguration.from_blob() now detects v3 format (top-level "type"
key with value llm/graph/tool) and extracts provider from the model
string, falling through to v2 extraction when v3 does not match.

ActorRegistry.add() now routes v3 YAML through full ActorConfigSchema
validation, persists description/skills/lsp in the config blob, and
compiles graph actors with compile_actor() storing metadata.  Legacy v2
YAML continues through the original path unchanged.

ReactiveConfigParser._build() now synthesises reactive agents and graph
routes from v3 actor data so that agents actor run can execute v3 actors
through the existing ReactiveCleverAgentsApp pipeline.

ISSUES CLOSED: #6283
2026-04-27 05:00:54 +00:00

42 lines
2.1 KiB
Gherkin

Feature: ActorConfiguration.load_yaml_text and defensive paths
Coverage-boost scenarios targeting uncovered lines in actor/config.py
# --- load_yaml_text: JSON null input (lines 50-51) ---
Scenario: load_yaml_text returns empty dict for JSON null
When I call load_yaml_text with "null"
Then the load_yaml_text result should be an empty dict
# --- load_yaml_text: JSON non-dict input (lines 52-53) ---
Scenario: load_yaml_text raises ValueError for a JSON string
When I call load_yaml_text with a JSON string value
Then a ValueError with message containing "object" should be raised
Scenario: load_yaml_text raises ValueError for a JSON array
When I call load_yaml_text with a JSON array value
Then a ValueError with message containing "object" should be raised
Scenario: load_yaml_text raises ValueError for a JSON integer
When I call load_yaml_text with a JSON integer value
Then a ValueError with message containing "object" should be raised
# --- load_yaml_text: valid JSON dict (line 54) ---
Scenario: load_yaml_text returns parsed dict for valid JSON object
When I call load_yaml_text with '{"provider": "openai", "model": "gpt-4"}'
Then the load_yaml_text result should have key "provider" equal to "openai"
And the load_yaml_text result should have key "model" equal to "gpt-4"
Scenario: load_yaml_text returns parsed dict for empty JSON object
When I call load_yaml_text with '{}'
Then the load_yaml_text result should be an empty dict
# --- load_yaml_text: YAML fallback path ---
Scenario: load_yaml_text falls back to YAML for non-JSON input
When I call load_yaml_text with YAML text "provider: openai\nmodel: gpt-4\n"
Then the load_yaml_text result should have key "provider" equal to "openai"
# --- load_yaml_text: interpolation returns non-dict (line 89) ---
Scenario: load_yaml_text raises ValueError when interpolation returns non-dict
Given interpolate_env_vars is patched to return a list
When I call load_yaml_text with valid YAML via patched interpolation
Then a ValueError with message containing "object" should be raised