ralph-claude-code/tests
frankbria 90fb5587a1 fix(circuit-breaker): address CodeRabbit review feedback
Aligns error detection patterns across all implementations and improves
test coverage based on CodeRabbit's critical and major findings.

Changes:
1. CRITICAL: Align lib/response_analyzer.sh pattern with ralph_loop.sh
   - Changed Stage 1 filter from '"[^"]*\(error\|failed\)"[^"]*":' to '"[^"]*error[^"]*":'
   - Removed bare 'cannot' and 'unable to' from Stage 2 (prevent false positives in prose)
   - Both files now use identical patterns for consistency

2. MAJOR: Improved test coverage
   - Renamed test 10 from "Cannot/unable in error context" to "Error prefix with descriptive message"
   - Added test 10a to validate bare "cannot/unable" DON'T trigger false positives
   - Now testing 13 scenarios (was 12)

3. MINOR: Added comprehensive test strategy documentation
   - Header comments explain two-stage filtering approach
   - Documents pattern consistency requirement
   - Lists all 13 test scenarios and their purpose

Test results:
✓ All 13 tests passing
✓ Pattern consistency validated across ralph_loop.sh and lib/response_analyzer.sh
✓ False positive scenarios properly excluded

Addresses CodeRabbit review comments:
- r2655862688 (Critical pattern inconsistency)
- r2655862689 (Major test coverage gap)
- r2655862690 (Minor misleading test name)
2025-12-31 13:34:21 -07:00
..
helpers Add comprehensive test infrastructure and core unit tests 2025-09-30 22:56:02 -07:00
integration Phase 2: Requirements, testing, and documentation enhancements 2025-10-01 21:34:54 -07:00
unit Add comprehensive test infrastructure and core unit tests 2025-09-30 22:56:02 -07:00
test_error_detection.sh fix(circuit-breaker): address CodeRabbit review feedback 2025-12-31 13:34:21 -07:00