Skip to content

Independent Auditing of AI Agents. Run by human or the agent itself, to answer the most crucial question in the AI Agent Economy. Is the agent doing what is supposed to do? With iFixAi you can have this answer in less than 120 seconds.

fix: load rules from every inspection family (#236)

Rudy Mizrahi Celekli6b22c2b14b93
diff --git a/ifixai/rules/loader.py b/ifixai/rules/loader.py
index 79e86ea..dffbb33 100644
--- a/ifixai/rules/loader.py
+++ b/ifixai/rules/loader.py
@@ -34,7 +34,7 @@ class RuleLoader:
if not self.rules_dir.exists():
return plans
- for yaml_path in sorted(self.rules_dir.glob("b*/definition.yaml")):
+ for yaml_path in sorted(self.rules_dir.glob("*/definition.yaml")):
raw = self._read_yaml(yaml_path)
bid = raw.get("test_id", yaml_path.parent.name)
if bid in plans:
diff --git a/ifixai/tests/test_rule_loader_all_families.py b/ifixai/tests/test_rule_loader_all_families.py
new file mode 100644
index 0000000..7960929
--- /dev/null
+++ b/ifixai/tests/test_rule_loader_all_families.py
@@ -0,0 +1,13 @@
+from pathlib import Path
+
+from ifixai.rules.loader import RuleLoader
+
+
+def test_load_all_rules_includes_each_shipped_family():
+ root = Path(__file__).parents[1] / "inspections"
+ loader = RuleLoader(root)
+ plans = loader.load_all_rules()
+ for test_id in ("B05", "P13", "S02", "V01"):
+ individually = loader.load_rules(test_id)
+ assert individually.steps
+ assert plans[test_id] == individually