From 97b1c76b1430405077e78a6dc687486c56e4ddb4 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sun, 8 Mar 2026 17:32:52 -0700 Subject: [PATCH] test: add regression test for #712 (setup wizard codex import) Verifies that setup.py imports the correct function name (get_codex_model_ids) from codex_models.py. This would have caught the ImportError bug before it reached users. --- tests/test_codex_models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_codex_models.py b/tests/test_codex_models.py index e6cc2fde..40a447a1 100644 --- a/tests/test_codex_models.py +++ b/tests/test_codex_models.py @@ -30,6 +30,14 @@ def test_get_codex_model_ids_prioritizes_default_and_cache(tmp_path, monkeypatch assert "gpt-5-hidden-codex" not in models +def test_setup_wizard_codex_import_resolves(): + """Regression test for #712: setup.py must import the correct function name.""" + # This mirrors the exact import used in hermes_cli/setup.py line 873. + # A prior bug had 'get_codex_models' (wrong) instead of 'get_codex_model_ids'. + from hermes_cli.codex_models import get_codex_model_ids as setup_import + assert callable(setup_import) + + def test_get_codex_model_ids_falls_back_to_curated_defaults(tmp_path, monkeypatch): codex_home = tmp_path / "codex-home" codex_home.mkdir(parents=True, exist_ok=True)