From 47f53a7edc578f63a3f609051c9953af98c96122 Mon Sep 17 00:00:00 2001 From: naudachu Date: Mon, 10 Aug 2026 15:43:24 +0500 Subject: [PATCH] test: check the domain layer against sys.stdlib_module_names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The layering test pinned an exact import set, so any new stdlib import in skills/issue tripped it — 'collections', added by issue_ac.py, did. Assert the rule AGENTS.md actually states (stdlib only, never subprocess) instead of a frozen snapshot of it. Co-Authored-By: Claude Opus 5 (1M context) --- tests/test_store_path.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_store_path.py b/tests/test_store_path.py index aedec5e..736d214 100644 --- a/tests/test_store_path.py +++ b/tests/test_store_path.py @@ -425,9 +425,11 @@ class TestLayering(unittest.TestCase): for line in f: if line.startswith(("import ", "from ")): imported.add(line.split()[1].split(".")[0]) - local = {"issue", "issue_index"} - self.assertEqual(imported - local, {"argparse", "os", "re", "sys"}, - "non-stdlib or unexpected import in the domain layer") + local = {"issue", "issue_ac", "issue_index"} + foreign = imported - local - sys.stdlib_module_names + self.assertEqual(foreign, set(), + "non-stdlib import in the domain layer: %s" + % ", ".join(sorted(foreign))) self.assertNotIn("subprocess", imported)