Audit student-facing counts for operador-vs-participacion conflation
From the aro:coders brainstorm bs-msitbbhaie2 (Elazar-opened 2026-08-07, ownership-vs-visibility conflation; SOP-MARS-41 is the originating instance). Venus has NO teacher-assignment model, so the teacher-side bug is structurally impossible here — but venus carries the IDENTICAL two-relations-one-name shape on the STUDENT side, live: practicaParticipations.rolEnPracticaId discriminates operador from ayudante, so 'mis practicas' can mean operated-by-me or merely-participated-in. A participation count read as an operator count over-states a student's competency, is authz-clean, and shows no error on any screen. Positive precedent already in prod: vModuloPeriodoStats separates totalAlumnos from totalOperadores via count(DISTINCT CASE WHEN r.codigo='operador'). SCOPE: audit every student-facing and informe count for operador-vs-participation conflation; each count declares its population in its own header, and the population is a COLUMN in the query (single-query CASE shape, per coder-terra-cc) never an assumption in the reader. I have measured the SHAPE only, not every call site — do not close this from the one view. Also in scope, cheap and schema-free: scope-stating caption on /practicas, which is a titular's whole-catedra list with no scope statement (coder-terra-cc's labelling defect).
Activity
-
Audit (coder-venus-cc, 2026-10-06). mi-cursada: CLEAN. Unique index practicaId+alumnoUserId WHERE deletedAt IS NULL makes row count == práctica count; header declares 'operador, ayudantes y observador'; KPI cards split operador/ayud1/ayud2 via vKpiAlumnoResumen. informes tables: CLEAN, Total and Operador are separate columns everywhere, 'Operadores únicos' and '% operadores' are role-discriminated. DEFECT: card 'Prom. prácticas/alumno' = distinct prácticas / alumnos = 114.3, while the ranking's 'Total' column averages 182.4 per alumno (3542 prácticas, 5653 participations, 31 alumnos; all rows). It understates by 37% and uses 'total' for a second population on the same page. Fix: mean of the ranking Total plus a hint stating the population. Also the /practicas scope caption (whole carrera, not the viewer's). NOT AUDITED: /reportes/* and /informes/alumno|kpi|stats|pdf subpages.
-
9ab055c pushed; Vercel status success (PhkcSxczsdt2KwLJQEFrZunEhntm), superseded by f3118b9 before the health bind. audit-venus-ca BLOCK:9ab055c - the /practicas caption claimed all sedes/alumnos above a filter-scoped table. Fix-forward f3118b9: 'Prácticas de toda la carrera, no solo las que cargaste vos. Los filtros acotan la lista.' Re-review requested.
-
DONE. SHAs 9ab055c (metric fix; audit BLOCK:9ab055c on the /practicas caption) + f3118b9 fix-forward (audit PASS:f3118b9). Version 1.17.37 (remote main package.json = live /api/health). f3118b9 bound: Vercel status target_url id 9vHBn9wkRWR6uVepj6yP3CHDtXBr == health deploymentId dpl_9vHBn9wkRWR6uVepj6yP3CHDtXBr. appEvents warn/error since 07:20Z push: 0. Informes card now per-alumno mean (182.4 vs old 114.3); /practicas, PDF sede roster labelled with their population; mi-cursada, informes tables, alumno detail, PDF ranking audited clean. Tests: informes-metrics.test.ts, forced red. NOT EXERCISED: rendered pages and the PDF in a browser.