fix(actor): handle nested actor type and combined config.actor field in v3 YAML #11193

Merged
freemo merged 1 commits from bugfix/m3-actor-config-actor-field into master 2026-05-14 08:11:14 +00:00

1 Commits

Author SHA1 Message Date
hurui200320 61bea69bfb fix(actor): handle nested actor type and combined config.actor field in v3 YAML
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 41s
CI / build (pull_request) Successful in 1m14s
CI / lint (pull_request) Successful in 1m38s
CI / quality (pull_request) Successful in 1m44s
CI / typecheck (pull_request) Successful in 1m59s
CI / security (pull_request) Successful in 2m2s
CI / integration_tests (pull_request) Successful in 4m39s
CI / unit_tests (pull_request) Successful in 5m11s
CI / docker (pull_request) Successful in 1m38s
CI / coverage (pull_request) Successful in 13m39s
CI / status-check (pull_request) Successful in 4s
Two defects in ActorConfiguration._extract_v3_actor() prevented YAML files
using the spec-canonical nested actors map format from being registered:

Defect A: The method looked for the 'type' field inside the 'config:' block
(config_block.get('type')) instead of at the actor-entry level
(first_entry.get('type')). Because the spec places 'type' at
actors.<name>.type — a sibling of 'config:', not a child of it — the v3
detection branch never fired for nested-actors-map YAMLs, causing
_extract_v3_actor() to return (None, None, None, False) immediately.

Defect B: Even if the type was found, the method only consulted separate
config.provider and config.model keys; it never parsed the combined
config.actor: 'provider/model' shorthand. Without the combined-field
fallback, provider and model remained None for all spec-canonical YAMLs
that use the shorthand, causing from_blob() to raise
'BadParameter: provider is required'.

Both defects had to be fixed together because Defect A blocked the code
from ever reaching the path where Defect B would otherwise have been
encountered.

The combined-format parser (config.actor split on first '/') is inserted
after the explicit config.provider / config.model lookups so that explicit
separate fields always take precedence over the shorthand when both are
present.

Parsing logic extracted into _parse_combined_actor_field() helper to
eliminate DRY violation. Both provider and model halves validated
consistently (empty provider half was previously silently inferred).

Adds Behave scenarios covering: nested actors map + combined config.actor
(success), explicit config.provider precedence over config.actor,
explicit config.model precedence over config.actor, genuinely missing
provider/model raising validation error, and malformed combined values
(empty model half, empty provider half, missing delimiter). Adds a Robot
integration test for the combined-actor YAML path with provider/model
assertions via show. Restores accidentally deleted TOOL and GRAPH Robot
integration tests. Mirrors provider/model extraction in
step_run_actor_update for assertion step compatibility.

ISSUES CLOSED: #11189
2026-05-14 07:07:37 +00:00