test(#149): Add comprehensive rejection loop integration tests

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>
This commit is contained in:
2026-02-01 20:11:15 -06:00
parent 28d0e4b1df
commit ac3f5c1af9
2 changed files with 632 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# Issue #149: [COORD-009] Test rejection loop
## Objective
Validate quality gates prevent premature completion through simulated rejection scenarios.
## Approach
1. Create comprehensive integration tests for rejection loop scenarios
2. Test each gate failure type triggers proper rejection
3. Verify forced continuation prompts are generated correctly
4. Ensure agents cannot bypass gates
5. 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
- [x] Read existing QualityOrchestrator and ForcedContinuationService code
- [x] Write comprehensive integration tests (TDD)
- [x] Run tests - all 9 tests pass
- [x] Fix linting issues
- [x] Run type checking - passes
- [x] 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.