no-mistakes(review): Fix compression example alias; make retired aliases fail audit

This commit is contained in:
root
2026-09-12 16:19:43 +00:00
parent 221f9f79f3
commit 9cac3589cf
5 changed files with 48 additions and 11 deletions
+18
View File
@@ -87,3 +87,21 @@ def test_retired_gemma_is_rejected(tmp_path):
assert code == 1, out
assert "auxiliary.vision.model must be gpu-vision" in out
assert "RESULT: FAIL" in out
def test_retired_alias_in_delegation_is_rejected(tmp_path):
"""delegation.model has no dedicated value rule, so a retired name there used to PASS."""
cfg = tmp_path / "delegation-gpu-light.yaml"
cfg.write_text(
BASE.format(alias="gpu-vision").replace(
"delegation:\n provider: harness",
"delegation:\n provider: harness\n model: gpu-light",
)
)
proc = subprocess.run(
[sys.executable, str(AUDIT), str(cfg)],
capture_output=True, text=True,
)
assert proc.returncode == 1, proc.stdout
assert "delegation.model = 'gpu-light' is retired" in proc.stdout
assert "RESULT: FAIL" in proc.stdout