2.5 KiB
2.5 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | ||
|---|---|---|---|---|---|---|---|---|---|
| TASK-175-add-stats-regression-validation-script | Add Stats regression validation script | pending | platform | PM |
|
foundation | high |
TASK-175-add-stats-regression-validation-script - Add Stats regression validation script
Goal
Add a small, repeatable validation for the existing Stats frontend/backend surfaces that protects current endpoints and assets, without changing behavior.
Context
The Stats section already has public-facing pages, JS assets, and backend endpoints that can regress independently. This task should add a lightweight executable validation flow (script-based) that is tolerant to envs with no local data and can still verify expected behavior and error states.
Steps
- Read the listed files first.
- Define a focused Stats validation workflow without changing any application behavior.
- Add/update a script that checks key assets and endpoints, including supported and empty/missing states.
- Ensure the validation outputs clear status and actionable next steps when backend is unavailable.
- Document endpoint behavior, known environment limits, and the recommended follow-up task.
Files to Read First
- AGENTS.md
- ai/repo-context.md
- ai/architecture-index.md
- docs/stats-section-functional-plan.md
- docs/annual-ranking-snapshot-runbook.md
- frontend/stats.html
- frontend/assets/js/stats.js
- backend/app/routes.py
- scripts/run-integration-tests.ps1
Expected Files to Modify
- scripts/run-stats-validation.ps1 (or equivalent repo-preferred validation script)
- scripts/run-integration-tests.ps1 only if a safe integration point is justified
- ai/tasks/done/TASK-175-add-stats-regression-validation-script.md
Constraints
- No behavior change in Stats.
- No UI redesign.
- No ranking logic changes.
- No database schema changes.
- Do not re-enable Elo/MMR.
- Do not reintroduce Comunidad Hispana #03.
- Keep validation tolerant to environments without positive local data.
- If backend is unavailable, document the expected validation behavior instead of failing with ambiguous output.
Validation
- Run
node --check frontend/assets/js/stats.js. - Run
powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1. - Run the new Stats validation script.
- Run
git diff --name-onlyand verify scope is within the task plan.
Outcome
Document validated endpoints, controlled limitations, and the immediate next task recommendation.