From 8a23f20fd5c1f8eb43ca890dba681267dd1fa65e Mon Sep 17 00:00:00 2001 From: Alex Kroman <12372+alexkroman@users.noreply.github.com> Date: Fri, 12 Jun 2026 11:15:31 -0700 Subject: [PATCH 1/2] Apply suggested fix to tests/test_import_hygiene.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_import_hygiene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_import_hygiene.py b/tests/test_import_hygiene.py index 4129e348..83da1f18 100644 --- a/tests/test_import_hygiene.py +++ b/tests/test_import_hygiene.py @@ -25,6 +25,6 @@ def test_cli_import_does_not_load_eval_scoring_stack(): # A fresh interpreter: the suite's own process has long since imported the # scoring stack, so sys.modules can only be probed in a child. result = subprocess.run( - [sys.executable, "-c", _PROBE], capture_output=True, text=True, timeout=120, check=False + [sys.executable, "-c", _PROBE], capture_output=True, text=True, timeout=15, check=False ) assert result.returncode == 0, result.stderr From a1fa32bc1be62fb6a8e6df6fe4c518e5cf4c9804 Mon Sep 17 00:00:00 2001 From: Alex Kroman <12372+alexkroman@users.noreply.github.com> Date: Fri, 12 Jun 2026 11:15:32 -0700 Subject: [PATCH 2/2] Apply suggested fix to tests/test_import_hygiene.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests/test_import_hygiene.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/test_import_hygiene.py b/tests/test_import_hygiene.py index 83da1f18..43d85977 100644 --- a/tests/test_import_hygiene.py +++ b/tests/test_import_hygiene.py @@ -11,14 +11,17 @@ import subprocess import sys +import textwrap -_PROBE = """ -import sys -import aai_cli.main -heavy = {"jiwer", "rapidfuzz"} -loaded = sorted(heavy & {name.split(".")[0] for name in sys.modules}) -assert not loaded, f"CLI import eagerly loaded: {loaded}" -""" +_PROBE = textwrap.dedent( + """ + import sys + import aai_cli.main + heavy = {"jiwer", "rapidfuzz"} + loaded = sorted(heavy & {name.split(".")[0] for name in sys.modules}) + assert not loaded, f"CLI import eagerly loaded: {loaded}" + """ +).strip() def test_cli_import_does_not_load_eval_scoring_stack():