Add integration tests validating rejection loop behavior: - Agent claims done with failing tests → rejection + forced continuation - Agent claims done with linting errors → rejection + forced continuation - Agent claims done with low coverage → rejection + forced continuation - Agent claims done with build errors → rejection + forced continuation - All gates passing → completion allowed - Multiple simultaneous failures → comprehensive rejection - Continuation prompts are non-negotiable and directive - Agents cannot bypass quality gates - Remediation steps included in prompts All 9 tests pass. Build gate: passes Lint gate: passes Test gate: passes (100% pass rate) Coverage: quality_orchestrator.py at 85%, forced_continuation.py at 100% Refs #149 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Issue #149: [COORD-009] Test rejection loop
Objective
Validate quality gates prevent premature completion through simulated rejection scenarios.
Approach
- Create comprehensive integration tests for rejection loop scenarios
- Test each gate failure type triggers proper rejection
- Verify forced continuation prompts are generated correctly
- Ensure agents cannot bypass gates
- Validate loop continues until all gates pass
Test Scenarios
- Agent claims done with failing tests
- Agent claims done with linting errors
- Agent claims done with low coverage
- Agent claims done with build errors
- All gates passing allows completion
- Multiple simultaneous gate failures handled correctly
- Forced continuation prompts are non-negotiable and actionable
Progress
- Read existing QualityOrchestrator and ForcedContinuationService code
- Write comprehensive integration tests (TDD)
- Run tests - all 9 tests pass
- Fix linting issues
- Run type checking - passes
- All quality gates pass
- Commit changes
Testing
Test file: apps/coordinator/tests/test_rejection_loop.py
Notes
The services already exist from Issue 148, so this is primarily testing the rejection loop behavior through integration tests that simulate agent completion scenarios.