4040
4141import pytest
4242
43- from mobius ._registry import _TEST_MODEL_IDS , registry
43+ from mobius ._registry import registry
4444from mobius ._testing .golden import (
4545 discover_test_cases ,
4646 golden_path_for_case ,
@@ -123,7 +123,9 @@ def _all_registered() -> list[str]:
123123def _all_registered_with_test_id () -> dict [str , str ]:
124124 """Return {model_type: test_model_id} for registered models with one."""
125125 return {
126- arch : model_id for arch , model_id in _TEST_MODEL_IDS .items () if arch in registry ._map
126+ arch : registration .test_model_id
127+ for arch , registration in registry ._map .items ()
128+ if registration .test_model_id is not None
127129 }
128130
129131
@@ -169,10 +171,22 @@ def _all_registered_with_test_id() -> dict[str, str]:
169171 # --- Internal / duplicate aliases ---
170172 "code_llama" : "Alias for llama — covered by llama" ,
171173 "command_r" : "Alias for cohere — covered by cohere" ,
174+ "deepseek" : "Legacy DeepSeek-V3 registry alias; graph/config coverage is shared with "
175+ "deepseek_v3, whose real-checkpoint evidence owns the family claim." ,
172176 "deepseek_v2_moe" : "Alias for deepseek_v2 — covered by deepseek_v2" ,
177+ "gguf_legacy" : "Internal graph selected only after strict GGUF metadata validation; "
178+ "covered by exact legacy GGUF builder and runtime tests." ,
173179 "gpt_oss" : "Internal model — no public HF checkpoint" ,
174180 "helium" : "Alias for mistral — covered by mistral" ,
181+ "minicpm_gguf" : "GGUF-only MiniCPM ABI variant; native config coverage uses minicpm, "
182+ "while GGUF metadata and runtime coverage exercise this exact route." ,
183+ "minicpm3_gguf" : "GGUF-only MiniCPM3 ABI variant; native config coverage uses minicpm3, "
184+ "while GGUF metadata and runtime coverage exercise this exact route." ,
175185 "open-llama" : "Alias for llama — covered by llama" ,
186+ "pangu_embedded" : "Internal embedded-model family selected from package metadata; "
187+ "no standalone Hugging Face model_type/config route exists." ,
188+ "plm" : "L1/L2 and dedicated GGUF parity cover the architecture; reproducible L4/L5 "
189+ "golden data for the pinned PLM checkpoint is not yet checked in." ,
176190 "phimoe_gguf" : "GGUF-only PhiMoE routing variant — checkpoint coverage uses phimoe" ,
177191 "eurobert_gguf" : "GGUF-only specialized encoder — no native HF model_type route for "
178192 "generic L2/L4/L5; pinned HF-to-GGUF config semantics and synthetic ORT parity "
@@ -416,7 +430,7 @@ def test_model_has_l1_l3_config(self, arch: str):
416430
417431
418432class TestL2ConfigValidation :
419- """L2: every model needs a ``test_model_id`` in ``_TEST_MODEL_IDS ``.
433+ """L2: every model needs a registered ``test_model_id ``.
420434
421435 This allows ``arch_validation_test.py`` to fetch and validate its
422436 HuggingFace config.
@@ -425,29 +439,28 @@ class TestL2ConfigValidation:
425439 def test_all_models_have_test_model_id_or_skip (self ):
426440 """Aggregate check: every registered model needs a test_model_id."""
427441 all_reg = _all_registered ()
428- missing = [
429- mt for mt in all_reg if mt not in _TEST_MODEL_IDS and mt not in _COVERAGE_SKIP
430- ]
442+ with_test_id = _all_registered_with_test_id ()
443+ missing = [mt for mt in all_reg if mt not in with_test_id and mt not in _COVERAGE_SKIP ]
431444 if missing :
432445 pytest .fail (
433446 f"{ len (missing )} registered model(s) have no "
434447 f"test_model_id in _registry.py and are not in "
435448 f"_COVERAGE_SKIP:\n "
436449 + "\n " .join (f" { mt } " for mt in missing )
437- + "\n \n Fix: add test_model_id to _TEST_MODEL_IDS "
450+ + "\n \n Fix: set test_model_id on the model registration "
438451 "in src/mobius/_registry.py."
439452 )
440453
441454 @pytest .mark .parametrize ("arch" , _all_registered ())
442455 def test_model_has_test_model_id (self , arch : str ):
443456 """Per-model check for test_model_id (L2)."""
444- if arch in _TEST_MODEL_IDS :
457+ if arch in _all_registered_with_test_id () :
445458 return # Has test_model_id — pass even if in _COVERAGE_SKIP
446459 if arch in _COVERAGE_SKIP :
447460 pytest .skip (_COVERAGE_SKIP [arch ])
448461 pytest .fail (
449- f"Model '{ arch } ' has no test_model_id in "
450- f"_TEST_MODEL_IDS. Add one for L2 config validation."
462+ f"Model '{ arch } ' has no registered test_model_id. "
463+ "Set one in src/mobius/_registry.py for L2 config validation."
451464 )
452465
453466
0 commit comments