Answer architecture round 2: keep test data out of the rule-file check, and state the judge's reason for reading rule files in one entry

This commit is contained in:
2026-10-13 00:49:22 +02:00
parent 950f06c0be
commit 2020a4f04f
4 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class Citations(unittest.TestCase):
def test_every_rule_file_named_exists_and_topic_rules_lists_each(self):
tracked = subprocess.run(["git", "ls-files", "-z"], capture_output=True, check=True, cwd=ROOT, text=True).stdout.split("\0")
named = {(path, rule) for path in filter(None, tracked) for rule in RULE_FILE.findall((ROOT / path).read_text())}
named = {(path, rule) for path in filter(None, tracked) if not pathlib.Path(path).name.startswith("test_") for rule in RULE_FILE.findall((ROOT / path).read_text())}
self.assertTrue(named)
self.assertEqual(sorted(f"{path}: {rule}" for path, rule in named if not (ROOT / rule).exists()), [])
topic_rules = (ROOT / "CLAUDE.md").read_text().split("## Topic rules\n")[1].split("\n## ")[0]