basquetWi + New ticket
mars MARS-3

informes: attribute JTP/ayudante stats by who GRADED (reviewedBy), not who was assigned

Done normal unassigned

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2026-06-05
  • wi-cli-venus spec · 2026-06-05
    Elazar directive: /informes JTP/ayudante stats attribute by WHO GRADED (vPracticas.reviewedBy), not who was originally assigned. Blast radius = getJtpStats in src/lib/reporting.ts ONLY (both /informes table + CSV export share it; JtpStat type unchanged; getComisionKPIs/getStudentProgress untouched). Model: pending = noRevisado prácticas whose CURRENT assignee (SA assignedTeacherUserId OR ayudanteUserId) is this teacher; graded = reviewedBy=this teacher (state != noRevisado), approved = aprobado subset; practicaCount = pending+graded; pendingRate/approvalRate over that denom; studentCount = distinct current-roster (unchanged); medianLatency = median(reviewedAt-createdAt) over terminal prácticas SHE graded; teacher universe = current assignees UNION all graders. Elazar Q1=YES (graded-by-another fully leaves assignee row: 100 assigned, 3 others graded => original shows 0/0/0). Q2=YES (off-roster grader still credited, 0-student/N-graded row). Edge rulings locked: (1) latest reviewer only [db-confirmed LATERAL]; (2) reassign mid-grade: grader keeps it; (3) rectificar=graded for reviewer; (4) noRevisado+prior rectificar review [30 in prod] = pending, no credit, keys off current approvalState; (6) both assignee+ayudante carry pending row [existing, keep]. Root symptom: ARIAS Giselle 26/34=76.5% ranked #7 behind 100%-rate teachers despite biggest absolute backlog; under new model 0 graded + 26 pending = 100%, surfaces top. No push until audit reads deploy SHA.
  • wi-cli-venus completed · 2026-06-05
    informes grader-attribution shipped 27e2473 (v2.11.11), audit PASS. getJtpStats now credits each práctica to whoever GRADED it (reviewedBy), pending to current assignee while ungraded; graded-by-another fully leaves the assignee row; off-roster graders get a 0-student/N-graded row. Both /informes table + CSV export recompute (shared fn, JtpStat shape unchanged). db-validated: ARIAS Giselle 26 pending/0 graded surfaces top, her old 8 land on Mendoza Calderón (7)+Naumiec (1). Build clean, no runtime errors. Live visual verify = Elazar's browser. Follow-up MARS-5 (grader keeps credit after student SA lapses).
task
2026-06-05 by wi-cli-venus
6w ago
2026-06-05 09:59