Настроить phase106 и детекторы агентного лупа
This commit is contained in:
@@ -228,7 +228,7 @@ class AgentDetectorRunnerTests(unittest.TestCase):
|
||||
root = Path(tmp)
|
||||
artifact_dir = root / "run"
|
||||
write_text(
|
||||
artifact_dir / "scenarios" / "margin_root" / "steps" / "step_01" / "output.md",
|
||||
artifact_dir / "scenarios" / "profit_cashflow_boundary" / "steps" / "step_01_margin_root" / "output.md",
|
||||
"Top margin item: revenue 100, cogs 60, gross profit 40, margin 40%.",
|
||||
)
|
||||
write_text(
|
||||
@@ -240,6 +240,15 @@ class AgentDetectorRunnerTests(unittest.TestCase):
|
||||
/ "output.md",
|
||||
"Supplier for the selected item: Example LLC.",
|
||||
)
|
||||
write_text(
|
||||
artifact_dir
|
||||
/ "scenarios"
|
||||
/ "business_health"
|
||||
/ "steps"
|
||||
/ "step_05_next_checks"
|
||||
/ "output.md",
|
||||
"Check profit, debt, inventory, taxes, and customer concentration next.",
|
||||
)
|
||||
registry_path = root / "detector_registry.json"
|
||||
issue_catalog_path = root / "issue_catalog.json"
|
||||
write_json(
|
||||
@@ -255,6 +264,7 @@ class AgentDetectorRunnerTests(unittest.TestCase):
|
||||
"inputs": ["output.md"],
|
||||
"check": {
|
||||
"required_patterns_any": ["(?i)(revenue|cogs|gross profit|margin)"],
|
||||
"artifact_path_include_patterns": ["(?i)steps[\\\\/][^\\\\/]*(?:margin|profitability)"],
|
||||
"artifact_path_exclude_patterns": ["(?i)selected_item"],
|
||||
},
|
||||
}
|
||||
@@ -275,7 +285,7 @@ class AgentDetectorRunnerTests(unittest.TestCase):
|
||||
self.assertEqual(results["results"][0]["status"], "pass")
|
||||
evidence_paths = [item["path"] for item in results["results"][0]["evidence"]]
|
||||
self.assertEqual(len(evidence_paths), 1)
|
||||
self.assertIn("margin_root", evidence_paths[0])
|
||||
self.assertIn("step_01_margin_root", evidence_paths[0])
|
||||
|
||||
def test_composite_detector_fails_after_child_detector_fails(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
Reference in New Issue
Block a user