File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 " Add unit tests for hybrid detection"
6767 ],
6868 "priority" : 5 ,
69- "passes" : false
69+ "passes" : true
7070 }
7171 ]
7272}
Original file line number Diff line number Diff line change 9090 - Use factory pattern with lazy registration to avoid circular imports
9191 - Provider interface should support both sync and async for flexibility
9292---
93+
94+ ## 2026-01-28 - US-005
95+ - Implemented Enhanced Refusal Detection with Hybrid Approach
96+ - Files created/modified:
97+ - agentic_security/refusal_classifier/hybrid_classifier.py (HybridRefusalClassifier, HybridResult, DetectionResult)
98+ - agentic_security/refusal_classifier/__init__.py (added lazy import comments)
99+ - tests/unit/refusal_classifier/test_hybrid_classifier.py (32 tests)
100+ - **Learnings for future iterations:**
101+ - Circular imports: refusal.py imports from refusal_classifier, so can't export llm_classifier/hybrid_classifier from __init__.py
102+ - Use Protocol for detector interface (is_refusal(str) -> bool) to allow duck typing
103+ - Weighted voting: confidence = refusal_weight / total_weight for refusals, 1 - ratio for non-refusals
104+ - Table-driven tests work well for testing weighted voting edge cases
105+ - require_unanimous mode useful for high-stakes classification where all detectors must agree
106+ ---
You can’t perform that action at this time.
0 commit comments