Validate workspace config provider against registry at config-SAVE (fail-closed) + CI gate — catch provider=moonshot-not-in-registry class #2172

Closed
opened 2026-06-03 19:03:50 +00:00 by core-devops · 0 comments
Member

Problem

A workspace can be configured with a model whose derived provider is not in the providers registry, and nothing catches it until the agent BOOTS in prod and the runtime adapter throws.

Live example (adk-demo Assistant, 2026-06-03): workspace config model moonshot/kimi-k2.6 → claude-code adapter derives provider=moonshotValueError: provider=moonshot not in providers registry at boot. Canonical names are platform / kimi-coding; bare moonshot is not a registry provider. The config was SAVED without validation and only failed at agent boot. CI never saw it — this is the 3rd instance of the class (original adk-demo claude-code+moonshot boot failure that started the regression-coverage work, + Codex NOT-CONFIGURED cp#423).

Why current gates miss it

  • The providers↔template drift-gate (RFC#580) validates TEMPLATES against the registry, NOT per-WORKSPACE configs. The hole is per-workspace.
  • Unit/contract tests are mock-based — they neither validate a real config against the registry nor boot the real adapter.
  • The real boot gate (boot-to-registration e2e, cp#455/#479) that WOULD catch it is not yet landed.

Fix (cheap, high-leverage — do this independent of cp#455)

Static config↔registry validation, fail-closed at config-SAVE time (the workspace runtime-config set endpoint), not at boot:

  • For every workspace config, resolve model → derived provider (same derivation the adapter uses) and assert the provider ∈ the generated providers registry (providers.yaml SSOT). Reject the save with a clear error + the list of valid providers/aliases if not.
  • Add a CI test over the demo/template configs asserting every configured model resolves to a registry provider (regression gate, runs on every PR — mock-free, just registry-resolution).
  • Optional: register moonshot as an alias of kimi-coding/platform in providers.yaml IF bare moonshot/ should be valid — but the validation is the durable fix regardless.

Acceptance

A workspace config picking a non-registry provider is rejected at save with an actionable message; a CI test fails if any shipped demo/template config references an unregistered provider. Pairs with cp#455 boot-e2e (this is the fast static layer; cp#455 is the deep runtime layer).

## Problem A workspace can be configured with a model whose **derived provider is not in the providers registry**, and nothing catches it until the agent BOOTS in prod and the runtime adapter throws. **Live example (adk-demo Assistant, 2026-06-03):** workspace config model `moonshot/kimi-k2.6` → claude-code adapter derives `provider=moonshot` → `ValueError: provider=moonshot not in providers registry` at boot. Canonical names are `platform` / `kimi-coding`; bare `moonshot` is not a registry provider. The config was SAVED without validation and only failed at agent boot. **CI never saw it** — this is the 3rd instance of the class (original adk-demo claude-code+moonshot boot failure that started the regression-coverage work, + Codex NOT-CONFIGURED cp#423). ## Why current gates miss it - The providers↔template drift-gate (RFC#580) validates TEMPLATES against the registry, NOT per-WORKSPACE configs. The hole is per-workspace. - Unit/contract tests are mock-based — they neither validate a real config against the registry nor boot the real adapter. - The real boot gate (boot-to-registration e2e, cp#455/#479) that WOULD catch it is not yet landed. ## Fix (cheap, high-leverage — do this independent of cp#455) **Static config↔registry validation, fail-closed at config-SAVE time** (the workspace runtime-config set endpoint), not at boot: - For every workspace config, resolve `model → derived provider` (same derivation the adapter uses) and assert the provider ∈ the generated providers registry (providers.yaml SSOT). Reject the save with a clear error + the list of valid providers/aliases if not. - Add a CI test over the demo/template configs asserting every configured model resolves to a registry provider (regression gate, runs on every PR — mock-free, just registry-resolution). - Optional: register `moonshot` as an alias of `kimi-coding`/`platform` in providers.yaml IF bare `moonshot/` should be valid — but the validation is the durable fix regardless. ## Acceptance A workspace config picking a non-registry provider is rejected at save with an actionable message; a CI test fails if any shipped demo/template config references an unregistered provider. Pairs with cp#455 boot-e2e (this is the fast static layer; cp#455 is the deep runtime layer).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2172