diff --git a/scripts/release.py b/scripts/release.py index d868fb1369..7197f3d833 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -344,6 +344,7 @@ AUTHOR_MAP = { "greer.guthrie@gmail.com": "g-guthrie", "kennyx102@gmail.com": "bobashopcashier", "77253505+bobashopcashier@users.noreply.github.com": "bobashopcashier", + "25355950+megastary@users.noreply.github.com": "megastary", # PR #18325 "shokatalishaikh95@gmail.com": "areu01or00", "bryan@intertwinesys.com": "bryanyoung", "christo.mitov@gmail.com": "christomitov", diff --git a/tests/gateway/test_teams.py b/tests/gateway/test_teams.py index 7a035142ed..2befceec94 100644 --- a/tests/gateway/test_teams.py +++ b/tests/gateway/test_teams.py @@ -313,9 +313,33 @@ class TestTeamsPluginRegistration: # --------------------------------------------------------------------------- -# Tests: Connect / Disconnect +# Tests: Interactive setup (import fix regression — #18325 / #19173) # --------------------------------------------------------------------------- +class TestTeamsInteractiveSetup: + def test_interactive_setup_persists_credentials(self, tmp_path, monkeypatch): + """Regression for #19173: interactive_setup must import prompt helpers + from hermes_cli.cli_output (not hermes_cli.config) and persist + credentials to .env without crashing. + """ + hermes_home = tmp_path / "hermes" + monkeypatch.setenv("HERMES_HOME", str(hermes_home)) + + import hermes_cli.cli_output as cli_output_mod + + answers = iter(["client-id", "client-secret", "tenant-id", "aad-1, aad-2"]) + monkeypatch.setattr(cli_output_mod, "prompt", lambda *_a, **_kw: next(answers)) + monkeypatch.setattr(cli_output_mod, "prompt_yes_no", lambda *_a, **_kw: True) + monkeypatch.setattr(cli_output_mod, "print_info", lambda *_a, **_kw: None) + monkeypatch.setattr(cli_output_mod, "print_success", lambda *_a, **_kw: None) + monkeypatch.setattr(cli_output_mod, "print_warning", lambda *_a, **_kw: None) + + _teams_mod.interactive_setup() + + env_text = (hermes_home / ".env").read_text(encoding="utf-8") + assert "TEAMS_CLIENT_ID=client-id" in env_text + assert "TEAMS_TENANT_ID=tenant-id" in env_text + class TestTeamsConnect: @pytest.mark.asyncio async def test_connect_fails_without_sdk(self, monkeypatch):