fix(agent): hide auth placeholder env in preflight
test / unit (pull_request) Successful in 31s
test / integration (pull_request) Successful in 55s

This commit is contained in:
2026-05-28 19:00:39 -04:00
parent 43cd83d77b
commit 9399626ba6
4 changed files with 58 additions and 4 deletions
+31
View File
@@ -0,0 +1,31 @@
"""Unit: shared preflight print helpers."""
from __future__ import annotations
import unittest
from bot_bottle.backend.print_util import visible_agent_env_names
class TestVisibleAgentEnvNames(unittest.TestCase):
def test_hides_codex_auth_placeholder(self):
self.assertEqual(
["CUSTOM"],
visible_agent_env_names(
["OPENAI_API_KEY", "CUSTOM"],
agent_provider_template="codex",
),
)
def test_hides_only_active_provider_placeholder(self):
self.assertEqual(
["CUSTOM", "OPENAI_API_KEY"],
visible_agent_env_names(
["CLAUDE_CODE_OAUTH_TOKEN", "OPENAI_API_KEY", "CUSTOM"],
agent_provider_template="claude",
),
)
if __name__ == "__main__":
unittest.main()