1.1 KiB
1.1 KiB
Task: Alert refactor verification
Goal
Run the full test suite and verify the alert refactor is complete and correct.
Requirements
- Run
pytest tests/test_alerts.py --tb=short -v— all tests must pass - Run
pytest tests/ --tb=short -v— no regressions in other test files - Verify
routers/alerts.pyis clean:- No direct DB calls
- Uses
AlertServicefor all data access - Under 100 lines
- Verify
services/alert_service.pyis clean:- All methods are async
- Uses parameterized queries
- Under 200 lines
- Verify the
check_all_alertsendpoint still works (callscheck_sentiment_alertsvia background task)
Acceptance Criteria
- All alert tests pass (23 tests)
- No regressions in other test files
- Router file is clean and under 100 lines
- Service file is clean and under 200 lines
Files to Read
src/backend/routers/alerts.pysrc/backend/services/alert_service.pysrc/backend/tests/test_alerts.py
Notes
This is a verification-only task. No new code should be written unless a test fails, in which case fix the root cause and re-run.