molecule-ai-workspace-templ.../tests
claude-ceo-assistant 8adc3576fd
Some checks failed
CI / Adapter unit tests (push) Successful in 1m46s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 50s
CI / Adapter unit tests (pull_request) Successful in 2m16s
CI / validate (pull_request) Successful in 6m18s
CI / validate (push) Failing after 18m56s
fix(adapter): map persona-friendly slugs (claude-code, anthropic) to registry names
Phase 4 verification surfaced a follow-up edge case the initial fix missed:
the persona env files use friendlier slugs than the registry's canonical names:
  * MODEL_PROVIDER=claude-code  -> anthropic-oauth (Claude Code subscription)
  * MODEL_PROVIDER=anthropic    -> anthropic-api  (direct Anthropic API key)

Without an alias map, a lead workspace's MODEL_PROVIDER=claude-code env
fell through the slug-detection path; when the YAML didn't pin a
provider, the model-prefix matcher saw MODEL=MiniMax-M2.7 and routed the
lead to MiniMax — even though CLAUDE_CODE_OAUTH_TOKEN was clearly the
intended auth path.

Add _PROVIDER_SLUG_ALIASES with the two operator-facing slugs that don't
match registry names verbatim. The alias map is consulted before the
slug-vs-legacy detection, so claude-code now resolves to anthropic-oauth
and the lead boots through OAuth as intended.

Tests
-----
+ test_persona_env_lead_with_minimax_model_routes_via_oauth — lock in
  the alias-map behavior so a future contributor can't silently re-introduce
  the lead-mis-routed-to-MiniMax bug.
+ test_anthropic_alias_resolves_to_anthropic_api — covers the second
  alias path.

Updated test_persona_env_lead_claude_code_resolves_correctly to assert
the new (correct) behavior: provider == 'anthropic-oauth', not None.

Full adapter suite: 78/78 pass.
2026-05-08 14:23:59 -07:00
..
conftest.py test(adapter): install adapter import shims via conftest 2026-05-07 10:58:51 -07:00
pytest.ini feat(adapter): pre-validate ANTHROPIC_BASE_URL + missing model combo 2026-04-30 22:35:49 -07:00
test_adapter_logging.py feat(adapter,entrypoint): boot env audit + crash-loop diagnosis logging 2026-05-02 21:41:05 -07:00
test_adapter_prevalidate.py fix(adapter,tests): isolate _load_providers tests from multi-path lookup 2026-05-08 13:27:56 -07:00
test_dev_channels_flag.py fix(executor): pass tagged server:molecule to dev-channels flag 2026-05-01 17:15:49 -07:00
test_env_model_provider_dispatch.py fix(adapter): map persona-friendly slugs (claude-code, anthropic) to registry names 2026-05-08 14:23:59 -07:00
test_provider_resolution.py test(adapter): install adapter import shims via conftest 2026-05-07 10:58:51 -07:00
test_provider_routing.py feat: per-vendor env routing for third-party providers (task #244) 2026-05-02 22:20:03 -07:00
test_runtime_wedge_mirror.py chore(executor): runtime_wedge mirror follow-ups from PR #29 review 2026-05-01 18:04:24 -07:00