Files
guilan-ace-backend/tasks/todo.md

52 lines
3.4 KiB
Markdown

# Profile Gamification Task List
## Phase 1: Scoring foundation
- [x] 1. Add gamification ledger, rules, aggregations, and unit tests.
- Acceptance: duplicate source delivery cannot duplicate points; reversals are auditable; global level and activity-badge boundaries are tested.
- Verification: focused gamification tests pass.
- [x] 2. Add a read-only event-history dry run and threshold distribution report; dry-run results support a 30-point first overall level.
- Acceptance: dry run defaults to no writes and reports counts/distributions for draft global and activity thresholds.
- Verification: command tests assert no ledger mutation in dry-run mode.
### Checkpoint: Scoring foundation
- [x] Ledger tests and dry-run tests pass without touching production data.
## Phase 2: Trusted source activity
- [x] 3. Restrict attendance verification to staff/system and record verification provenance.
- Acceptance: a user cannot set their own registration to attended; staff/system transition is recorded and awards 30 points once.
- Verification: event API/admin integration tests cover denial, verified award, and repeated update.
- [x] 4. Backfill existing attended registrations with dry-run/apply modes; applied to the local development database after dry-run review.
- Acceptance: only current attended registrations are included; apply is idempotent; confirmed registrations and all payments are excluded.
- Verification: command tests cover dry run, apply, and rerun.
- [x] 5. Score blog actions from rollout forward and reverse invalidated activity.
- Acceptance: posts/coauthors, approved comments/replies, likes, and saves receive the agreed scores; invalidated sources reverse them; no old blog actions are imported.
- Verification: blog integration tests cover all award/reversal paths.
### Checkpoint: Source integration
- [x] Event and blog integration suites pass; ledger totals reconcile with valid source rows.
## Phase 3: API and profile surfaces
- [x] 6. Add authenticated summary and public badge-only API contracts.
- Acceptance: authenticated response includes points/progress/breakdown; public response includes earned badges and level only regardless of personal-detail setting.
- Verification: schema, authorization, and privacy tests pass.
- [x] 7. Replace overview recent events with rank card and explanatory dialog.
- Acceptance: events remain in the Events tab; overview shows level, progress, event/blog points, badges, and an accessible help dialog.
- Verification: frontend build passes; inspect the rendered RTL profile and help dialog in the local browser.
- [x] 8. Render badges on public profiles without exposing numeric score data.
- Acceptance: badges appear with personal details both visible and hidden; public response/rendering omits exact points and category totals.
- Verification: backend public-profile contract tests pass; inspect badge-only public rendering in the local browser.
### Checkpoint: End-to-end profile flow
- [x] Authenticated and public surfaces show consistent current badges and level; frontend build, relevant backend tests, and local browser review pass.
## Phase 4: Calibration and release
- [x] 9. Review dry-run distributions, tune thresholds, apply the event backfill, and reconcile totals (297 verified ledger awards; 8,910 net event points).
- [ ] 10. Release backend/frontend together and monitor scoring/reversal failures.