Files
cleveragents-core/docs
CoreRasurae 3e13411fcf
CI / lint (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 2m2s
CI / security (pull_request) Successful in 2m5s
CI / quality (pull_request) Successful in 1m12s
CI / push-validation (pull_request) Successful in 47s
CI / helm (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 1m8s
CI / integration_tests (pull_request) Successful in 4m52s
CI / unit_tests (pull_request) Failing after 6m20s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
fix(actors): distinguish namespace/name from provider/model in actor name parsing
When action YAML references actors using namespace/name format (e.g.
`strategy_actor: local/my-strategist`), `_parse_actor_name()` incorrectly
treated the namespace prefix as a provider name, causing
`ValueError: Unknown provider type: local`.

Changes:

- `_is_known_provider()`: New utility function (strategy_resolution.py)
  that checks whether a slash-separated first segment matches a known
  `ProviderType` value (openai, anthropic, etc.). Consolidated into a
  single implementation; llm_actors.py now imports from
  strategy_resolution.py.

- `_parse_actor_name()`: When the first segment IS a known provider,
  preserves existing behaviour (provider/model). When it is NOT a known
  provider, treats the input as namespace/name and returns the full name
  as the model identifier with the default provider. Callers SHOULD
  pre-resolve namespace/name references via the actor registry before
  calling this function. Both implementations (strategy_resolution.py
  and llm_actors.py) updated; ProviderType import moved to top level.

- `PlanLifecycleService.resolve_actor_provider_model()`: New method
  that resolves a namespaced actor name (e.g. local/my-strategist) to
  provider/model format by looking up the actor record and extracting
  its provider and model fields.

- `LifecycleService` Protocol (strategy_resolution.py): Added
  `resolve_actor_provider_model` to the protocol, eliminating the
  need for `# type: ignore[union-attr]` at call sites.

- `PlanLifecycleProtocol` (llm_actors.py): Added
  `resolve_actor_provider_model` to the protocol.

- Caller pre-resolution: StrategyActor, LLMStrategizeActor,
  LLMExecuteActor, SessionWorkflow._resolve_llm(), and CLI session
  commands now pre-resolve actor names through the lifecycle service
  or via injected actor_resolver callables before calling
  `_parse_actor_name()`, ensuring namespace/name references are
  correctly mapped to their underlying LLM providers.

- `_build_actor_resolver()` (cli/commands/session.py) and
  `_build_actor_resolver_for_session_workflow()` (a2a/facade.py):
  Moved `_is_known_provider` imports to top level; removed redundant
  `except (NotFoundError, Exception)`; added warning logging for
  outer exception handlers.

- `make_mock_lifecycle()` (mock_strategy_llm.py) and
  `_make_mock_lifecycle()` (llm_actors_coverage_steps.py): Added
  `resolve_actor_provider_model` to mock lifecycle services for
  test compatibility.

- Added `@tdd_issue @tdd_issue_11254` tags to all new BDD scenarios
  related to namespace/name disambiguation in llm_actors_coverage,
  strategy_actor_llm, and plan_lifecycle_service_coverage_boost_r4
  feature files.

- Updated docs/CHANGELOG.md with the fix entry.

ISSUES CLOSED: #11254
2026-05-22 20:42:25 +01:00
..
2026-03-10 12:38:35 -04:00