Summary
Create automated detection for @pytest.mark.skip decorators that AI agents add to circumvent failing tests.
Problem
AI agents sometimes add @Skip decorators to failing tests instead of fixing them, which:
- Hides real bugs
- Degrades test suite value
- Creates technical debt
- Violates TDD principles
Tasks
1. Create Detection Script
2. Validation Logic
3. Integration
4. Documentation
Test Cases
# Should detect these:
@pytest.mark.skip # No reason
@pytest.mark.skip("TODO") # Weak reason
@skip # Bare decorator
# Should allow (if policy changed):
@pytest.mark.skip(reason="External API unavailable in CI")
Success Criteria
Technical Approach
Use Python's ast module to parse test files and walk the AST looking for skip decorators. This is more reliable than regex matching.
Dependencies
Estimated Effort: 3-4 hours
Summary
Create automated detection for @pytest.mark.skip decorators that AI agents add to circumvent failing tests.
Problem
AI agents sometimes add @Skip decorators to failing tests instead of fixing them, which:
Tasks
1. Create Detection Script
tools/detect-skip-abuse.py2. Validation Logic
@skip,@skipif,@pytest.mark.skip3. Integration
4. Documentation
Test Cases
Success Criteria
Technical Approach
Use Python's
astmodule to parse test files and walk the AST looking for skip decorators. This is more reliable than regex matching.Dependencies
Estimated Effort: 3-4 hours