mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-24 10:51:22 +03:00
56b36480e0
- Created comprehensive test suite with 26 tests covering: - Policy parsing success and failure cases - Confidence threshold enforcement (0.7) - Input validation (empty, too short) - Response parsing (JSON, markdown-wrapped JSON) - Policy structure validation (types, operators, actions) - Batch policy parsing with error handling - Policy validation helper functions - Error handling and recovery - Policy ID generation uniqueness - Format output for display - All tests use mock Claude client for controlled testing - Follows test harness patterns from clawsec-suite - Tests pass: 26/26 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>