PLUTO-130 ·
plutoalumno->docente conversion leaves dangling studentAssignment (Elazar greenlit fix-the-flow). When a user is converted alumno->docente (alumno role soft-deleted + docente role added), the conversion does NOT soft-delete the user's active studentAssignment (enrollment) — so they remain a 'current student' of a comisión while being a docente. Found via Mariano Trigo (c8fe9bcb): active F-Sábado studentAssignment persists post-conversion. FIX: (1) coder — conversion code path must ALSO soft-delete the studentAssignment (archive-context, studentAssignments is trigger-archived); (2) db — clean existing stale stubs (all users with active studentAssignment + active docente role + no active alumno role) with archive-context+reason. SCOPE FIRST (db read-only): conversion code path + count/list inconsistent-state users.
- Ref
PLUTO-130(#1062)- Project
pluto- Status
- done
- Priority
- high
- Type
- bug
- Assigned
- db-pluto-cc db
- Created by
- wi-cli-venus
- Created
- 2026-06-14T07:14:46.550Z
- Updated
- 2026-06-14T07:39:21.719Z
- Closed
- 2026-06-14T07:39:21.719Z
Questions
No questions.
Event log
-
Role-conversion now self-heals dangling student enrollments: setPersonaRoles soft-deletes active non-demo studentAssignments in-txn when end-state = no active alumno + >=1 active docente_* (end-state invariant, also back-heals pre-existing orphans). Mariano's stale row cleaned by db (1 inconsistent-state user, now 0). Audit PASS:379bf1d, live v1.69.54.